Linux/Compression tools: Difference between revisions

From Wiki
Line 8: Line 8:
! compressed size [MB]
! compressed size [MB]
! time [s]
! time [s]
|-
| cat
| > target
| 6144
| 55.96
|-
|-
| pigz
| pigz
Line 23: Line 18:
| 1667
| 1667
| 28.06
| 28.06
|-
| cat
| > target
| 6144
| 55.96
|-
| copy
|
| 6144
| 59.36
|-
|
|
|
|}
|}



Revision as of 11:38, 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 55.96
copy 6144 59.36


  • 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