I’m in the US and trying to use a Europe-based VPS as my backend destination (because of cost). A major constraint is that due to the high latency (200-400ms ping) and occasional packet loss, it seems impossible for me to get more than about 5 MB/s over a single TCP connection.
I tried using the SFTP backend, but there seems to be no way to use more than one TCP connection. Multiple “connections” are simply multiplexed over the same SFTP connection and do not improve performance.
I then tried rest-server. Oddly enough, using -o rest.connections=64 did nothing here at the TCP level either although I did notice more connection handlers on the receiving side.
I then realized that rest-server was also multiplexing connections via HTTP/2, and would only open one TCP connection. I then noticed that if I pass GODEBUG=http2client=0 to restic and GODEBUG=http2server=0 to rest-server, this will cause the connections to use HTTP/1.1 and will actually open multiple TCP connections. This increased my throughput about 10x (to about 50 MB/s).
So, a few questions:
- Is there actually a way to use multiple TCP connections via SFTP? I saw something about maybe using rclone. Is that the best way?
- Are there any plans to add a please-don’t-multiplex option to the rest-server backend? I am afraid this undocumented environment variable will stop working at some point, which will remove restic as a viable option for me if I can only get 5 MB/s transfers (20TB+ backup often with 50-300GB increments).
Thank you!