How to Benchmark Hardware on Linux with 7z LZMA Compression

By | November 28, 2022

The 7z LZMA benchmark runs dummy compression and decompression tasks to measure the overall performance of the system. It reports measurements in MIPS (million instructions per second) which give an idea of the computer's raw processing power counting all factors.

7z LZMA compression is a multi-threaded work-load. This means that it can utilise multiple cores and system's with more cores will tend to perform better in the test.

Since the program measures the overall performance of the system, it is affected by multiple hardware components including:

1. CPU clock
2. CPU core count
3. Hyperthreading support
4. RAM speed/bandwidth (depends on channels and clock frequency)

Improving the capacity of any of above hardware aspects will increase the benchmark score of the 7z LZMA tests, as we shall see in the following sections where we test multiple different machines.

Running the benchmark is extremely simple. Just run the following command and it will run the test and report.

7z b

By default the command runs in multi-core mode and uses all the cores by creating multiple threads. This gives use the multi-core score. It detects and creates as many threads as the system can support. So if you have a 4 core / 8 thread cpu , it will create 8 threads. And if you have a 4 core/4 thread cpu , it will create only 4 threads.

Alternatively it can also run in single core/thread mode which gives us the single core performance of the cpu.

In the following tests we shall run both single and multi core tests.

Benchmarking

We shall be using the following machines. The hardware specs are already known and the performance difference can be reasonably guessed just by looking at the specs.

System CPU Total RAM Channels Clock frequency (Mhz) DDR Speed (MT/s) Total Bandwidth (MT/s)
Acer Swift 3 Laptop i5-1135G7 (4c/8t) 8G+8G 2 2133 4267 8534
Ubuntu desktop i5-7400 (4c/4t) 16G+16G 2 1200 2400 4800
Asus TUF A17 5800H (8c/16t) 8G+8G 2 1600 3200 6400
Acer Aspire 5 5500U (6c/12t) 8G 1 1600 3200 3200

1. Acer Swift 3

This is the first machine which has dual channel ram, running at 4267 MT/s in each channel. The cpu is i5-1135G7 which is quite capable for a ultra-portable laptop.

Multi core test:

acerlight@acerlight-laptop:~$ 7z b

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_IN,Utf16=on,HugeFiles=on,64 bits,8 CPUs 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (806C1),ASM,AES-NI)

11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (806C1)
CPU Freq: - - - - - - - - -

RAM size:   15794 MB,  # CPU hardware threads:   8
RAM usage:   1765 MB,  # Benchmark threads:      8

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:      29002   677   4166  28214  |     266786   780   2919  22756
23:      27468   699   4002  27987  |     261267   776   2914  22609
24:      26734   689   4172  28745  |     258671   777   2921  22703
25:      26731   731   4176  30521  |     256064   781   2918  22789
----------------------------------  | ------------------------------
Avr:             699   4129  28867  |              778   2918  22714
Tot:             739   3523  25791
$
Avg Compression MIPS: 28867
Avg Decompression MIPS: 22714

Single Core

acerlight@acerlight-laptop:~$ 7z b -mmt1

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_IN,Utf16=on,HugeFiles=on,64 bits,8 CPUs 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (806C1),ASM,AES-NI)

11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (806C1)
CPU Freq: 64000000 - - - 128000000 - - - -

RAM size:   15794 MB,  # CPU hardware threads:   8
RAM usage:    435 MB,  # Benchmark threads:      1

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:       5396   100   5250   5250  |      54375   100   4643   4643
23:       4818   100   4910   4910  |      53939   100   4669   4669
24:       4486   100   4824   4824  |      53254   100   4675   4675
25:       4252   100   4855   4855  |      52167   100   4644   4643
----------------------------------  | ------------------------------
Avr:             100   4960   4960  |              100   4658   4657
Tot:             100   4809   4809
acerlight@acerlight-laptop:~$
Avg Compression MIPS: 4960
Avg Decompression MIPS: 4657

2. Ubuntu desktop

This is a Ubuntu desktop machine with i5-7400 cpu (4-core/4-thread)

Multi-core test

$ 7z b

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_IN,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz (906E9),ASM,AES-NI)

Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz (906E9)
CPU Freq: - - - 64000000 - - - - -

RAM size:   32017 MB,  # CPU hardware threads:   4
RAM usage:    882 MB,  # Benchmark threads:      4

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:      14973   332   4384  14566  |     145604   380   3269  12422
23:      14734   343   4383  15013  |     146773   388   3275  12700
24:      14627   351   4483  15727  |     145373   389   3277  12762
25:      14178   351   4609  16188  |     142950   389   3268  12722
----------------------------------  | ------------------------------
Avr:             344   4465  15374  |              387   3272  12651
Tot:             365   3868  14013
enlightened@enlightened:~$

The number of interest is the "Rating MIPS" under the "Compressing" and "Decompressing" column. Higher is better.

Avg Compression MIPS: 15374
Avg Decompression MIPS: 12651

Single-core test

$ 7z b -mmt1

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_IN,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz (906E9),ASM,AES-NI)

Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz (906E9)
CPU Freq: - - - - - - - 1024000000 -

RAM size:   32017 MB,  # CPU hardware threads:   4
RAM usage:    435 MB,  # Benchmark threads:      1

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:       4117   100   4013   4005  |      39906   100   3407   3407
23:       3920   100   3995   3995  |      39599   100   3428   3428
24:       3739   100   4022   4021  |      39110   100   3434   3434
25:       3596   100   4107   4106  |      38478   100   3425   3425
----------------------------------  | ------------------------------
Avr:             100   4034   4032  |              100   3424   3423
Tot:             100   3729   3728
enlightened@enlightened:~$
Avg Compression MIPS: 4032
Avg Decompression MIPS: 3423

