Why 7-Zip Dictionary Size Matters in Hardware Benchmarking
The 7-Zip built-in benchmark is a widely used tool for evaluating the performance of computer hardware, specifically focusing on the central processing unit (CPU) and random-access memory (RAM). A critical parameter within this benchmark is the dictionary size, which dictates the amount of memory the program allocates to find and process repetitive data patterns. Understanding the significance of the dictionary size is essential for accurate hardware testing because adjusting this single setting shifts the performance bottleneck between the processor's internal cache, the system memory's speed and latency, and the overall RAM capacity.
What is the Dictionary Size?
7-Zip uses the LZMA (Lempel-Ziv-Markov chain) algorithm to compress data. Instead of writing the same data multiple times, the algorithm looks backward through the uncompressed data to find matching patterns and replaces them with shorter references.
The dictionary size is the maximum distance the algorithm will look backward to find these matches. A larger dictionary allows 7-Zip to look further back, which generally results in a smaller final file size, but requires significantly more computing power and system memory to process.
Shifting the Bottleneck: CPU Cache vs. System RAM
In hardware benchmarking, the dictionary size determines whether you are primarily testing the CPU or the system RAM.
- Small Dictionary Sizes (e.g., 4 MB to 16 MB): When the dictionary size is small, the working data can fit entirely inside a modern CPU's fast L3 cache. Because the CPU does not need to fetch data from the slower system RAM as frequently, the benchmark primarily measures raw CPU core performance and cache speeds.
- Large Dictionary Sizes (e.g., 32 MB to 128 MB+): When the dictionary size exceeds the capacity of the CPU's L3 cache, the processor is forced to constantly read and write data to the system RAM. In this scenario, the benchmark heavily tests memory bandwidth and RAM latency. A fast CPU paired with slow RAM will score poorly when using a large dictionary size.
Impact on System Memory Capacity
The dictionary size directly controls the memory footprint of the benchmark. However, the actual RAM used is not a 1:1 ratio with the dictionary size, especially during compression.
During the compression test, 7-Zip requires memory equal to roughly 10 to 11 times the dictionary size per thread group. For example, selecting a 64 MB dictionary size can easily consume several gigabytes of RAM across a multi-core processor. If a user sets the dictionary size too high and exceeds the physical RAM installed in the computer, the benchmark will either fail to run or force the operating system to use the storage drive as virtual memory (page file), drastically ruining the benchmark scores.
Compression vs. Decompression
The dictionary size affects the two phases of the 7-Zip benchmark differently:
Compression
Compression is extremely sensitive to dictionary size. Increasing the dictionary size makes the CPU work harder to search through a larger pool of data for matches. As a result, a larger dictionary size usually decreases the compression speed (measured in KB/s) and drops the overall MIPS (Million Instructions Per Second) rating, because the CPU spends more time waiting on system RAM.
Decompression
Decompression is much less sensitive to dictionary size and RAM speed. During decompression, the CPU does not need to search for patterns; it simply follows the instructions already written in the compressed file. Therefore, the decompression benchmark remains primarily a test of raw CPU integer performance, core count, and clock speed, regardless of the dictionary size, provided the system has enough physical RAM to hold the dictionary itself (a 1:1 ratio).
The Need for Standardization
Because changing the dictionary size alters how the hardware is stressed, benchmark results are only comparable if they use the exact same dictionary size.
By default, the 7-Zip benchmark defaults to a 32 MB dictionary size (provided the system has enough RAM). Hardware reviewers almost universally stick to this 32 MB standard. It serves as a balanced middle ground that is large enough to spill out of the L3 cache on most consumer CPUs—thereby testing both the processor and the RAM—while remaining small enough to run on systems with 8 GB or 16 GB of memory without crashing.