This is a question asking myself a lot. So I decided to test some of the tools out there. This is far from scientific but it is “real world”. I say real world because I performed these tests on a fairly recent computer using a recent Linux distribution.
- Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz
- 2 x Kingston KVR800D2N5/2G
- Seagate ST3500418AS SATA hard drive
- Ubuntu 9.04 with Linux kernel 2.6.28-15-generic
The tools I tested are:
- Zip 2.32
- lzop v1.02rc1
- rzip 2.1
- lzma 4.32.0beta3
These are the versions that a supplied with Ubuntu.
Here are the results:
File size(bytes) Real User Sys uncompressed: 1,068,003,328 zip -v : 282,629,082 1m6.989s 1m5.960s 0m0.900s zip -9v : 279,944,734 5m1.305s 4m59.827s 0m1.000s lzop -kv : 379,149,417 0m7.493s 0m6.388s 0m0.796s lzop -kv9 : 316,400,603 6m34.780s 6m33.749s 0m0.796s rzip -kP : 206,314,985 2m12.169s 2m7.360s 0m3.760s rzip -9kP : 203,188,495 2m37.109s 2m32.354s 0m4.516s lzma -kv : 158,260,394 14m44.897s 14m38.183s 0m6.220s lzma -9kv : 153,505,470 19m3.697s 18m56.691s 0m1.356s
The file used for the tests was a Sybase 11 database dump. Times were calculated using the time command.
The original idea for this came from the Linux Journal article Compression Tools Compared by Kingsley G. Morse Jr. available at http://www.linuxjournal.com/article/8051.