任务管理器CPU使用率
我的机器中有两个处理器。任务管理器中显示的进程 P.exe 的 CPU 使用率在 4-7% 范围内。 CPU 使用率是进程 P 的 CPU 使用率的百分比吗?
后来我把进程P的亲和力改为单核。该进程的 CPU 使用率增加到 6-9% 范围内。将进程的亲和性更改为单核如何增加进程 P 的 CPU 使用率?
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许你的进程正在从一个核心移动到另一个核心进行处理,并且任务管理器如你所想,将它向你显示的数据标准化(如果它每秒更新一次,例如你在 0.1 秒内有 100% 的 cpu 使用率,100x .1=10,所以它显示 10%)。我从中可以看出,您的第二个核心偶尔会处理该程序,测量结果约为 2%-3%,而您的第一个核心处理该程序的次数比第二个核心的处理次数要多,测量结果约为 4%-7%。
如果将亲和力设置为 2,您应该会看到,当核心 1 在执行过程中曲线或峰值下降时,核心 2 曲线或峰值可能会增加大约相同的量。也许因为它是一个小图,你必须缩放它或放大或使用需要更多处理能力的过程,这样波动就会变得更大,你才能明白我在说什么。
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.
进程P能够被多个核处理,因此在多核下工作得更快、更高效。如果您只使用一个核心,您的 CPU 会更加努力地工作,从而 CPU 使用率会增加。这就像只用 1 条腿而不是 2 条腿跑步一样。即使跑同样的距离,使用 1 条腿比使用 2 条腿消耗更多的能量和时间。
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.