SMB file transfer speeds too low over local LAN

5

1

I have built a file server for my home network. It has a 3TB Sata 3Gb/s HDD on a Dual Celeron Mini ITX mobo with 2GB DDR3 RAM. I have installed Ubuntu minimal runing off a flashdrive. I installed samba and configured it with webmin.

I bought a D-Link DSL-2730R router, the specs says it is 10/100 and b/g. I connected the router to the server via ethernet, and configured samba via webmin.

My laptop is in a room next to my router. When transfering files from/to my Ubuntu laptop, I get about 1,5MB/s on Nautilus. If I place my laptop in the same room, 30cm of the router, I get about 2,5MB/s.

I used an android app to check for the wifi channel with less interference and set it to a channel with no other SSIDs on it, and I disabled WPA2PSK and left the wifi open (for a few minutes, just for testing). The speed increased to a peak of 2,8MB/s.

If I disable wifi and connect via ethernet I get speeds aroun 6,6~7,9 MB/s. (All the teste were performed with the same file, a 300MB file).

Then I tried an android app to test local wifi LAN transfer speed and it says my link speed is 54Mbps, signal is -59 dBm, download is 6967Kbit/s and upload is 3545Kbit/s.

According to this answer the top theoretical speed on 802.11g is 6.7MB/s, but I'm getting less than 25% of it.

That Brazilian Guy

Posted 2013-11-15T17:56:14.970

Reputation: 5 880

4Yes, theoretically. In the same answer it says practical 4MB/s (so now it's at 65%). A bit more down you'll see an answer stating a source which says maximum of 3,1MB/s. (so now it's 80%). And if you count that the SMB-protocol is very chatty you'll loose a lot there too because your client also has to upload chatter for the protocol, easily loosing the remaining 20%. You can see this too with cable. Its 6,6MB/s (100Mbps connection). 54Mbps, which is in practice e.g. 40Mbps , so 40% of the cable is 6,6 * 0.4 = 2,64MB/s which is what you are getting in good circumstances. So it all fits ;) – Rik – 2013-11-15T19:41:31.767

@Rik Great comment, could you please copy it and paste as an answer? – That Brazilian Guy – 2013-11-15T19:59:07.260

Answers

4

Yes, theoretically the speed of 802.11g is 6.75MB/s. (54Mbps / 8 = 6.75MB/s)

In the same answer it says the practical speed is 4MB/s (so now the 2.5MB/s is at 63% instead of 37%) (counting 6.75MB/s and 4MB/s against 2.5MB/s).

A bit more down you'll see an answer stating a source which says maximum of 3,1MB/s. (so now your at 80%).

Now calculate that the SMB-protocol is know for being very "chatty"; you'll lose a lot there too because your client also has to upload/download chatter for the protocol, easily losing much of the remaining 20%.


But now look at it from another angle. Let's look at the cable speed. You said it was 6,6~7,9 MB/s on a cable (with 100Mbps). So you already loose almost half the speed using SMB via cable.

Now take the WiFi. Even if your "link"-speed is 54Mbps, your actual speed will be more like 40Mbps. (40Mbps / 8 = 5MB/s) 40Mbps is 40% of the 100Mbps of the cable. So when we take 40% of the speed of the cable we get 6,6MB/s * 0.40 = 2,64MB/s. And this is in optimum circumstances. (If you take 4MB/s from the quoted answer you'll get 2,11MB/s.

So it all fits ;)


Now about the test with the app you did. You're getting 6967Kbit/s. This is Kbit/s. It's a lot less than you actually think. It's 6,8Mbps (while you should be getting 30-40Mbps or at least 20Mbps like me). That's just 870KB/s = 0.85MB/s !!! So it's a wonder you're getting 2.0MB/s file-copies ;)
Did you do the client-test or the "SMB-test" ?? (I did the "client-test".)

(I only get 19520Kb/s download with the "client-test" to a pc 2 rooms over)

Rik

Posted 2013-11-15T17:56:14.970

Reputation: 11 800

6967Kbit/s in the SMB test, and yes, android is taking 10 seconds to download a 1MB file =/ – That Brazilian Guy – 2013-11-15T22:40:13.137

Yep. finally got the smb-test here working too. 7290Kbit/s down 9248 Kbit/s up while the client-test (clean tcp) is between 16000-20000Kbit/s. I think with some tweaking you can get SMB transfers up to 3-4MB/s but that involves a lot of tweaking of the buffer size, MTU etc... and making sure there is no interference on the wifi-channels. Beyond that there is going to 802.11n but that's not always guarantee of higher speeds. – Rik – 2013-11-15T23:05:01.027

I asusme you are on 802.11g too? – That Brazilian Guy – 2013-11-16T00:16:09.587

Yes. I also tried 802.11n but i only get a 65Mbps link with my phone and tablet if i use that. (not much improvement but that's due to the limitations of my router and not being able to go to 5Ghz.) With the 65Mbps i did get a higher upload with the clean tcp (33000 up) but the download stayed at 18000. SMB-test was just as bad (7198 up/8134 down) But this is on a phone and tablet. The WiFi antennas are not as strong as that of a laptop i imagine. – Rik – 2013-11-16T00:27:58.723

BTW for the clean tcp transfers i mentioned i used the tcpserver on this page from that app. You could also try other tcp speedtests between laptop and server like this. (I tested the app on Galaxy S2 to my Windows 7 PC as server.)

– Rik – 2013-11-16T00:44:24.160