Linux/Compression tools: Difference between revisions
< Linux
Line 6: | Line 6: | ||
! Command | ! Command | ||
! Arguments | ! Arguments | ||
! compressed size | ! compressed size [MB] | ||
! time | ! time [s] | ||
|- | |- | ||
| cat | | cat | ||
| > target | | > target | ||
| | | 6144 | ||
| 55. | | 55.96 | ||
|- | |- | ||
| pigz | | pigz | ||
| --best | | --best | ||
| | | 1526 | ||
| 259. | | 259.65 | ||
|- | |- | ||
| pigz | | pigz | ||
| --fast | | --fast | ||
| | | 1667 | ||
| 28. | | 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