Linux/Compression tools: Difference between revisions

From Wiki
Line 32: Line 32:
| 7z  
| 7z  
| a -t7z -mx1 -si
| a -t7z -mx1 -si
|  
| 1333
|  
| 359.66


|-
|-
| 7z  
| 7z  
| a -t7z -mx9 -si
| a -t7z -mx9 -si
|  
| 993
|  
| 1360.15


|-
|-
| lzma
| 7z 
|  
| a -m0=lzma2 -se
|  
| 1137
|  
| 551.40


|-
|-

Revision as of 12:58, 18 November 2012

benchmark

  • Compressing 6144MB kvm image
Command Arguments compressed size [MB] time [s]
pigz --best 1526 259.65
pigz --fast 1667 28.06
cat > target 6144 60.80
copy 6144 59.36
7z a -t7z -mx1 -si 1333 359.66
7z a -t7z -mx9 -si 993 1360.15
7z a -m0=lzma2 -se 1137 551.40
lzma


  • benchmark script
#!/bin/bash
COMPRESSCMD="pigz -9"
DESC="pigz-best"

START=$(date +%s.%N)
cat image.img | $COMPRESSCMD > /backup/$DESC.img.gz
END=$(date +%s.%N)
DIFF=$(echo "$END - $START" | bc)
echo "$DIFF" > /backup/$DESC.log