General Linux performance troubleshooting

Here's a list of commands that you should execute and then share the output to someone who can help you figure out what resource is the bottleneck in your system. Note, it requires the sysstat and procps packages (ubuntu and RHEL and its derivatives):
  • vmstat 1 10
  • iostat -xN 2 10
  • mpstat -P ALL 3 10
The first one is mostly used to tell if the system is swapping or not. If you see numbers in the 'si' and 'so' columns, your system is most likely swapping (using the hard drive as RAM), which usually slows performance a lot.

The second one is mostly used to determine if your disk subsystem is not able to cope with the load. If you see one or more lines that shows 100 or close almost constantly, it is probably the case.  If it is your swap volume, you probably saw numbers in the 'si' and 'so' columns in the vmstat output.

The third one shows the % of the CPU time used by different functions of the server. I'll explain the most used ones, in my experience: %usr is applications (usually), %nice is for niced (changed priority) tasks, %sys is kernel tasks like forks and threads creation, %iowait is time spent waiting for disk. See man mpstat for more information.

Comments

Popular posts from this blog

General linux performance troubleshooting

Asterisk works under OpenVZ (no zaptel)