多核和 CPU 使用情况

发布于 2024-10-11 10:38:47 字数 703 浏览 3 评论 0原文

我有一个 i3 intel CPU(双核超线程)
我通常使用侧边栏小工具监控 CPU 使用情况,在 ( 0 - 3 ) 的单独行中显示每个核心的使用情况。
但最近我注意到核心编号 0 根本没有被使用。
经过一番搜索后,我遇到了一个主题,解释了数字和核心 0、2 是真正的核心,而 1、3 是超线程核心的想法,但据此,这意味着我的 CPU 的真正核心从未被使用过,甚至我的另一个核心没用。
阅读更多内容,我遇到了这个 multi-core-cpu-single -thread-behaviour-not-achieving-100 表示发生了切换,但这仍然没有回答上面的问题,真正的核心0在哪里以及为什么只使用1个核心。

正如您所看到的,这是正常的 CPU 使用情况,核心 0、2、3 发生了什么,为什么它们没有被其他程序使用,为什么即使有很多程序正在运行,也只有 1 个核心处于活动状态。

(所有进程都使用所有核心,通过亲和力检查)

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.

as you can see that's the normal CPU usage, what happened to the core 0,2,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 )

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

此生挚爱伱 2024-10-18 10:38:47

通过超线程,一个内核上的两个逻辑 CPU 是等效的。它不是一个是真实的,第二个是超线程的。两者共享相同的物理核心。使用其中哪一个并不重要。最好首先在不同的物理核心上调度线程,并且只有在使用所有物理核心后,才在同一核心上使用第二个逻辑 CPU,这似乎正是您所描述的。

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.

笔落惊风雨 2024-10-18 10:38:47

也许是因为没有更多的处理需要计算能力,并且因为 SIBLING 级调度被认为更昂贵。也就是说,进程(为简单起见,让我们考虑工作密集型进程)将首先被分配给不同的核心,然后再用另一个程序“过载”一个核心(一组 N 个硬件线程)。也就是说,6核4线程的机器通常会按照0、4、8、12、16、20、1、5、9、13、17、21、2、6、10的顺序填充24个线程、14、18、22、3、7、11、15、19、23。(由于“自发”进程迁移,当然可能会出现轻微偏差。)

并且仅使用一个线程是不正确的:您自己的图形显示使用了核心 3 和 3)和核心 4 [原文如此](线程 3 和 4),分别为 1% 和 2%。您在进程列表中看到的大多数进程甚至不运行,它们只是休眠。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文