Rakesh Agarwal
Rakesh Agarwal

Reputation: 3059

Task manager CPU Usage

I have two processors in my machine. The CPU usage that appears in task manager for a process P.exe is in the range 4-7%. Is that CPU usage a percentage of the usage of both the CPU by the process P ?

I later changed the affinity of the process P to a single core. The CPU usage of the process increased to be in the range 6-9%. How can changing the affinity of the process to a single core increase the CPU usage of the process P ?

Upvotes: 2

Views: 1293

Answers (2)

Ethan Reinsch
Ethan Reinsch

Reputation: 137

The process P is a capable of being processed with multiple cores, thus will work faster and more efficiently with multi-core. If you're only using one core, your CPU is working harder thus CPU usage increases. It's like running using only 1 leg instead of 2. Even to go the same distance, it uses more energy and time to use 1 leg than it does 2.

Upvotes: 0

wxiiir
wxiiir

Reputation: 336

Maybe your process was being moved from one core to another for processing and the task manager as you might figure, normalizes the data that it shows you (if it updates every second and for example you had 100% cpu usage on .1 seconds, 100x.1=10 so it shows you 10%). what i can figur out from that is that your second core was processing the program occasionally and measuring about 2%-3% and your first core was processing it more times than the second core measuring about 4%-7%.

If you set the affinity to two you should see that probably when the core 1 curves or spikes down during the execution, the core 2 curves or spikes up by about the same amount. maybe because it's a small graph you have to zoom it or enlarge or use a process that takes more processing power so the fluctuations become larger and you can see what i'm talking about.

Upvotes: 2

Related Questions