Linux/Compression tools
< Linux
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