Design history
All Stressors Run on All CPUs
Every stressor of the stressor suite now runs with one worker and then with one
worker per CPUCPU: Central Processing UnitThe general-purpose processor of a computer, which runs the operating system and programs. A CPU has one or more physical cores, and with SMT each core runs two or more hardware threads.WikipediaGlossary. Before, only a subset of 23 stressors also ran with all CPUs:
10 compute stressors (cpu, matrix, cache, stream, memcpy, vecmath,
zlib, hash, crypt, malloc) and 13 hypervisor stressors. The subset
lists are still defined in run_stressng_benchmarks.py, but no longer used.
Stressor Suite and stress-ng 0.20.01
The image moved from stress-ngstress-ngAn open-source tool that loads a computer in selectable ways, with hundreds of stress tests (stressors) that exercise the CPU, memory, file systems, and kernel interfaces. With --metrics, it reports each stressor's throughput in bogo ops/s.stress-ng on GitHubGlossary 0.17.08 to 0.20.01, and added
run_stressng_benchmarks.py, which runs 85 curated stressors in seven
categories and prints bogo ops/s as JSONJSON: JavaScript Object NotationA text format for structured data, built from objects (key-value pairs), arrays, strings, numbers, booleans, and null. Most languages and tools read and write it, which makes it a common format for API responses and benchmark output.JSONGlossary.
CPU Scaling Loop with div16
The CPU scaling loop runs the cpu stressor with the div16 method. After
running every --cpu-method on selected x86_64AMD64The 64-bit version of the x86 instruction set architecture, introduced by AMD in 2003 and also implemented by Intel, which runs most cloud servers. Linux distributions and Docker name it amd64 or x86_64.WikipediaGlossary and Arm servers, with and
without SMTSMT: Simultaneous MultithreadingA CPU technique that runs two (or more) hardware threads on one physical core, sharing its execution units, e.g. Intel Hyper-Threading. It raises throughput when a thread stalls, but the threads compete for the core. Cloud vendors usually sell each thread as a vCPU.WikipediaGlossary (Simultaneous Multithreading), div16 was the method whose
scaling matched expectations. Other
methods showed either lower or higher scaling than expected:
- On a 2 vCPUvCPU: virtual CPUA CPU of a virtual machine, the unit in which cloud vendors sell compute. It is usually one hardware thread of a physical core with SMT, so two vCPUs may share one physical core.WikipediaGlossary server with SMT,
div16gave about 1x the single-worker throughput with two workers; other methods gave up to 1.8x. - On SMT servers with many cores, other methods gave either very low scaling (about 50x the single-worker throughput on a server with 64 cores) or very high scaling (about 130x on a server with 64 cores and 128 threads).