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 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)Set number of CPU threads to use.
-mmt1- Single thread-mmt2- Two threads-mmt=on- All available threads (default)
-mmt=4Set dictionary size for testing.Example:
-md=32m (32 MB dictionary)Set compression method to test.Example:
-m0=LZMA2 or -m0=PPMdExamples
Basic benchmark
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
Dictionary size (2^N bytes). Larger = more memory, better compression.Example:
22 = 2^22 = 4 MBThroughput in kilobytes per second.
CPU utilization percentage. 100% per thread.Example: 1200% = 12 threads at 100%
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
Optimize for Compression
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.
Related Commands
- Add Command (a) - Real-world compression testing
- Hash Command (h) - Test hashing performance