Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I figure out whether my process is CPU bound, I/O bound, Memory bound or

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.

like image 429
Rohith Avatar asked Nov 24 '10 06:11

Rohith


People also ask

How do you tell if a process is CPU or IO bound?

CPU Bound. It is easy to see if a system is CPU bound or not. Simply type `htop` at the command line and press enter.

Can a measure of whether a process is likely to be CPU-bound or I O bound be determined by analyzing source code How can this be determined at run time?

An I/O bound process would require a number of read/write operations whereas a CPU bound process would be busy in computations. So, it can be determinate from the source code itself whether the process would be CPU bound or I/O bound.

What is the difference between I O bound and CPU-bound process?

CPU Bound means the rate at which process progresses is limited by the speed of the CPU. A task that performs calculations on a small set of numbers, for example multiplying small matrices, is likely to be CPU bound. I/O Bound means the rate at which a process progresses are limited by the speed of the I/O subsystem.

What is a CPU-bound process?

In computer science, a computer is CPU-bound (or compute-bound) when the time for it to complete a task is determined principally by the speed of the central processor: processor utilization is high, perhaps at 100% usage for many seconds or minutes.


1 Answers

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.

like image 128
Chris Becke Avatar answered Sep 25 '22 15:09

Chris Becke