Monday, September 19, 2011

Identifying System Bottlenecks (vmstat)

You want to determine if a server performance issue is specifically related to disk I/O, CPU, memory, or
Use vmstat to determine where the system is resource-constrained. For example, the following

command reports on system resource usage every five seconds on a Linux system:

$ vmstat 5 

The output of vmstat  helps to determine if the performance bottleneck is related to CPU, memory, or disk I/O.

Below table describes the columns available in the output of vmstat.

r  Number of processes waiting for run time
b  Number of processes in uninterruptible sleep
swpd  Amount of virtual memory
free  Amount of idle memory
buff  Amount of buffer memory
cache  Amount of cache memory
inact  Amount of inactive memory (-a option)
active  Amount of active memory (-a option)
si  Amount of memory swapped from disk/second
so  Amount of memory swapped to disk/second
bi  Blocks read/second from disk
bo  Blocks written/second to disk
in  Number of interrupts/seconds
cs  Number of context switches/second
us  CPU time running non-kernel code
sy  CPU time running kernel code
Id  CPU time idle
wa  CPU time waiting for I/O
st  CPU time taken from virtual machine

No comments:

Post a Comment