确定单台 PC 上编译性能硬件瓶颈的最简单方法?
我现在已经攒了一些钱用于硬件升级。 我想知道,衡量硬件的哪一部分是编译瓶颈并且应该升级的最简单方法是什么?
有什么我可以使用的巧妙技巧吗? 我研究过perfmon
,但它有太多计数器,并且在不确切了解应该查看什么的情况下没有多大帮助。
条件: 家庭开发、Windows XP Pro、Visual Studio 2008
谢谢!
I've now saved a bit of money for the hardware upgrade. What I'd like to know, which is the easiest way to measure which part of hardware is the bottleneck for compiling and should be upgraded?
Are there any clever techniques I could use? I've looked into perfmon
, but it has too many counters and isn't very helpful without exact knowledge what should be looked at.
Conditions: Home development, Windows XP Pro, Visual Studio 2008
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
问题实际上是“编译期间什么是最大的?”
如果你不想使用 perfmon,你可以使用任务监视器之类的东西。
运行编译。
查看哪些内容已超出上限。
你是否一直使用 100% CPU? 获得更多的CPU——更快或者更多的核心或者其他什么。
你一直都是100%内存吗? 显示屏上哪个数字重要? 您可以购买的唯一内存是“物理”内存。 唯一重要的因素是物理内存。 您在仪表上看到的其他东西不是您购买的东西,它们是对 Windows 工作方式所做的调整。
您是否进行过“大量”I/O? 你无法轻易说出什么是“巨大”,但你可以得出这样的结论。 如果您不使用内存也不使用 CPU,那么您将使用唯一剩下的资源——您受到 I/O 限制并且需要更快的总线——这通常意味着需要一台全新的机器。
更快的 HDD 价值很小或没有价值 - 总线时钟速度是一个限制因素。 总线宽度是另一个限制因素。 没有人会设计出令人讨厌的 I/O 总线,然后在其上装上垃圾 HDD。 通常,他们会根据可用的 HDD 设计适合特定成本目标的总线。
The question is really "what is maxed out during compilation?"
If you don't want to use perfmon, you can use something like the task monitor.
Run a compile.
See what's maxed out.
Did you go to 100% CPU for the whole time? Get more CPU -- faster or more cores or something.
Did you go to 100% memory for the whole time? Which number matters on the display? The only memory you can buy is "physical" memory. The only factor that matters is physical memory. The other things you see on the meter are not things you buy, they're adjustments to make to the way Windows works.
Did you go to "huge" amounts of I/O? You can't easily tell what's "huge", but you can conclude this. If you're not using memory and not using CPU, then you're using the only resource that's left -- you're I/O bound and you need a faster bus -- which usually means a whole new machine.
A faster HDD is of little or no value -- the bus clock speed is one limiting factor. The bus width is the other limiting factor. No one designs an ass-kicking I/O bus and then saddles it with junk HDD's. Usually, they design the bus that fits a specific cost target based on available HDD's.
垃圾。 与它们所连接的 I/O 总线相比,现代 HDD 的速度很慢。 举一个可以最大限度地发挥 SATA 2 接口(现在甚至已经是一代)随机 IOPS 的单个 HDD...当总线能够达到 280MB/s 左右时,硬盘驱动器很幸运能达到 10MB/s。
例如http://www.anandtech.com/show/2948/3。 即使在那里,SSD 的速度也只能达到 50MB/s。 很明显,IOP 不是瓶颈,否则 HDD 的性能将与 SSD 一样好。
我从未见过计算机 IOP 受限而不是 HDD 受限。 它不会发生。
Garbage. Modern HDDs are slow compared to the I/O buses they are connected to. Name a single HDD that can max out a SATA 2 interface (and that is even a generation old now) for random IOPS... A hard drive is lucky to hit 10MB/s when the bus is capable of around 280MB/s.
E.g. http://www.anandtech.com/show/2948/3. Even there the SSDs are only hitting 50MB/s. It's clear the IOPs are NOT the bottleneck otherwise the HDD would do just as much as the SSDs.
I've never seen a computer IOPs bound rather than HDD bound. It doesn't happen.
已经建议使用任务监视器,但 Sys Internals 任务监视器为您提供比内置 Windows 任务监视器更多的信息:
Sys Internals 任务监视器
您可能还想查看 PC 上正在运行的其他哪些程序正在占用内存和/或 CPU 处理能力。 可以删除或仅按需运行影响性能的事物。
Windows XP 仅支持 3GB 内存,您必须打开一个开关,然后
我似乎记得需要编写应用程序才能真正考虑到这一点。
Using the task monitor has already been suggested but the Sys Internals task monitor gives you more information than the built-in Windows task monitor:
Sys Internals task monitor
You might also want to see what other things are running on your PC which are using up memory and / or CPU processing power. It may be possible to remove or only run on demand things which are affecting performance.
Windows XP will only support 3GB of memory using a switch that you have to turn on and
I seem to remember that applications need to be written to actually take this into consideration.