Nihil
Posts: 5
Joined: Wed Dec 25, 2013 9:03 am

Slow FTP/SMB transfer speed on RaspBMC

Sat Mar 08, 2014 8:41 am

Hello,

I have set up an XBMC media center on my RPi, running on RaspBMC. In addition I've set up another one on another TV, where the first one acts as a server with all the files for the other one. I've linked the libraries via UPnP and it is working great, but not with 720p or higher HD media. I guess the problem is slow transfer speed, as I noticed it when transferring files to my media discs.

On both FTP and SMB transfer speed is between 300 and 1000 kB/sec, usually 500 kB/sec. Both my PC and RPi are connected through WiFi, via a good router, so I believe this should not be a problem. Where could the bottleneck of these transfers? RPi's CPU? WiFi? RaspBMC's settings?

On a side note: when I'm transferring files from my Ubuntu 12.04 to my RaspBMC via FTP, I get "host connection closed" error after some 10 minutes or so. Why?

Thank you for your help

p23
Posts: 3
Joined: Sun Mar 09, 2014 12:25 am

Re: Slow FTP/SMB transfer speed on RaspBMC

Sun Mar 09, 2014 5:56 am

I have the same issue. My average speed is around 120~300KB/s. Connecting through wire helps (~2.5MB/s), but not the 100Mbps, full-duplex that it's saying it is.

User avatar
jbeale
Posts: 3675
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Slow FTP/SMB transfer speed on RaspBMC

Sun Mar 09, 2014 6:52 am

Using the 'iperf' benchmark test* I recall that the Pi is capable of somewhere around 70-90 Mbps (megabits, not bytes) which is not far from the max you ever see on 100 Mbps ethernet (a full 100 Mbps is not possible due to protocol and packet timing overheads). So there should be some way to get better performance on a wired connection although I don't know the specific bottlenecks you have. Wireless is a whole different story, some cheap wifi adaptors are extremely slow, but the overhead of doing WPA encryption on the pi slows it down even if the wifi itself is fast.

* http://www.raspberrypi.org/phpBB3/viewt ... 87#p163931

Nihil
Posts: 5
Joined: Wed Dec 25, 2013 9:03 am

Re: Slow FTP/SMB transfer speed on RaspBMC

Sun Mar 09, 2014 9:02 am

Ok, I tried with the iperf where my PC on WiFi acted as client, and RPi as server. In case if RPi is conneced to the WiFi I get 5-6 Mbit/s (which suites the ~500 kB/s) in case of wired RPi I get 17-19 Mbit/s (which suites the 2.5 MB/s as mentioned by user p23).

Now that you mentioned WPA encryption, I agree that this could be a large part of the problem. I avoided SFTP for this exact reason, but I did not think about WPA. I guess wiring it is the only option to improve transfer speed (aside from removing WPA protection on WiFi).

p23
Posts: 3
Joined: Sun Mar 09, 2014 12:25 am

Re: Slow FTP/SMB transfer speed on RaspBMC

Sun Mar 09, 2014 4:14 pm

I run the iperf benchmark between my RPi & laptop. Weird results. My wifi & wire are really close, 4.3MB/s & 4.9MB/s, both of which surpass the speeds I have experienced thus far. Still only about half of the possible maximum.

I will need to run some more tests to find the bottleneck. So far I've tried transferring via rsync (via ssh using a key) & samba. Would they really have so much overhead?

RPi (wired) & Laptop (wifi)
------------------------------------------------------------
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.2 sec 41.9 MBytes 34.4 Mbits/sec


RPi (wired & Laptop (wired)
------------------------------------------------------------
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 47.0 MBytes 39.3 Mbits/sec

Return to “Media centres”