Linux Performance Tracking
When it comes to performance tracking on a Linux server, there are tons of useful utilities; enough to where it becomes difficult to know what to use when. The purpose of this article is to offer advice and tips on how to track various performance metrics.
Top is an ubiquitous utility in the Unix admins arsenal. It is provided by the procps package and is available by default on just about every major Linux distribution. It displays process info in real-time, both about the system as a whole and about individual processes. For this particular guide, we are mostly concerned with a particular line (or lines if you have a multi-core/processor system), reading:
Cpu(s): 4.2% us, 0.6% sy, 0.0% ni, 94.9% id, 0.9% wa, 0.0% hi, 0.0% si
- Percent cpu being used by userland code
- Percent cpu being used by kernelspace code
- Like “us” but related to “niced” processes
- Idle percent
- CPU is idle because it waits for IO to complete
- Interrupts generated by hardware
- Interrupts generated by software
As the value of wa increases, there is more and more CPU time being spent waiting for system I/O to finish (harddrives/disks). Values of even as much as 0.5% have been known to cause slowing on older SATA and PATA drives. This number will almost always be >1% when your server is using swap space (more on that later). Next we'll cover how to get more information about what in particular might cause undesirable wa percentages.