开发者

Multi Core and CPU Usage

开发者 https://www.devze.com 2023-02-03 06:33 出处:网络
I Have an i3 intel CPU ( dual core with hyper threading ) i\'m usually monitoring my cpu usage using a sidebar gadget showing each core usage in separate line from ( 0 - 3 ).

I Have an i3 intel CPU ( dual core with hyper threading )

i'm usually monitoring my cpu usage using a sidebar gadget showing each core usage in separate line from ( 0 - 3 ).

but recently i noticed that core number 0 isn't being used at all.

after some search i bumped into a topic explaining the numbers and the idea that cores 0, 2 are the real cores and the 1, 3 are the hyper threaded cores, but according to that it means that my CPU's real core is never used and even my other core is useless.

and reading more i bumped into this multi-core-cpu-single-thread-behaviour-not-achieving-100 that says switching takes place, but still this didn't answer the question above, where is the real core 0 and why only 1 core is used.

Multi Core and CPU Usage

as you can see that's the normal CPU usage, what happened to the core 0,2开发者_Go百科,3 why aren't they being used by other programs and why is only 1 core active even when lot of programs are running.

( ALL processes are using all cores, inspected through affinity )


With hyperthreading both logical CPUs on one core are equivalent. It is not one of the is real and the second is hyperthreaded. Both are sharing the same physical core. It does not matter at all which one of them is used. It is better to first schedule threads on different physical cores and only once all physical cores are used, use 2nd logical CPUs on the same cores, which seems exactly what you describe.


Perhaps because there just are not more processed in need of computing power, and because SIBLING-level scheduling is considered more expensive. That is, processes - let's consider work-intensive ones for simplicity - will be assigned to different cores first before "overloading" a core (a group of N hw threads) with another program. In other words, a 6-core 4-thread machine usually populates the 24 threads in the order of 0, 4, 8, 12, 16, 20, 1, 5, 9, 13, 17, 21, 2, 6, 10, 14, 18, 22, 3, 7, 11, 15, 19, 23. (Slight deviations are of course possible due to "spontaneous" process migration.)

And it is not true only one thread is used: your very own graphpics shows Core 3 and 3) and Core 4 [sic] (it's threads 3 and 4) used, 1% and 2%. Most of the processes you see in the process list don't even run, they just sleep.

0

精彩评论

暂无评论...
验证码 换一张
取 消