Discussion
Samba file copy speed
30
10100
View: 10100|Reply: 30
|
[Discussion]
Samba file copy speed
[Copy link]
|
|
I have just bought a Banana Pi and set up a samba share which is all working OK other than one thing and I don't know where the problem lies.
When attempting to copy files from a Windows machine onto the share on the Pi the speed is awful. Copying 65Mb of mp3 files takes around 20 minutes and on many occasions it fails part way through saying that the share is no longer available.
As a bit of extra background, I am using this device tp replace a Raspberry Pi and as such all the connections are the same - same PSU, same external HDD, same gigabit wired LAN cable. The Raspberry Pi worked pretty well in terms of file copying performance and I had no complaints with it but on the new Banana it is pretty much unusable. I have got Lubunto 3.1.1 installed.
Any ideas? |
|
|
|
|
|
|
|
Edited by tkaiser at Thu Nov 13, 2014 04:12
Use ping between both devices and look for packet losses. Get iperf.exe (jperf.bat), do an "apt-get install iperf" on the Banana Pi and test just the network using iperf (testing Samba transfers also involves the filesystem of the 'server' but since the 'server' disappears this is most likely a simply physical connection problem between both hosts). Use another network Cable. |
|
|
|
|
|
|
|
Ping shows no losses:
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
iPerf gives a transfer of 541MBytes at 454MBits/sec
Compared to the 50ish kbps I get when transferring the files something is very different. In terms of the cable, as I said in the original post, this is the exact same cable as I use for the Raspberry Pi and I have tried this box again and the files transfer OK so the cable is definitely good. This leads me to assume that there is something squiffy in my Banana config that is messing the samba system up. Just no idea what . |
|
|
|
|
|
|
|
Edited by tkaiser at Thu Nov 13, 2014 05:54
mr_nick replied at Thu Nov 13, 2014 05:46 
as I said in the original post, this is the exact same cable as I use for the Raspberry Pi
This doesn't matter. The Ethernet PHY the Raspberry Pi uses negotiates at 100 MBits/sec maximum whereas the BPi might use 1000 MBits/sec (check the output of "dmesg" and/or "ifconfig"). I had cases where a cable worked perfectly reliable between two hosts if one if them was only able to handle 100 MBits/sec and when this host was exchanged with a Gbit-capable one the transfers stalled since the speed negotiated and the cable's capabilities (at least CAT5e) didn't match (Gbit Ethernet uses more wires than fast ethernet).
BTW: "0ms" reported by ping is strange. You might want to double check with iperf using UDP (almost a good indicator for the quality of the connection) |
|
|
|
|
|
|
|
How does your smb.conf look like? Especially the global section? |
|
|
|
|
|
|
|
Btw. what kind of tasks is your BananaPi supposed to do? For a server setup without graphical desktop, an image like Bananian or Ubuntu Core might be a better choice. That being said, it should show much better transfer speeds even on Lubuntu. |
|
|
|
|
|
|
|
Edited by mr_nick at Thu Nov 13, 2014 06:52
Currently got it connected with a new 30cm Cat6 lead direct to my router and it's still painfully slow copying files from Windows - seems to have maxed out at 121KB/sec.
iPerf using UDP reports this:
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec
[ 3] Sent 893 datagrams
[ 3] Server Report:
[ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec 0.342 ms 0/ 893 (0%)
|
|
|
|
|
|
|
|
Well if iperf shows such horrible values, then the samba configuration should not be your main concern. How is your network configured? Can you test a shorter cable? |
|
|
|
|
|
|
|
silentcreek replied at Thu Nov 13, 2014 06:46 
Btw. what kind of tasks is your BananaPi supposed to do? For a server setup without graphical deskto ...
The box is just going to be running Logitech Media Server. I have been using a Raspberry Pi for this for a long time but due to changes in BBC Radio streams it is no longer up to the job (not powerful enough for transcoding without lots of buffering).
I had tried Bananian but when trying to download the LMS software I ran into problems as it kept reporting this:
Failed to fetch http://debian.slimdevices.com/di ... nary-armhf/Packages
So I used the graphical system so I could download the installer via HTTP and install using dpkg which all worked fine and dandy. I didn't try the samba speeds on Bananian because it was pointless if I couldn't get the LMS package.
I have to admit that I am exceptionally green when it comes to Linux so there is a very real possibility that I have made some obvious schoolboy errors somewhere along the way. |
|
|
|
|
|
|
|
Edited by mr_nick at Thu Nov 13, 2014 07:19
silentcreek replied at Thu Nov 13, 2014 06:56 
Well if iperf shows such horrible values, then the samba configuration should not be your main conce ...
Windows PC is connected to gigabit router via 2m lead. Pi is connected to same router via 30cm lead.
What kind of value would you expect to see for UTG in terms of bandwidth if 1.05 Mbits/sec is horribly slow? Oh and when I did the test using TCP it was 454MBits/sec so admittedly there is a huge disparity there. |
|
|
|
|
|
|