为什么Java CPU使用与Windows Resource Monitor CPU使用不同?

发布于 2025-01-20 12:07:32 字数 465 浏览 1 评论 0原文

我们正在对 Java 应用程序的性能进行故障排除。最近我们一直在为应用程序使用应用程序性能诊断工具。它还测量 CPU 和内存(不知道确切的方法,但请联系供应商)。除此之外,我们还看到了 Windows 进程/资源监视器的 CPU 使用情况。这些是完全不同的,我们没有任何线索。

在 Windows Server 2012 计算机上运行的 Java 应用程序 (openjdk8)。 当我们从 Java 应用程序测量 CPU 时,我们始终看到从 100% 到 500% 的峰值。 虽然我们的虚拟机/服务器有 12 个 CPU,但 Windows 资源监视器始终显示 CPU 使用率低于 10-15%。对于这种不明确的情况,我没有什么疑问;

1 - 为什么应用程序和 Windows 资源监视器之间的 CPU 测量结果存在差异? 2 - 怎么可能能爆500%? 3 - 在 Windows 操作系统上,我通常可以在哪里调整应用程序分配的 CPU,以便它有 500% 直接可用作 CPU 资源

We are troubleshooting a performance of a Java application. And recently we have been using Application Performance Diagnostics tool for the application. Which also measures the CPU and Memory (don't know the exact method for it but contact the supplier about it). Besides that we have seen the Windows process/resource monitor with CPU usages. Those are quite different and we don't have any clue.

The Java application (openjdk8) running on a Windows server 2012 machine.
When we measure the CPU from the Java App we see peaks from 100% till 500% all the time.
While our Virtual Machine/Server has 12 CPU's and Windows resource monitor indicates all the time CPU usage of below 10-15%. I have few questions regarding this unclarity;

1 - Why is there a difference between the CPU measurement between the application and Windows Resource Monitor?
2 - How is it possible that it can burst 500%?
3 - Where can I adjust on Windows OS normally the application allocated CPU so that it has that 500% directly available as CPU resource

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

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

发布评论

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

评论(1

殊姿 2025-01-27 12:07:32

这两个工具之间的一个区别似乎是 100%:

  • 您的工具测量 1 核全忙 = 100%,5 核全忙 = 500%
  • Windows 资源监视器测量 12 核全忙 = 100%,1 核全忙 = 8%,2 个核心完全忙碌 = 16%

另一个差异可能是采样/平均周期:

  • 至少有一次 5 个核心完全忙碌
  • 您的工具可能会测量峰值使用情况:在采样期间 Windows 资源监视器测量平均使用情况:5 个核心在 40% 的采样时间内忙碌,所有核心在剩余时间内空闲,平均使用全部可用容量的 16%

One difference between the two tools seems to be what is 100%:

  • your tool measures 1 core full busy = 100%, 5 cores full busy = 500%
  • the Windows resource monitor measures 12 cores full busy = 100%, 1 core full busy = 8%, 2 cores full busy = 16%

The other difference might be sampling / averaging period:

  • your tool might measure peak usage: 5 cores full busy at least once during the sampling period
  • the Windows resource monitor measures average usage: 5 cores busy during 40% of the sample time, all cores idle during the remaining time give an average of 16% usage of the full available capacity
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文