DEV Community


Discussion on: Understanding system load and load averages

ferricoxide profile image
Thomas H Jones II

For listing hardware, depending on your Linux instances software loadout, you may have tools like lscpu and dmidecode available to you. Also, ools like mpstat and sar are your friends when it comes to profiling how loaded a system is (sar, especially, is useful when you configure it to collect statistics over time). As you scale-out the number of CPUs, tools like mpstat and sar can tell you how efficiently those CPUs are being used.

While on the surface, it's fair to say "if I have four cores, having a load of 4.0 is similar to having a load of 1.0 on a single-core system," there are scenarios where that's not true. For example, if you have an application that doesn't really take full advantage of multiple cores on a system, you can end up in a scenario where one CPU is getting absolutely thrashed while the others are sitting there twiddling their thumbs.

Similarly, you can end up in scenarios where an application's processes are being bounced across processors so much that they lose efficiencies that they might have realized by having a higher-degree of processor affinity (L1 fetch is more efficient than an L2 fetch; L2 fetch is more efficient than a fetch from RAM ...and you can really end up in the weeds on larger-scale systems with non-uniform memory architectures).