Am I understanding the output of `top` correctly?
I would like to get opinions on whether my interpretation below is accurate;
Assume the following scenario:
Intel server, RHEL5, 4 core cpu with hyperthreading turned on, thus, /proc/cpuinfo represents 8 CPU's.
Aside from standard Linux background processes, assume a single user process is running - say MySQL or other.
With 8 CPU's, the default header in `top` will represent a single threaded user space process using 100% CPU utlization as 12.5%us. (100% / 8 cores = 12.5)
But, in the process list, that same process will show 100% CPU because it is using it's full CPU thread.
If that same process is completely waiting on disk I/O, then the header of `top` will show a 12.5%wa and basically nothing on the CPU usage for us or sy. If this true, does this represent an application issue that it doesn't use multiple CPU's to satisfy disk I/O? Or is this behaviour normal?
My understanding is that, disk i/o is handled by kswapd, and if the requested blocks aren't already in file cache, then it is ultimatley a single threaded process to retrieve the block from disk, and if that is true, doesn't this mean in this example you would never seen wait's higher than 12.5%?
It seems to me difficult to see if you are disk bound from this aspect, because if your server usage basically comes does to a single thread that is I/O hungry, you won't ever seen high %wa in any sar reports or other.
Have I completely missed the mark on understanding this?
|