Restic high latency

Hi there,

I am using restic in two ways:

  1. Raspberry Pi 4 with external HDD which contains 5 TB of data
  2. Computer with 100 GB of personal data

I backup with restic via rclone to Onedrive Business. Computer has SSD should be more than fast enough to not be considered a problem. Same for internet with over 100MB/s (Vodafone). However, I am facing two problems

  1. Backup of 5 TB takes weeks. Which is very long time in general, but well, its 5 TB and connection to onedrive may not be the fastest…however while backing up, my latency greatly increases, so that I cant use other applications (e.g. video streaming, gaming). So I need to stop the backup each time manually and as restic every time starts to scan from zero, I can never finish my backup. Each night I stop restic after backing up / scanning 1 TB and start it again when I go to bed, however next evening it is where I left off the day before. Is there a way to stop restic for some hours and continue where I left off afterwards or at least stop the high latency problem?

  2. My Computer only backs up 100 GB, which took over 9 hours. Which is also okay, if it this way for the first initial backup. However, each time I run the backup again, or forget --prune, i takes more or less the same time. However, I cannot leave my computer each day on for 9 hours each day, just to backup the missing / changed 50-100 MB of data from that day.

Thanks a lot in advance.

With (1), have you thought about your router being the culprit? I had a similar problem recently with cloud syncing (not directly restic-related, but the same symptoms). My ISP provided a newer router which solved the issue.

This thread, which goes into other bandwidth- & latency-related solutions, might also be of use.

I’m not familiar with Vodafone’s offerings but did you mean the ’ Red Internet & Phone 1000 Cable’ package which has 1000Mbit download and 50 Mbit upload speed? 50 Mbit is roughly 6 MiB/s. Not considering network overhead, latency and deduplication it takes more than 10 days to upload 5 TiB.

The simplest solution would be to limit bandwith usage. Restic allows to set a fixed limit by using the --limit-upload flag. Rclone is more flexible as it allows to specify a timetable when using the --bwlimit flag.

Please provide more details like restic version, exact command, OS and filesystem.

Hi,

First, thanks a lot for the replies. Really very appreciated. I try to reply as good as possible:

Regarding

With (1), have you thought about your router being the culprit? I had a similar problem recently with cloud syncing (not directly restic-related, but the same symptoms). My ISP provided a newer router which solved the issue.

–> I have bought a Fritzbox 7490 Cable. Its not from my provider (Unitymedia / Vodafone).
–> I do not see many options considering the router. The router does not allow detailed prioritization of clients and as I am bound to cable routers, I think this one is already one of the best possible options.
–> Thanks for the link, I will have a look.

Regarding

I’m not familiar with Vodafone’s offerings but did you mean the ’ Red Internet & Phone 1000 Cable’ package which has 1000Mbit download and 50 Mbit upload speed? 50 Mbit is roughly 6 MiB/s. Not considering network overhead, latency and deduplication it takes more than 10 days to upload 5 TiB.

–> I have Unitymedia Premium 120 which is specified as follows
–> Download: Min. 84 Mbit/s - max. 120 Mbit/s
–> Upload: Min. 4.2 Mbit/s - max. 6 Mbit/s

The simplest solution would be to limit bandwith usage. Restic allows to set a fixed limit by using the --limit-upload flag. Rclone is more flexible as it allows to specify a timetable when using the --bwlimit flag.

–> Thanks a lot, I will play around with the flags. However, if restic really uses the whole bandwith, and limitation solves the latency problems, I am wondering, why backup e.g. forget and prune for mac with 100GB data takes so much time. I cannot say if my upload (see above) is good or bad, but I thought its not that bad, so restic should either be faster with the tasks as whole bandwidth is used or if onedrive is a bottleneck, it should not use the whole bandwidth.

Please provide more details like restic version, exact command, OS and filesystem.

–> Server is Raspberry PI 4 with Raspberry Pi OS (lite / 32bit) and standard linux filesystem (ext4)
–> external hdd connected to server with the 5 TB of data is WD Black 5TB formatted ext4
–> Computer is Mac Big Sur with apple filesystem
–> Restic has the same version for both clients (restic 0.11.0)
–> Commands are

  • restic -r rclone:onedrive:/Backups backup --verbose /mnt/media/
  • restic -r rclone:onedrive:/Backups forget --keep-last 1 --prune --verbose

Hope that helps.

Note that this is 10.5-12.5 MB/s download and 0.525-0.75 MB/s upload speed.

uploading 100GB of data with 0.75 MB/s would take more than 37h…

About prune, there are huge improvements that will be available in the next release (actually only in the beta builds). forget without the --prune option should be always pretty fast.

Just to clarify: Have you already completed the initial backup and do subsequent backups with only 50-100MB difference take 9 hours aswell? Are there other things actively using your bandwith like the backup on your Raspberry Pi 4?