Are there limits to CPU usage for any one program?

G

Guest

Anyone know if Windows places limits to the amount of CPU that a program can
use?

Here's why I ask. I'm running a series of computer simulations that were
written in Python 2.3 (an object oriented programming language see
www.python.org). Each simulation takes between 3 and 12 hours to complete and
there are 60 simulations in the series. The simulations are mostly a bunch of
mathematical calculations (summations, intregrals, numeric minimization,
etc.). Obviously, I'd like these simulations to run as fast as possible. When
I'm running a simulation and check the CPU usage using either the perfomance
program under administrative tools or the task manager, it always says the
program is using around 50% of the CPU (and no-where near the limits in
memory). Interestingly, if I run two simulations at once, then I'm using 100%
of the CPU, with each simulation using approximately 50%.

While I could simply continue to run two simulations at once to minimize the
time required to run all the simulations, I'm curious why each simulation
will only use 50% of my CPU?

Windows XP
3.2 GHz Pentium 4
512 RAM
 
G

Guest

Come on Mike. Why can't my computer give 110%?

Seriously though, when I'm only running one simulation, that program still
only uses 50% of the CPU usage, with another 48-50% of CPU going to system
idle process. If half the CPU isn't being used, why can't the simulation
program use it?
 
P

Plato

=?Utf-8?B?UHJlZFByZXkgQmlvbG9naXN0?= said:
Seriously though, when I'm only running one simulation, that program still
only uses 50% of the CPU usage, with another 48-50% of CPU going to system
idle process. If half the CPU isn't being used, why can't the simulation
program use it?

Perhaps you have a fast system and that app is using all it can get
already.
 
M

Mike Hall \(MS-MVP\)

Pred

The system will allocate whatever resources are needed.. if only 50% CPU is
required, 50% is all that it will get.. not all programs are CPU intensive..
 
B

Bob I

You could temporarily disable it in BIOS to see if it's really just a
display anomaly.

Yep

Todd
 
J

J Haag

Anyone know if Windows places limits to the amount of CPU that a program can
use?

Here's why I ask. I'm running a series of computer simulations that were
written in Python 2.3 (an object oriented programming language see
www.python.org). Each simulation takes between 3 and 12 hours to complete and
there are 60 simulations in the series. The simulations are mostly a bunch of
mathematical calculations (summations, intregrals, numeric minimization,
etc.). Obviously, I'd like these simulations to run as fast as possible. When
I'm running a simulation and check the CPU usage using either the perfomance
program under administrative tools or the task manager, it always says the
program is using around 50% of the CPU (and no-where near the limits in
memory). Interestingly, if I run two simulations at once, then I'm using 100%
of the CPU, with each simulation using approximately 50%.

This is a quirk in the way task manager works with HT cpus. The
processor itself handles managing the threads and CPU power, but is
limited in what it can report to windows. Windows thinks your computer
has two CPUs, but it really only has one so the one program is using
100% of your cpu, but to windows it is only using 100% of one CPU which
windows reports as 50% of your total available CPU. I don't know enough
of the technical details to give you a more complete explanation.
While I could simply continue to run two simulations at once to minimize the
time required to run all the simulations, I'm curious why each simulation
will only use 50% of my CPU?

In this case you should find that they both take twice as long as they
should.
 
G

Guest

Thanks J Haag,

That answer makes the most sense. Some more new information that supports
your suggestion:

It does take twice as long if I run two simulations at once.

Today I was doing some complicated calculations in a completely different
program (ArcView GIS). During one of the particularly time-consuming
calculations, I checked Task Manager, and it said that ArcView was using 50%
of the CPU.

Interestingly, the problem is not isolated to task manager, but the
performance program in administrative tools reports the same levels of CPU
usage. I've read somewhere that the two programs sometimes calculate CPU
usage differently, but it appears that they deal with HT chips in the same
way.

Thanks again
 
D

David Candy

It sounds fine. 100% of 1 CPU = 50% of 2 CPUs and 25% of 4 CPUs.

Don't assume that running 2 programs at once will always be quicker. It depends on how the program accesses memory - if the memory cache is flushed then it will be slower.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top