Skip to main content
The b (benchmark) command tests CPU performance and compression efficiency by compressing and decompressing test data.

Syntax

Description

The benchmark command:
  • Measures compression and decompression speed
  • Tests CPU performance under load
  • Validates multi-threading efficiency
  • Generates reproducible performance data
  • Uses synthetic test data (does not require files)
  • Reports speed in MB/s and MIPS (million instructions per second)

Common Options

number
Number of benchmark passes to run. More iterations provide more accurate results.Default: Runs until Ctrl+C or sufficient data collectedExample: 7z b 10 (run 10 iterations)
number
Set number of CPU threads to use.
  • -mmt1 - Single thread
  • -mmt2 - Two threads
  • -mmt=on - All available threads (default)
Example: -mmt=4
string
Set dictionary size for testing.Example: -md=32m (32 MB dictionary)
string
Set compression method to test.Example: -m0=LZMA2 or -m0=PPMd

Examples

Basic benchmark

Output:

Benchmark with specific thread count

Benchmark single-threaded performance

Run specific number of iterations

Benchmark with custom dictionary size

Benchmark specific compression method

Benchmark PPMd method

Quick benchmark (fewer passes)

Understanding Benchmark Output

Header Information

  • CPU model and specifications
  • Core count (6C) and thread count (12T)
  • Total system RAM
  • Available hardware threads
  • RAM used for benchmark
  • Threads used in test

Performance Metrics

number
Dictionary size (2^N bytes). Larger = more memory, better compression.Example: 22 = 2^22 = 4 MB
number
Throughput in kilobytes per second.
number
CPU utilization percentage. 100% per thread.Example: 1200% = 12 threads at 100%
number
Performance rating in Million Instructions Per Second:
  • R (Rating) - Single-thread equivalent performance
  • U (Usage) - Multi-thread total performance

Compression vs Decompression

  • Compressing - Tests encoding speed
  • Decompressing - Tests decoding speed
  • Decompression is typically faster than compression

Average Scores

  • Avg - Average for compression and decompression separately
  • Tot - Combined total rating (overall performance)

Advanced Benchmarking

Test Multi-Threading Scaling

Compare Compression Methods

Test Different Dictionary Sizes

Continuous Stress Test

Quick Performance Check

Use Cases

System Performance Testing

Test CPU and memory subsystem:

Thermal Testing

Run extended benchmark to test cooling:

Multi-Threading Efficiency

Compare single vs multi-threaded:

Memory Bandwidth Test

Test with large dictionary:

Interpreting Results

Good Performance Indicators

  • High CPU Usage - Near 100% per thread (e.g., 1200% for 12 threads)
  • Consistent Speeds - Little variation between iterations
  • Scaling - Multi-thread rating ≈ single-thread × thread count

Performance Issues

  • Low Usage - CPU not fully utilized (thermal throttling, power limits)
  • Varying Speeds - Inconsistent results (background processes)
  • Poor Scaling - Multi-thread not scaling linearly (memory bandwidth limit)

Benchmark Comparison

Entry-Level CPU

  • Older or low-power CPU
  • 4 threads, moderate performance

Mid-Range CPU

  • Modern mid-range processor
  • 8 threads, good performance

High-End CPU

  • High-end desktop or workstation
  • 16+ threads, excellent performance

Server CPU

  • Multi-socket server
  • 32+ threads, extreme performance

Scripting Examples

Save Benchmark Results

Compare Before/After Performance

Automated Performance Log

Performance Tuning

Optimize for Speed

Smaller dictionary = faster, less memory

Optimize for Compression

Larger dictionary = better compression, more memory

Test Specific Scenario

Benchmark results are relative to the specific CPU and system configuration. They provide a comparison metric but don’t directly predict real-world file compression times.
For consistent results:
  • Close other applications
  • Disable CPU frequency scaling (set to performance mode)
  • Run multiple iterations and average results
  • Ensure adequate cooling
Extended benchmarking can generate significant heat. Ensure your system has adequate cooling before running long benchmark sessions.