![Lead Image © Lucy Baldwin, 123RF.com Lead Image © Lucy Baldwin, 123RF.com](/var/ezflow_site/storage/images/archive/2023/75/creating-load-for-fun-and-profit/perf_dojo_123rf_9719495_lucybaldwin_resized.png/204659-1-eng-US/Perf_Dojo_123RF_9719495_LucyBaldwin_resized.png_medium.png)
Lead Image © Lucy Baldwin, 123RF.com
Creating load for fun and profit
Stressing Out
I have discussed load-generating tools on these pages from the very beginning [1] out of simple practical necessity. Setting aside the benchmarks themselves, the facility generating a load consistently over and over again is the most important tool in a performance tester's arsenal. Amos Waterland's stress
[2] has long been my go-to tool because of its simple, reliable effectiveness, but I have been watching with interest Colin King's promising stress-ng
[3] since our time together on the Ubuntu Server team. Time to take the challenger out for a spin!
The New King
The newer stress-ng
tool can be promptly installed with
sudo apt install stress-ng
in Ubuntu Server versions dating as far back as 2015. Insuring a system is exercised consistently during testing is the tool's primary mission, validating software response as well as hardware reliability and its behavior under load. The latest release provides a menagerie of 300 stressors crafted to load the CPU (with a variety of more than 80 tests), memory and CPU caches, filesystems, and even the virtual memory system.
The original stress
syntax remains valid, and one can start up resource stressors in the same fashion. Figure 1 shows one such example, including the first notable difference. The tool itself originated as a load generator, but it also outputs results that can be construed as a benchmark of sorts. The maintainer advises against using stress-ng
as a precise benchmark on the project's web page, but he also points out that these metrics can be useful to monitor relative regression between operating system (OS) versions,
Buy this article as PDF
(incl. VAT)