如何确定我的进程是否受 CPU 限制、I/O 限制、内存限制或

发布于 2024-10-03 18:21:49 字数 496 浏览 1 评论 0原文

我正在尝试加快编译应用程序所需的时间,我正在调查的一件事是检查可以将哪些资源(如果有)添加到构建机器中以加快速度。为此,我如何确定是否应该投资更多的 CPU、更多的 RAM、更好的硬盘,或者该进程是否受到其他资源的限制?我已经看到了这个(​​如何检查应用程序是否是 cpu 限制还是内存限制?)并且正在寻找更多提示和指针。

到目前为止我已经尝试过:

  • 在构建计算机上与本地计算机上对进程进行计时。我发现构建机器花费的时间是我的机器的两倍。

  • 运行“资源监视器”并查看进程运行时的 CPU 使用情况、内存使用情况和磁盘使用情况 - 执行此操作时,我无法解释这些数字,主要是因为我不明白每一列的含义以及如何使用这意味着虚拟机与物理机以及多 CPU 机意味着什么。

I'm trying to speed up the time taken to compile my application and one thing I'm investigating is to check what resources, if any, I can add to the build machine to speed things up. To this end, how do I figure out if I should invest in more CPU, more RAM, a better hard disk or whether the process is being bound by some other resource? I already saw this (How to check if app is cpu-bound or memory-bound?) and am looking for more tips and pointers.

What I've tried so far:

  • Time the process on the build machine vs. on my local machine. I found that the build machine takes twice the time as my machine.

  • Run "Resource Monitor" and look at the CPU usage, Memory usage and Disk usage while the process is running - while doing this, I have trouble interpreting the numbers, mainly because I don't understand what each column means and how that translates to a Virtual Machine vs. a physical box and what it means with multi-CPU boxes.

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

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

发布评论

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

评论(2

稀香 2024-10-10 18:21:49

开始>运行> perfmon.exe

性能监视器可以绘制许多系统指标,您可以使用这些指标来推断瓶颈所在,包括 CPU 负载、IO 操作、页面文件命中率等。

此外,Platform SDK 现在包含一个名为 XPerf 的工具,可以提供与开发人员更相关的信息。

Start > Run > perfmon.exe

Performance Monitor can graph many system metrics that you can use to deduce where the bottlenecks are including cpu load, io operations, pagefile hits and so on.

Additionally, the Platform SDK now includes a tool called XPerf that can provide information more relevant to developers.

暮年 2024-10-10 18:21:49

随机暂停将告诉您 CPU 时间和 I/O 时间之间的比例是多少。

基本上,如果您抓取 10 个随机堆栈快照,并且如果 80%(例如)的时间用于 I/O,则在 8+/-1.3 个样本上,堆栈将进入读取或写入缓冲区的系统例程。
如果您想要更高的精度,请采集更多样本。

Random-pausing will tell you what is your percentage split between CPU and I/O time.

Basically, if you grab 10 random stackshots, and if 80% (for example) of the time is in I/O, then on 8+/-1.3 samples the stack will reach into the system routine that reads or writes a buffer.
If you want higher precision, take more samples.

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