Linux OS Performance

How do you figure out what's going wrong with a VM?

Still working on building this page..

Here's a list of commands that I find useful when debugging issues around the performance of Linux VMs when an application is running slow. Through these commands, I try to get a good idea of what might causing the slow performance of the OS and the application.

Check the server load

uptime 
#Check load averages to see if anything seems odd.

Check the RAM and CPU usage at a glance with processes

htop
#Check if the CPU and the RAM usages are maxing out.

List processes that might seem

ps aux | grep <PID/Process Name>

Check the RAM utilization

vmstat -Sm 1
#Check r, free, buff, cache, us, sy

Check the disk performance

iostat -xmdz 1
#Workload (r/s, w/s, rMB/s, wMB/s), Resulting Performance( avgqu-sz, await, svctm, %util),

Check the processor performance

Check the amount of free and cached memory

Check the network I/O

Check the network performance

Check the network interface performance

Check the process stats

Trace System Calls

Trace Network Packets

Trace Kernel Message

References: I have compiled this list through Brendan Greggs's talk and slide deck. He is a legend in this space. Find him here.

Last updated