Legacy Benchmarks
This image bundles four independent benchmarking tools that measure general
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 and memory performance: OpenSSL's openssl speed, LMbenchLMbenchA suite of portable micro-benchmarks for Unix-like systems, written by Larry McVoy and Carl Staelin. Its tools each measure one basic operation, such as memory bandwidth and latency, context switches, or system call overhead.LMbenchGlossary's bw_membw_memThe memory bandwidth tool of LMbench. It moves data through a buffer of a given size in one of several modes, such as rd (read and sum an array), wr (write a constant to each element), rdwr (read, then write the same location), and the copy modes cp, fcp, and bcopy. It reports the buffer size in MB and the bandwidth in MB/s; with -P, it runs several processes, each with its own buffer, and reports their total bandwidth.`bw_mem` manualGlossary
(memory bandwidth tool), a set of Python compression libraries, and
GeekbenchGeekbenchA cross-platform CPU and GPU compute benchmark by Primate Labs. Its CPU benchmark runs workloads modeled on real applications, such as file compression, image processing, and web browsing, first on one core and then on all cores, and reports a Single-Core and a Multi-Core score. Geekbench 6 scores are calibrated so that a baseline system scores 2500.GeekbenchGlossary 6. Each tool has its own script, and each run of the image runs one
script. These are the legacy benchmarks: the first ones Spare Cores collected,
before each new benchmark got an image of its own.
The tools report the following:
- OpenSSL speed: Throughput in bytes per second per algorithm and block size.
bw_mem: Memory bandwidth in MB/s per operation and buffer size.- Compression: Ratio and throughput per compressor, level, and thread count.
- Geekbench: Single-Core and Multi-Core scores.
Purpose
Spare Cores Navigator publishes empirical performance measurements for more than 5,000 cloud server types. This image provides several of the Navigator's general-purpose measurements: OpenSSL speed, memory bandwidth, compression algorithms, and Geekbench scores.
Each script is a separate production task that the Navigator's Inspector runs on its own, so a result from one script does not depend on the others.
Limitations
These results compare CPU and memory performance on fixed, synthetic workloads, not disk, network, or application throughput. The main limitations are the following:
- Disk and Network: The scripts measure CPU and memory, not disk or network performance. The compression benchmark reads its input into memory before it starts timing.
- Application Performance: Each script runs a fixed, synthetic workload: one hash or cipher at a time, one memory access pattern, one compressor on one file, or Geekbench's fixed suite. The results compare server types on these workloads; they do not predict the throughput of a specific application.
- Compression Input: The
compression benchmark uses one text file of the Silesia corpusSilesia corpusA set of 12 files, ~211 MB in total, compiled by Sebastian Deorowicz at the Silesian University of Technology to test lossless compression on a mix of data types: text, executables, databases, images, and XML. Its
dickensfile holds the collected works of Charles Dickens, ~10 MB of English text.Silesia corpusGlossary, not the whole corpus, so its results describe text only. - Parallelism: OpenSSL speed and
bw_membw_memThe memory bandwidth tool of LMbench. It moves data through a buffer of a given size in one of several modes, such asrd(read and sum an array),wr(write a constant to each element),rdwr(read, then write the same location), and the copy modescp,fcp, andbcopy. It reports the buffer size in MB and the bandwidth in MB/s; with-P, it runs several processes, each with its own buffer, and reports their total bandwidth.`bw_mem` manualGlossary run one process per logical CPU, while the compression benchmark runs at most one process per physical core. - Geekbench Server Range: Production runs Geekbench only on servers with up to 32 vCPUsvCPU: 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 and at least 2.1 GiB of memory. The image enforces neither.
- Tool Versions: The image builds OpenSSL 3.4.0 with many algorithms disabled and installs the Python compression libraries unpinned, so library versions can change between builds. See also OpenSSL Build.
Usage
Run the image via Docker with the script to run as the command; the image has no default command:
docker run --rm --privileged ghcr.io/sparecores/benchmark:main openssl.sh
docker run --rm --privileged ghcr.io/sparecores/benchmark:main bw_mem.sh
docker run --rm --privileged ghcr.io/sparecores/benchmark:main python /usr/local/bin/compress.py
docker run --rm --privileged ghcr.io/sparecores/benchmark:main geekbench.sh
The openssl.sh and bw_mem.sh scripts run their tools at high priority with
nice -n -20niceA Unix command that runs a program with a changed scheduling priority, from -20 (highest) to 19 (lowest). Raising a process's priority above the default needs the CAP_SYS_NICE capability, which root has.man pageGlossary, which requires --privileged. Production also runs
compress.py and geekbench.sh at high priority. See
Production Setup before comparing
results with the Navigator's.
The geekbench.sh script does not upload results to the Geekbench BrowserGeekbench BrowserThe online database of Geekbench results run by Primate Labs. The free version of Geekbench uploads every result there, where it is public; the paid Pro version can also keep results offline.Geekbench BrowserGlossary: it
captures Geekbench's upload on a local HTTPSHTTPS: Hypertext Transfer Protocol SecureHTTP, the protocol of the web, encrypted with TLS. It protects requests and responses from eavesdropping and tampering, and its certificates let clients verify the identity of the server.WikipediaGlossary server inside the container. See
Upload Capture for how the capture works.
In production, the median run takes the following time:
openssl.sh: ~4 minutesbw_mem.sh: ~4 minutesgeekbench.sh: ~6 minutescompress.py: ~11 minutes
See Run Duration for the measured medians.
Settings
The scripts take no arguments; their benchmark settings are fixed in the
scripts. The only optional setting is BENCHMARK_SECRETS_PASSPHRASE. It
decrypts a Geekbench license shipped in the image. Geekbench runs without a
license if the variable is unset.
According to Geekbench, the license does not affect the scores. See the environment-variable reference for all variables.
Results
Each script prints its results to stdoutstdoutThe standard output stream of a process, one of the three standard streams with stdin and stderr. Programs write their results to it; a shell can redirect it to a file or another program, such as > results.jsonl, while logs on stderr still reach the terminal.WikipediaGlossary in its own format:
openssl.shprints rawopenssl speed -mroutput for each algorithm, after a delimiter lineALGO: <args> ---....bw_mem.shprints one line per successful run,<op> <size> <bandwidth>, with the buffer size in MB and the bandwidth in MB/s summed over all processes.compress.pyprints one 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 object withratio,compress, anddecompressper compressor, level, thread count, and extra arguments.geekbench.shprints Geekbench's console report to stdout, and the full result document as JSON to stderrstderrThe standard error stream of a process, one of the three standard streams with stdin and stdout. Programs write logs, progress, and error messages to it, so that they stay separate from the output on stdout when the output is redirected to a file or another program.WikipediaGlossary.
Each link leads to the fields and units of that format.
Workloads
The image runs the following benchmarks, one per script, each with its own page:
- OpenSSL Speed (
openssl.sh): Measures the throughput of 11 hash and cipher algorithms with one process per logical CPU. - Memory Bandwidth (
bw_mem.sh): Measures read, write, and read-write bandwidth over 11 buffer sizes from16kto512M, with one process per logical CPU. - Compression (
compress.py): Measures eight compressors at several levels on one thread and with at most one process per physical core. - Geekbench (
geekbench.sh): Runs Geekbench 6.7.1's own Single-Core and Multi-Core suites.
Design History
The way production collects Geekbench results changed several times, without affecting the scores:
- Production first used Geekbench Pro, which can save results locally in a machine-readable format, for easy data ingestion.
- Geekbench Pro does not support the Arm preview build, so production uploaded the results to the Geekbench BrowserGeekbench BrowserThe online database of Geekbench results run by Primate Labs. The free version of Geekbench uploads every result there, where it is public; the paid Pro version can also keep results offline.Geekbench BrowserGlossary and parsed them from the result page, first on Arm, then on all servers.
- When the Geekbench Browser added Cloudflare bot detection, production switched to parsing the results Geekbench prints locally, as a backfill for results it could not parse.
- The image now captures the upload on a local HTTPSHTTPS: Hypertext Transfer Protocol SecureHTTP, the protocol of the web, encrypted with TLS. It protects requests and responses from eavesdropping and tampering, and its certificates let clients verify the identity of the server.WikipediaGlossary server inside the container; see Upload Capture.
Production still runs the x86_64 build with the Pro license, and the Arm
preview build without a license.
References
See the full list of references used in this documentation.