多核CPU单线程行为,未达到100%

发布于 2024-09-15 09:26:01 字数 282 浏览 3 评论 0原文

alt text

正如您从附图中看到的那样,我的双核机器上的 CPU 图奇怪地对称!

这是某种负载平衡,以防止一个核心比另一个核心使用更多?其背后的原因是什么(可能是热量分布)?

当然我主要关心的是:我的单线程 PSNR 图像算法是否达到 100%?

CPU 为 Core 2 Duo E6850 3Ghz,运行 Ubuntu 10.4。

谢谢罗斯

alt text

As you can see from the attached image the CPU graph on my dual core machine is weirdly symmetrical!

Is this some sort of load balancing to prevent one core being used more than the other? What are the reasons behind it (heat distribution maybe)?

Of course my main concern: is my single thread PSNR image algorithm achieving 100%?

CPU is Core 2 Duo E6850 3Ghz running Ubuntu 10.4.

Thanks

Ross

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

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

发布评论

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

评论(2

二货你真萌 2024-09-22 09:26:01

您正在使用两个 CPU 实现 50% 的负载。您的程序没有附加到固定的 CPU,因此它会根据内核(以及系统上运行的其他进程)进行切换。

如果您想确保进程在其中一个核心上运行,则必须设置关联性(示例)。这样,您应该会看到一个核心上的负载为 100%,而另一个核心则用于其他任务。

You are achieving a 50% load using both CPUs. Your program is not attached to a fixed CPU so it's switching, depending on the kernel (and other processes running on your system).

If you want to be sure your process is running on one of your cores, you have to set affinity (Example here). This way, you should see a 100% load on one core, the other one being used for other tasks.

单调的奢华 2024-09-22 09:26:01

(应该为此使用注释,但我没有足够的代表!)

我以前不止一次遇到过这种情况,并且总是与应用程序冲突。

例如,当 compiz 启动两次或部分卸载时,可能会发生这种情况。我发现同时使用两个不同的播放器读取 DVD 时也会发生这种情况。

根据我的经验,这不是正常行为:计算机速度减慢很多,当您尝试修复它时,这很烦人!

(Should have used comments for this, but I don't have enough rep!)

I encountered this situation more than once before, and always with an application conflict.

For example, it can happen when compiz is started twice, or when it is partially unintalled. I found it could also happen when reading DVDs with two different players at the same time.

In my experience, it's not normal behaviour: the computer slows down quite a lot,which is annoying when you're trying to fix it!

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