New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
speed: borg vs rsync for cPanel account #4190
Comments
I have just discovered #3039 ; but I don't know if this is related to my case or how to check it. |
rsync doesn't do much with the data, it just copies them from a to b. borg chunks, hashes/deduplicates, compresses, encrypts, authenticates the data, so it is expected to need more resources (cpu, ram, time, ...) than rsync. for a practical comparison, you should not only compare the first run (which is slowest), but also subsequent runs (which might be faster if there is duplicate data). yes, it can also be that borg is slower because it cares more for file metadata than rsync, not sure about that. |
I assumed as both only transmitted changed data, the would get similar speed. Usually bandwidth is the bottle neck and compression should help borg. I didn't thought about encryption. Deduplication should also help borg, and having a big repository. I could imagine borg being slower, but not that much. And it was fifth daily run. I will try and unencrypted and uncompressed backup in a week, and try to find bottle neck |
Cheking the logs I notice unchanged files are upload again:
It is a VPS and home is mounted, so maybe it is related to inodes... I will check different values for --files-cache |
Please add the borg version to your top post. |
done: 1.1.7 Tonight is next backup, tomorrow I will post new times. |
Again "static" (php files, images, etc...) files are added again....
The script is called in a loop for each server account |
@enboig which file system is used? |
The filesystem in the VPS is:
|
To complete the experiment now you need try |
@enboig Is's slow becouse you are using ztsd to compress. Change it to LZ4 and it will be pretty fast. Also, borg first run will be always a little bit slow (in my case - twice slow, compared to tar.gzip to remote sshfs), but any additional snapshot is much faster compared to tar/rsync. Also, better add |
I get a warning; and applied extra flags.
@knutov I changed compression, it may help, but my problem is all files appear to be new every time I think --nobsdflags did the trick. I don't know why, but in my last backup log, there wasn't a single file marked as "M", all were "A". Now I am running it manually and everything seems fine. Thanks a lot, I will wait some days to inform back if everything is working as expected. |
After checking the logs of the weekend, it is slow again. The I am using is:
Where
If I run for the same account twice in a row, old files are not added again, but when running in cron one account after the other, it fails to detect already uploaded files. |
It seems the same issue; I just rised the BORG_FILES_CACHE_TTL. |
I backup 45 sets in a row daily; I set BORG_FILES_CACHE_TTL=50; what may be an advisable value? I thouhgt "2X + [some margin]" would suffice, but after watching the first log it don't appear so. |
X should be ok already. |
I forgot to use |
Now everything work as expected, being borg faster than rsync. It wasn't a problem with Thanks a lot for your help! |
So, what was the problem? |
I forgot to use |
I have a script to backup my VPS webserver (web+mail+mysqldumps) accounts using rsync. I am exploring changing rsync to borg to have larger version history, but it is way slower:
small account (478.06 MB):
borg: 57.91 seconds
rsync: 0m3.762s
mid size (2.18 GB):
borg: 2 minutes 18.17 seconds
rsync: 0m5.974s
big size (15.87 GB):
borg: 14 minutes 59.75 seconds
rsync: 0m25.863s
huge (133.50 GB):
borg: 2 hours 7 minutes 38.05 seconds
rsync: 4m40.872s
I create my backups with
Both backups go from server A to B and are written in the same RAID disk.
The backup involve lots of small text files, should I have set special parameters when creating the repository?
Are there SSH options to improve the speed? it a fibre connection, so there shouldn't be any problem.
The text was updated successfully, but these errors were encountered: