Linux/Compression tools: Difference between revisions

From Wiki
Line 6: Line 6:
! Command
! Command
! Arguments
! Arguments
! compressed size
! compressed size [MB]
! time
! time [s]
|-
|-
| cat  
| cat  
| > target
| > target
| 6144M
| 6144
| 55.96s
| 55.96
|-
|-
| pigz
| pigz
| --best
| --best
| 1526M
| 1526
| 259.65s
| 259.65
|-
|-
| pigz
| pigz
| --fast
| --fast
| 1667M
| 1667
| 28.06s
| 28.06
|}
|}



Revision as of 11:33, 18 November 2012

benchmark

  • Compressing 6144MB kvm image
Command Arguments compressed size [MB] time [s]
cat > target 6144 55.96
pigz --best 1526 259.65
pigz --fast 1667 28.06


  • 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