181 points · by benjacksondev · 1y ago · 40 comments
There is no shorter command to show uptime, load averages (1/5/15 minutes), logged in users. Essential for quick system health checks!
You always want the load average to be less than the total number of CPU cores. If higher, you're likely experiencing a lot of waits and context switching.
[1] https://www.brendangregg.com/blog/2017-08-08/linux-load-aver...
Note that synchronous I/O completion checks for previously submitted asynchronous I/Os (both with libaio and io_uring) do not contribute to system load as they sleep in the interruptible sleep (S) mode.
That's why I tend to break down the system load (demand) by the sleep type, system call and wchan/kernel stack location when possible. I've written about the techniques and one extreme scenario ("system load in thousands, little CPU usage") here:
https://tanelpoder.com/posts/high-system-load-low-cpu-utiliz...
What is a 'good load' depends on the application and how it works. Some servers something close to 0 is a good thing. Other servers a 10 or lower means something is seriously wrong.
Of course if you don't know what is a 'good' number or you are trying to optimize a application and looking for bottlenecks then it is time to reach for different tools.
https://nicolargo.github.io/glances/
I have also hacked basic top to add database login details to server processes.
I have pulled out a few miracles using these tools (identifying kernel bottlenecks or profiling programs using ebpf) and it has been well worth the investment to read through the books.
People thought I was a wizard lol.
It is excellent and contains most things you could need. Downside is that it isn't yet a standard tool so you need to get it installed across your fleet
Especially SSDs are treated like magic storage devices with infinite IOPS at Planck-scale latency.
Until you discover that SSDs that can do 10GB/s don't do nearly so well (not even close) when you access them in a single thread with random IOPS, with queue depth of 1.
Previous discussions: https://news.ycombinator.com/item?id=10654681 https://news.ycombinator.com/item?id=10652076
Linux Performance Analysis in 60,000 Milliseconds - https://news.ycombinator.com/item?id=10652076 - Nov 2015 (11 comments)
Linux Performance Analysis - https://news.ycombinator.com/item?id=10654681 - Dec 2015 (82 comments)
Linux Performance Analysis in 60k Milliseconds (2015) [pdf] - https://news.ycombinator.com/item?id=44070741 - May 2025 (1 comment)
$ free -m
total used free shared buff/cache available
Mem: 3915 2116 1288 41 769 1799
Swap: 974 0 974Wait a minute. I thought Netflix famously ran FreeBSD.
I always use a configured!(F2) htop (not mentioned as well). Always enable PSI information in htop (some red hat systems I work with still don't offer them...).
If you have zfs enable those meters as well and htop has an io tab, use it!
Today, you'd want something like:
Prometheus + Node Exporter [1]