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