Welcome Guest. Please Login or Register  


You are here: Index > Virtualizor - Virtual Server Control Panel > Suggestions > Topic : Way Faster VPS backups

1


Threaded Mode | Print  

 Way Faster VPS backups (31 Replies, Read 456200 times)
domainscoza
Group: NOC
Post Group: Newbie
Posts: 17
Status:
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.
IP: --   

Way Faster VPS backups
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
impressive. Will check this out.
IP: --   

Way Faster VPS backups
kaushal
Group: Member
Post Group: Newbie
Posts: 49
Status:
Hi,

Sorry for delay in reply, You can use pigz utility. Which has similar performance like lzop. pigz will be automatically detect by virtualizor if installed on the server.

Let us know for further information.

-----------------------
-----------------------
Regards,
Kaushal Vora
Virtualizor Team.
http://virtualizor.com/
IP: --   

Way Faster VPS backups
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
Would´nt it be a good idea to install this together with virtualizor automatically?
IP: --   

Way Faster VPS backups
domainscoza
Group: NOC
Post Group: Newbie
Posts: 17
Status:
pigz is good and is as fast as lzop, however creates massive load on the hypervisor since it's using it's default compression (level 6) - This should be adjusted to level 2 to reduce the CPU load, or allow us to configure this value in the virtualizor configuration.

By massive load, I mean it took our AMD Epyc HV's from a load of 5.00 to over 28.00 during the backup process.


lzop however still has the lowest CPU impact, it only increased the load by 2.00

IP: --   

Way Faster VPS backups
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
hmm I did not had this issue. Just installed pigz and startet the backup process manually. Load average goes from 7.x%  to 9.x% on an Intel Xeon E3-1245V2
Backup was more than 50% faster.
IP: --   

Way Faster VPS backups
domainscoza
Group: NOC
Post Group: Newbie
Posts: 17
Status:
Quote From : wolke November 28, 2018, 1:00 pm
hmm I did not had this issue. Just installed pigz and startet the backup process manually. Load average goes from 7.x%  to 9.x% on an Intel Xeon E3-1245V2
Backup was more than 50% faster.


This is because pigz fires up threads based on the number of cores, you have 4 core on a E3 processor and we are running 32 cores, so 32 threads for pigs, maybe virtualizor can allow us to configure the number of threads for pigz.
IP: --   

Way Faster VPS backups
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
I would bet you have a too high process priority or IO class of realtime inside your backup template. If you lower that, you should be fine.
IP: --   

Way Faster VPS backups
domainscoza
Group: NOC
Post Group: Newbie
Posts: 17
Status:
Quote From : wolke November 28, 2018, 3:00 pm
I would bet you have a too high process priority or IO class of realtime inside your backup template. If you lower that, you should be fine.


You sir are 100% correct. Thanks
IP: --   

Way Faster VPS backups
kaushal
Group: Member
Post Group: Newbie
Posts: 49
Status:
Hi,

Thanks @wolke for the answer.

Also I'm assuming that pigz utility will work for your backup compression related issues.

Let us know if you need any further information.

-----------------------
-----------------------
Regards,
Kaushal Vora
Virtualizor Team.
http://virtualizor.com/
IP: --   

Way Faster VPS backups
happym3
Group: Member
Post Group: Newbie
Posts: 2
Status:
nice information shared, good work.
IP: --   

Way Faster VPS backups
happym3
Group: Member
Post Group: Newbie
Posts: 2
Status:
Softaculous are doing well for some years and so
IP: --   

Way Faster VPS backups
domainscoza
Group: NOC
Post Group: Newbie
Posts: 17
Status:
Just an update on this, using pigz, even with the lowest io class selected was still creating more load that we were happy with. So we overwrote the /usr/bin/pigz binary with a symlink to /usr/bin/lz4

The option flags for pigz and lz4 are identical, so it's a complete drop in replacement.

With compression, the backups are pretty fast (390MB/sec on the lowest IO class) and there is little to no load on the servers when backups are done.


Edited by domainscoza : May 21, 2019, 3:52 am
IP: --   

Way Faster VPS backups
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
Thanks for sharing this. I wonder what will happen on OS updates. Did you ever got trouble with that?
IP: --   

Way Faster VPS backups
domainscoza
Group: NOC
Post Group: Newbie
Posts: 17
Status:
Quote From : wolke May 21, 2019, 9:20 am
Thanks for sharing this. I wonder what will happen on OS updates. Did you ever got trouble with that?


Absolutely no problems at all, works perfect for backups and restores and to get around updates, you just add pigz to your package managers excludes so it won't update pigz and overwrite the symlink.
IP: --   

« Previous    Next »

Threaded Mode | Print  

1


Jump To :


Users viewing this topic
5 guests, 0 users.


All times are GMT. The time now is November 1, 2024, 12:38 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.067