observability, benchmarking, tuning, static performance tuning, profiling, and tracing
-
uptime
- Useful for CPU load averages (no of processes wanting to run)
- High Level idea of system usage, moving sum average of 1, 5, 15 minute.
- "High level" because gives some idea of how the load is changing on a system, i.e. if the load average at 1 min is more than that of 15 min, the load is increasing, or if reverse then load is decreasing. If load is 0.0, then CPU is idle
- Load averages : CPU demand, ie number of threads which are waiting to run on the CPU
-
dmesg | tail
- Lists system messages, errors messages related to performance measures can be looked from here
-
vmstat
- summary of servers memory utilization statistics, short for virtual memory stat
- Columns:
- r: number of process waiting to run on CPU. Value greater than CPU count means saturation of the server.
- free : free memory in kilobytes. Alternative, more elaborate, free
- si, so: Page in and page out (paging~swapping). When pages are written into disk from memory, it is pageout. Page in, when data(process data) is brought from disk to memory, in the forms of pages. Pageins are fine, application initialization will have page-ins. Too many page-out indicate that kernel might be spending too much time managing than application processing (thrashing). In case of constant pageouts, check process occupying cpu the most using ps command.
- us, sy, id, wa, st : CPU times : user time, system time (kernel), idle, wait I/O, and stolen time.
vmstat 1 mpstat -P ALL 1 pidstat 1 iostat -xz 1 free -m sar -n DEV 1 sar -n TCP,ETCP 1 top