Good evening,
I use SFTP (File Transfer over SSH) from a computer (Windows 10) to a Synology NAS. Both devices are behind NAT on different locations. Around 3 weeks ago, whenever I initiated a transfer (always one file at a time), the speed was easily around 30 MB/s. This is close to my maximum available speed, which is the limiting factor on one of the locations.
Today, I noticed that a transfer starts fast but within a second drops to not more than 2 MB/s. First I thought of bandwidth issues (ISP, switch, router, ...), but that doesn't seem to be the case because I can launch 10 of these transfers at the same time. They each stay around 2 MB/s, totalling up to 20MB/s for 10 transfers. So the bandwidth is available, it's just not used.
Someone I know advised me to make a tcpdump, suggesting I would find a lot of "TCP Retransmission" packets in there. He was right. He advised me to lower my MTU size (currently 1500 on both machines) to around 1462, however this did not seem to solve the bandwidth issue.
I have to admit that, while I am somewhat experienced with networking, the MTU is really something that I haven't had to tamper with much. It has always simply worked by default. In any case, it does not seem to be the resolution for the problem after having tried several (lower) values of the MTU on the sender side.
On the side of the NAS, unfortunately there are 2 NAT devices because at this time it cannot be avoided. Locally, when I am with the NAS in the same network or just behind the first NAT router (so before the second NAT router), I am able to reach close to 1Gbps speeds (over 100MB/s).
Could anyone point me into the right direction, something I am forgetting or simply am not aware of? All ideas welcome. :-)
Any ways to somehow force SSH to send smaller packets, since I assume that is the actual issue, could also work and is welcome.
Thanks beforehand.
Kenneth