Wednesday, September 14, 2016

7-Zip benchmark - 7Z vs ZIP

It took a little bit longer than I expected, but the first benchmark using Benchroom is done! So here it is!

The goal of this benchmark is to find out how various archive formats with different compression algorithms behave when compressing different types of input. I made the tests using 7-Zip (version 16.02 64bit), I tested ZIP and 7Z (LZMA compression) with different levels. Each test combination was ran 4 times and the results were averaged.

System parameters


The benchmark was executed on following system:
Laptop Acer TimelineX 5820TG
CPU: Intel Core i5 M460 2C/4T @ 2.53 GHz
RAM: 4GB DDR3 1067 MHz
SSD: Kingston SSDNow V300 128GB
OS: Windows 10 (10.0.14393.105)

Little bit older hardware, I know, but the main point I am trying to show is to compare speed of various archive formats.

Large text file


First benchmark consisted of compressing one 109 MB text file. I used SQL dump from Wikipedia (skwiki-20160820-categorylinks.sql), which consist of mostly printable characters.

Here is the graph which I believe will provide answers to most questions:

Compressing large text file using 7-Zip

Many various files


Second benchmark consisted of compressing directory with 86 subfolders and 6 131 files, total size 54.2 MB . I used FFMpeg source tree from 2 Sep 2016.

Linux image size


Third benchmark consisted of compressing 3.74 GB file with Linux filesystem, I used 2016-05-27-raspbian-jessie.img.

Results

  • Clear winner is 7Z format (native for 7-Zip). Levels 1 and 3 will provide good compression quite fast.
  • Use ZIP only when you have to transfer the files to systems where 7Z format is not an option. Otherwise, 7Z with lowest compression level will provide smaller file than ZIP with highest compression level, for 15x-70x less time. Amazing.
  • Difference between 7Z compression levels 7 and 9 is almost non-existing. The result archive sizes were the same in all 3 cases, with run times difference on edge of significance.
  • Similarly, difference in size between ZIP compression level 1 and 3 is none, difference in time is almost none.
Note for graphs: Please watch X and Y axis, they are not always linear and they don't necessary start at 0. I promise I will provide nicer graphs next time.

No comments:

Post a Comment