3. Asus TUF A17

The next machine is an Asus TUF A17 Laptop, with Ryzen 7 5800H cpu and 16G of ram.

$ 7z b

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,16 CPUs AMD Ryzen 7 5800H with Radeon Graphics          (A50F00),ASM,AES-NI)

AMD Ryzen 7 5800H with Radeon Graphics          (A50F00)
CPU Freq: 64000000 64000000 64000000 64000000 128000000 256000000 512000000 1024000000 2048000000

RAM size:   15456 MB,  # CPU hardware threads:  16
RAM usage:   3530 MB,  # Benchmark threads:     16

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:      49059  1486   3211  47725  |     742860  1587   3992  63359
23:      45872  1469   3183  46738  |     713923  1573   3927  61770
24:      43841  1473   3200  47139  |     692892  1583   3843  60819
25:      41736  1469   3245  47653  |     662160  1569   3756  58930
----------------------------------  | ------------------------------
Avr:            1474   3210  47314  |             1578   3880  61219
Tot:            1526   3545  54266
$

The score on this machine is significantly higher than the Ubuntu desktop because of a more powerful CPU.

Avg Compression MIPS: 47314
Avg Decompression MIPS: 61219

Single-core test

$ 7z b -mmt1

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,16 CPUs AMD Ryzen 7 5800H with Radeon Graphics          (A50F00),ASM,AES-NI)

AMD Ryzen 7 5800H with Radeon Graphics          (A50F00)
CPU Freq: 21333333 64000000 64000000 64000000 128000000 128000000 512000000 1024000000 2048000000

RAM size:   15456 MB,  # CPU hardware threads:  16
RAM usage:    435 MB,  # Benchmark threads:      1

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:       6843   100   6657   6657  |      64387   100   5497   5497
23:       5671   100   5779   5779  |      63788   100   5522   5522
24:       5052   100   5433   5432  |      63104   100   5540   5540
25:       4724   100   5395   5394  |      61806   100   5501   5501
----------------------------------  | ------------------------------
Avr:             100   5816   5816  |              100   5515   5515
Tot:             100   5666   5665
$
Avg Compression MIPS: 5816
Avg Decompression MIPS: 5515

4. Acer Aspire 5

Multi-core:

ubuntu@ubuntu:~$ 7z b

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,16 CPUs AMD Ryzen 5 5500U with Radeon Graphics          (860F81),ASM,AES-NI)

AMD Ryzen 5 5500U with Radeon Graphics          (860F81)
CPU Freq: 64000000 64000000 64000000 64000000 128000000 128000000 512000000 512000000 1024000000

RAM size:    7291 MB,  # CPU hardware threads:  16
RAM usage:   3530 MB,  # Benchmark threads:     16

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:      24283  1164   2030  23623  |     460633  1163   3378  39288
23:      22285  1158   1960  22706  |     427576  1153   3210  36994
24:      20751  1144   1950  22312  |     419790  1177   3131  36847
25:      18870  1154   1867  21546  |     390070  1141   3044  34715
----------------------------------  | ------------------------------
Avr:            1155   1952  22547  |             1158   3190  36961
Tot:            1157   2571  29754
ubuntu@ubuntu:~$
Avg Compression MIPS: 22547
Avg Decompression MIPS: 36961

Single-core test

ubuntu@ubuntu:~$ 7z b -mmt1

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,16 CPUs AMD Ryzen 5 5500U with Radeon Graphics          (860F81),ASM,AES-NI)

AMD Ryzen 5 5500U with Radeon Graphics          (860F81)
CPU Freq: 64000000 64000000 64000000 32000000 64000000 256000000 512000000 1024000000 2048000000

RAM size:    7291 MB,  # CPU hardware threads:  16
RAM usage:    435 MB,  # Benchmark threads:      1

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:       4304   100   4187   4187  |      52658   100   4496   4496
23:       3934   100   4009   4009  |      51998   100   4501   4501
24:       3739   100   4021   4020  |      51008   100   4478   4478
25:       3551   100   4056   4055  |      50144   100   4464   4463
----------------------------------  | ------------------------------
Avr:             100   4068   4068  |              100   4485   4485
Tot:             100   4277   4276
ubuntu@ubuntu:~$
Avg Compression MIPS: 4068
Avg Decompression MIPS: 4485

Comparison

Now its time to compare the score. The MIPS numbers for all machines have been put together below.

Machine MIPS Compression (Multi-Core) MIPS Decompression (Multi-core) MIPS Compression (Single-core) MIPS Decompression (Single-Core)
Acer Swift 3 28867 22714 4960 4657
Ubuntu Desktop 15374 12651 4032 3423
Asus TUF A17 47314 61219 5816 5515
Acer Aspire 5 22547 36961 4068 4485

The multi-core scores vary greatly when there is a big difference in the number of cores/threads. This is simply because compression algorithms benefit directly from more cores.

However the single-core scores are decently close.

When running the tests, all cpu cores are pushed to 100% usage which shows that the program is heavily multi-threaded.

Tell us your score

Go ahead and run the 7z benchmark on your system and paste the benchmark report below in the comment box below. This will help other readers get an idea of how their system compares against other systems.

There is an official list of scores of various different systems maintained at https://www.7-cpu.com/, but the list contains very outdated hardware and machines.

To learn more about the benchmark command check this page and the man page for 7z.

Links and Resources:

https://openbenchmarking.org/test/pts/compress-7zip-1.10.0
About Silver Moon

A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected].

Leave a Reply

Your email address will not be published. Required fields are marked *