Linux/Compression tools: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 14: Line 14:
| 1526
| 1526
| 259.65
| 259.65
| 533
|-
|-
| pigz
| pigz
Line 19: Line 20:
| 1667
| 1667
| 28.06
| 28.06
| 674
|-
|-
| cat  
| cat  
Line 35: Line 37:
| 1333
| 1333
| 359.66
| 359.66
| 340


|-
|-
Line 48: Line 51:
| 1137
| 1137
| 551.40
| 551.40
| 144


|-
|-
Line 54: Line 58:
| 1006
| 1006
| 788
| 788
| 13


|}
|}

Revision as of 13:45, 18 November 2012

benchmark

  • Compressing 6144MB kvm image
Command Arguments compressed size [MB] time [s] additional size [MB]
pigz --best 1526 259.65 533
pigz --fast 1667 28.06 674
cat > target 6144 60.80
copy 6144 59.36
7z a -t7z -mx1 -si 1333 359.66 340
7z a -t7z -mx9 -si 993 1360.15 0
7z a -m0=lzma2 -si 1137 551.40 144
7z a -mx9 -m0=lzma2 -mmt4 -si 1006 788 13


  • 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