stopping 100% processor load ? 
Author Message
 stopping 100% processor load ?

All my applications use 100% processor load when working.

This is a real problem for windows services I write that may take 30-45mins
to complete and in that time they almost lock a server, how can I get them
to say only use 75% ?

Craig



Sat, 23 Oct 2004 07:15:47 GMT  
 stopping 100% processor load ?

Quote:
> All my applications use 100% processor load when working.

> This is a real problem for windows services I write that may take
30-45mins
> to complete and in that time they almost lock a server, how can I get them
> to say only use 75% ?

Why don't you change their priority? You can set it to 'BelowNormal'.

   using System.Diagnostics;
   Process.GetCurrentProcess().PriorityClass =
ProcessPriorityClass.BelowNormal;

Regards,
Pieter Philippaerts
http://www.mentalis.org/



Sat, 23 Oct 2004 07:29:35 GMT  
 stopping 100% processor load ?
thanks, that sounds easy enough ...

is it a correct method of programming to do that tho ?
(just curious)

Craig


Quote:


> > All my applications use 100% processor load when working.

> > This is a real problem for windows services I write that may take
> 30-45mins
> > to complete and in that time they almost lock a server, how can I get
them
> > to say only use 75% ?

> Why don't you change their priority? You can set it to 'BelowNormal'.

>    using System.Diagnostics;
>    Process.GetCurrentProcess().PriorityClass =
> ProcessPriorityClass.BelowNormal;

> Regards,
> Pieter Philippaerts
> http://www.mentalis.org/



Sat, 23 Oct 2004 07:57:13 GMT  
 stopping 100% processor load ?

Quote:

> All my applications use 100% processor load when working.

What are you doing in your applications that the ALL take 100% of CPU time?


Sat, 23 Oct 2004 19:21:02 GMT  
 stopping 100% processor load ?
Just things like calculations or modifications to files on the disk drive
but any application you write will, while performation an operation, take
100% - for eg: write a simple app to call a webservice, 100% load while
doing this. Its not REALLY load because apps take as much processor as they
can get regardless.

It would just be nice to control it somehow :)

Craig



Quote:




Quote:
> > All my applications use 100% processor load when working.

> What are you doing in your applications that the ALL take 100% of CPU
time?



Sat, 23 Oct 2004 20:40:57 GMT  
 stopping 100% processor load ?
Application are taking 100% CPU time while executing instructions, whenever they are performing I/O requests they are pre-empted and
another process gets the CPU until the I/O returns.
When an application only performs calculations (no I/O) they are pre-emted when they have consumed their quota (10msec max).
As such when you have two applications doing nothing else than calculations, both will get ~50% CPU time.
Changing the priority of both to the same level will not change anything both will get ~50%

Willy.

Quote:

> Just things like calculations or modifications to files on the disk drive
> but any application you write will, while performation an operation, take
> 100% - for eg: write a simple app to call a webservice, 100% load while
> doing this. Its not REALLY load because apps take as much processor as they
> can get regardless.

> It would just be nice to control it somehow :)

> Craig





> > > All my applications use 100% processor load when working.

> > What are you doing in your applications that the ALL take 100% of CPU
> time?



Sun, 24 Oct 2004 00:01:04 GMT  
 stopping 100% processor load ?
No windows will control how much processing power they are allowed to use.
By any chance are you using a

while(true) {

Quote:
}

loop?

Nick


Quote:
> Just things like calculations or modifications to files on the disk drive
> but any application you write will, while performation an operation, take
> 100% - for eg: write a simple app to call a webservice, 100% load while
> doing this. Its not REALLY load because apps take as much processor as
they
> can get regardless.

> It would just be nice to control it somehow :)

> Craig





> > > All my applications use 100% processor load when working.

> > What are you doing in your applications that the ALL take 100% of CPU
> time?



Sun, 24 Oct 2004 00:00:48 GMT  
 stopping 100% processor load ?
Nope, nothing stupid like that ;-)

Craig


Quote:
> No windows will control how much processing power they are allowed to use.
> By any chance are you using a

> while(true) {
> }

> loop?

> Nick



> > Just things like calculations or modifications to files on the disk
drive
> > but any application you write will, while performation an operation,
take
> > 100% - for eg: write a simple app to call a webservice, 100% load while
> > doing this. Its not REALLY load because apps take as much processor as
> they
> > can get regardless.

> > It would just be nice to control it somehow :)

> > Craig





> > > > All my applications use 100% processor load when working.

> > > What are you doing in your applications that the ALL take 100% of CPU
> > time?



Sun, 24 Oct 2004 00:05:36 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Site 100% fran?ais, 100% développement, 100% Pocket PC

2. ANN: Remotesoft .NET Protector - 100% Stops Decompiling/Disassembling

3. 100% cpu during breakpoint , Workspace loading.

4. char[100] to CString and CString to char[100] again

5. ADVICE NEEDED -- eVB or eVC for large project (100 forms, 100 tables in DB, subsecond response)

6. Load on a processor

7. getting processor load info

8. How can I efficiently link an byte array[100] to a batch of 100 CProgressControls ?

9. (char *)malloc(100) (Re: 64 bits--why stop there?)

10. ANN: The XtraBars Suite - a 100% C# Based Toolbar/Menu System for Visual Studio.NET

11. char (*)[100] == char *

12. (int * )100 question

 

 
Powered by phpBB® Forum Software