I've already logged a ticket for this, but if anyone is interested there is a much faster way to do VPS backups by switching out gzip for lzop compression.
Here is a the what the current virtualizor backup does:
Code # lvcreate -L12G -s -n backup-v1001 /dev/kvmvg/vsv1001-dbbiylg3awl9iyka-ynfcfcgknopy4drs
# time /bin/dd if=/dev/kvmvg/backup-v1001 bs=24M iflag=direct | /bin/gzip -c > /backup/backup_v1001.img.gz
512+0 records in
512+0 records out
12884901888 bytes (13 GB) copied, 509.413 s, 25.3 MB/s
real 8m29.488s
user 8m15.028s
sys 0m18.228s
When switching the compression method to lzop:
Code
# time /bin/dd if=/dev/kvmvg/backup-v1001 bs=24M iflag=direct | /bin/lzop -2 > /backup/backup_v1001.img.lzo
512+0 records in
512+0 records out
12884901888 bytes (13 GB) copied, 34.5307 s, 373 MB/s
real 0m39.789s
user 0m17.098s
sys 0m17.185s
Using gzip : 25.3MB/s and 8min 29 seconds for the backup to complete.
Using lzop : 373MB/s and 38 seconds for the backup to complete.
That is a 1300% increase in backup speed and in reduction in backup time.
Note:
1) During these tests, gzip caused higher server load than lzop (lzop was marginally better).
2) The lzop backup was slightly larger than the gzip (300MB on a 12GB disk), but storage is cheap.
3) The /backup directory is an NFS share from our NAS server, so this also writing is across the network.
We have requested Virtualizor to add this as a backup option, it would greatly help with backing / restoring VM's where hours turn into minutes.
|