0 votesby askubuntu.com/users/682596written 2020-10-27
I usually go:
sudo apt install iotop htop # Ubuntu/debian based systems
or
sudo yum install iotop htop # Redhat/RPM based systems
Then have a quick look at htop - is the system swapping (fully filled memory bar)? If so, you want to fix that first. Swapping is super expensive in terms of performance.
If the system is not swapping, check out the cpu bars. Are they near 100% most of the time? Well, then your CPU is busy :)
Next, quit htop and start sudo iotop and check the top right numbers (total and actual disk write). How high are they?
If they about match the maximum reasonable throughput of your disk which is being read from / written too (and usually write operations are the bottleneck as disk write speeds are almost always lower then read speeds), then your IO is busy :)
Note I am referring to the actual reasonable throughput on your disk (what you were to approximately get if you copied a set of files manually when the server was otherwise idle), NOT the "label" performance, which is often impossible to achieve to start with.
Thus, doing a few simple check, you worked out if your system is memory, cpu or disk bound. If you want more detailed numbers or analysis, checkout some of the other tools, but this gives you a basic idea, which is often sufficient to help you scale etc.