- 2018-07-19-dsl-reports-test-quality.png (199.49 KiB) Viewed 5730 times
- 2018-07-19-RPI3B-plus-overclocked-ram-550-and-gpu-450.png (229.63 KiB) Viewed 5730 times
I'm rocking a USG 3 and US-8-60W-to enable Flow Control, you have to go to the Unifi Controller, Devices, then click on the switch and at the right-side navigation, you have to go to the Config tab, Services and check "Enable flow control". Queue Changes, then apply the changes. Voila! Flow control enabled. This helped immensely with my home network and the Pi 3B+.joostman wrote: ↑Sun Jul 15, 2018 5:05 pmIf I change this value, it looks like it worked, but checking afterwards, does not seem to have changed it.magore wrote: ↑Sat Jul 07, 2018 2:46 amI found the following settings help transfer speeds for the Ethernet port
Run as root
Code: Select all
sysctl -w net.core.rmem_max=8388608 sysctl -w net.core.wmem_max=8388608 sysctl -w net.core.rmem_default=65536 sysctl -w net.core.wmem_default=65536 sysctl -w net.ipv4.tcp_rmem='4096 87380 8388608' sysctl -w net.ipv4.tcp_wmem='4096 65536 8388608' sysctl -w net.ipv4.tcp_mem='8388608 8388608 8388608' sysctl -w net.ipv4.route.flush=1
I was very enthusiastic and hoping this would fix it, but forgot to check what the default values were...Code: Select all
pi@p1mon:/$ sudo sysctl -w net.core.wmem_default=65536 net.core.wmem_default = 65536 pi@p1mon:/$ sudo sysctl -a | grep core.rmem net.core.rmem_default = 163840
![]()
The speedtest did not change anything for me.
I also have 200 Mbit down / 20 up, but never get these figures from the download.
Only if I connect the Pi to my Ziggo (provider) router direct, it give me figures around the 200.
Now I have behind my provider router a Ubiquiti router and switch and the speeds are 1/4th of normal.
This is only the case for my Pi, a NAS, also on the same switch, does get the normal Internet speeds :-/
Code: Select all
root@p1mon:~# speedtest-cli --server 3587 --secure --no-upload Retrieving speedtest.net configuration... Testing from Ziggo (xx.xx.xx.xx)... Retrieving speedtest.net server list... Retrieving information for the selected server... Hosted by LeaseWeb (Haarlem) [26.84 km]: 904.579 ms Testing download speed................................................................................ Download: 57.82 Mbit/s Skipping upload test root@p1mon:~#
Is there any known issues with cifs as an alternative to samba?
CIFS is a dialect of the SMB protocol that Samba implements.Eichhorn18 wrote: ↑Wed Aug 29, 2018 9:06 amIs there any known issues with cifs as an alternative to samba?
Just for another data point, I have 800 Mbit/s service and i've connected a laptop with gigabit ethernet and gotten that delivery speed. The Raspberry Pi 3B+ on the same physical wire gives between 120 - 165 Mbit/s download, and upload between 100 - 220 Mbit/s.
So I'm trying to transfer files through my local network, and scp from my windows machine is showing a max transfer speed of 11.5 MB/s.6by9 wrote: ↑Wed Aug 29, 2018 10:50 amCIFS is a dialect of the SMB protocol that Samba implements.
We're fairly certain that has been resolved now anyway. It was stalling a single TCP connection rather than a speed issue.
https://github.com/raspberrypi/linux/issues/2449
https://github.com/raspberrypi/linux/issues/2482
Yours sounds like the standard type of flow control issue. You have a bottle-neck in the USB2 interface from the ethernet adapter to the Pi of a theoretical max of 480Mbit/s, but more realisitcally around 250Mbit/s. The adapter will be sending ethernet flow control pause frames when it backs up, but those only work over the local network. There is no mechanism to make an internet server back off other than rely on TCP's standard backoff/retry mechanisms.
Eichhorn18 wrote: ↑Wed Aug 29, 2018 12:35 pmSo I'm trying to transfer files through my local network, and scp from my windows machine is showing a max transfer speed of 11.5 MB/s.
What is required to check if flow control is turned on/off? I'm running an enterprise network through switches and some managed hubs.
Code: Select all
pi@raspberrypi:~ $ sudo ethtool -a eth0
Pause parameters for eth0:
Autonegotiate: on
RX: on
TX: on
RX negotiated: on
TX negotiated: on
Have done this today and all are reporting as 'on'. I tested my 3B+ several more times with speedtest-cli and getting average 145 Mbit/s download.6by9 wrote: ↑Wed Aug 29, 2018 1:04 pmEichhorn18 wrote: ↑Wed Aug 29, 2018 12:35 pmSo I'm trying to transfer files through my local network, and scp from my windows machine is showing a max transfer speed of 11.5 MB/s.
What is required to check if flow control is turned on/off? I'm running an enterprise network through switches and some managed hubs.on = good. off = bad.Code: Select all
pi@raspberrypi:~ $ sudo ethtool -a eth0 Pause parameters for eth0: Autonegotiate: on RX: on TX: on RX negotiated: on TX negotiated: on
Most managed switches will have options to enable/disable flow control. Unmanaged switches tend to have it enabled.
Copied from where on the 3B+? How fast can that place source data continuously?Eichhorn18 wrote: ↑Thu Aug 30, 2018 2:57 pmSeperatly I have copied an 800 MB file from the 3B+ to a network mounted folder on a windows machine, with gigabit ethernet. Time to copy was 63 seconds, giving a speed of approximately 14 MB/s or 110 Mbit/s. This seems far below the stated speed of the 3B+ of 300 Mbit/s max, but still you would expect better than this.
Copied from the SD card. I realize that in itself is an unfortunate bottleneck.
Well, from RAM you get 30 Mbyte/s. That is 240 Mbit/s which is approaching the expected max rate of ethernet on a RPi 3B+.Eichhorn18 wrote: ↑Fri Aug 31, 2018 11:46 amCopied from the SD card. I realize that in itself is an unfortunate bottleneck.
I have also written files that are stored in RAM, directly to a network mounted folder on a windows machine using CIFS. The transfer speed from RAM to the network folder (over a gigabit network and onto a gigabit enabled machine) was 30 MB/s, transferring 184MB of files in 6.13 sec.
It's true that is pretty decent. I wonder why the big difference (approximately 50%) for an internet connection that is supposed to give 800 Mbits/s on gigabit ethernet computers. What is the raspberry Pi doing for a speed test that it's not doing for a local network transfer--assuming the internet connection is not the limiting factor.
So the same statement that has been made many times over in this thread then. Yes the Pi 3B+ requires ethernet flow control to be on to give reliable results. You can use "sudo ethtool -a eth0" to confirm whether it is on or off.ajp2k19 wrote: ↑Tue Feb 19, 2019 1:34 pmMaybe I'm late to the party but here is what I have discovered so far...
https://www.snbforums.com/threads/slow- ... net.55114/
Thanks, I wasn't sure there was any consenus on it. Now I have to figure out if I can enable it directly on my router, probably not...6by9 wrote: ↑Tue Feb 19, 2019 1:59 pmSo the same statement that has been made many times over in this thread then. Yes the Pi 3B+ requires ethernet flow control to be on to give reliable results. You can use "sudo ethtool -a eth0" to confirm whether it is on or off.ajp2k19 wrote: ↑Tue Feb 19, 2019 1:34 pmMaybe I'm late to the party but here is what I have discovered so far...
https://www.snbforums.com/threads/slow- ... net.55114/
There was an intention to back off down to 100Mbit/s should flow control fail to be negotiated, but there hasn't been much progress on that.
After further testing: Disabling Samba, removing the HDD, disabling WiFi, and removing the PoE hat, nothing changed. Speeds were still constant at around 125Mbs. I messed with the ethtool and changed it to 100 full, got worse speeds. Changed it back to 1000 and I was back at 125Mbs.jamesh wrote: ↑Wed May 01, 2019 12:00 pmNot sure what to suggest. There's nothing wrong with the Pi I suspect, all the standard things have helpped, so there's something in the rest of the system going on to prevent higher speeds.
EDIT: Can you try powering it via a different mechanism to see if the that helps?
What curious problems. Is it possible you have two devices with the same IP or MAC numbers on your local network?Try2useRasp wrote: ↑Tue Sep 08, 2020 2:08 pmSo reverting back to 1000 and autonegotiate to on.
Then i get to 27 percent downloading the file until it locks up.
No, i just checked. MAC is unique and also the ip is unique. I set all my ip addresses to static in the router. And also set eth0 to static ip in dhcpcd.conf.