Linux/Compression tools: Difference between revisions
< Linux
No edit summary |
|||
Line 8: | Line 8: | ||
! compressed size | ! compressed size | ||
! time | ! time | ||
|- | |||
| cat | |||
| > target | |||
| 6144M | |||
| 55.96s | |||
|- | |- | ||
| pigz | | pigz |
Revision as of 11:31, 18 November 2012
benchmark
- Compressing 6144MB kvm image
Command | Arguments | compressed size | time |
---|---|---|---|
cat | > target | 6144M | 55.96s |
pigz | --best | 1526M | 259.65s |
pigz | --fast | 1667M | 28.06s |
- 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