bb-qq / r8152

Synology DSM driver for Realtek RTL8152/RTL8153/RTL8156 based adapters
GNU General Public License v2.0
1.93k stars 179 forks source link

Potential Fix for Slow Upload Speeds #215

Open joeyalex opened 2 years ago

joeyalex commented 2 years ago

Description of the problem

This is not so much an issue as a potential fix that I was able to figure out in my environment that I thought might be helpful to others.

I'm connected to my NAS through a pair of MikroTik switches, one in my office and one in the network rack that has the 918+ in it. What I found with multiple adapters was great download speed from the NAS to the computer, but really really poor upload speeds from the PC back to the NAS.

After quite a bit of troubleshooting, I discovered that the issue in my case is the MikroTik switches and the type of RJ45 adapter I was using. I bought some generic 10Gb RJ45 modules off of Amazon. They seemed to work fine, and would link up at the 2.5 Gbe speed of the USB adapter. Again, they worked great from NAS -> PC, but horribly from PC -> NAS.

These generic adapters always report to the switch that they are linked at 10 Gb, regardless of the actual link speed. Herein lies the problem. The MikroTik has a very limited amount of buffer space, so it has to manage it pretty aggressively. Since my PC is linked up at 10 Gb, it is blasting uploads to the NAS at that speed. The switches in this case think both ends are at 10 Gb, so aren't buffering in a way that is helpful when the actual link speed is only 2.5 Gb on the NAS side. It's like the NAS is drinking from a firehose.

What ended up fixing this for me was to buy a MikroTik branded RJ45 module. These report the correct link speed back to the switch, so it at least tries to buffer the traffic. It's still not perfect (I get about 2 Gb/s upload and solid 2.35 download), but it is considerably better than the 20/30 Mbps I was getting before.

Short version: if you have switch(es) between your PC and the NAS, and they aren't registering the correct link speed on the RJ45 module going to the NAS, you need to either: 1) Buy the correct module that will report the speed and allow the switch to do some buffering. 2) If the NAS is the only other thing on your network that is >1 Gb, you could set your PC to force 2.5 Gb. This would make it talk at the same rate as the NAS, and masks the problem. If you have anything else that is >2.5 Gb though, this doesn't work.

Anyhow, just figured I'd share my experience since this was bugging me pretty badly, and I ended up going through a few USB adapters trying to fix what was really a switch related issue.

Description of your products

 - DS918+
- Linux diskstation 4.4.180+ #42218 SMP Mon Oct 18 19:17:56 CST 2021 x86_64 GNU/Linux synology_apollolake_918+
- DSM version 7.0
 - CableCreation 2.5 Gbe

Description of your environment

Apple Mac Studio -> Mikrotik CRS305 -> MikroTik CRS305 -> DS918+ Cat 6 Cables