You are right about that there is something wrong. Samba on BananaPi can perform much better. But as tkaiser suggested, you should do more than a simple copy over network test to figure out the source of the problem.|
When you copy a file from a windows machine over samba to your USB drive attached to your Banana Pi, there are serveral factors involved that could be the source of your problem. So, you have to test for each of them:
a) Your network throughput isn't as fast as it should be. In this case, samba can't be any faster even if your usb disk could go faster. That's what you test with iperf.
b) Your usb disk performance is too slow. In this case, even if the general network throughput and samba perform better, samba won't be able to write faster than the system can wrote to the disk.
c) Your samba configuration is not ideal. In this case, even if the disk and networt are fine, samba won't perform as fast as it could.
So, I suggest to run the usb write test as tkaiser proposed, just to make sure your usb disk is not the limiting factor here. I had cases where the same flash storage would perform well in one system, but horribly slow in another. In that case on would have to figure out, why that is and how it can be improved (choice of filesystem can make a difference here, just to give one example).
In general, I suggest you add at least those two lines to your smb.conf file (in the global section), as from my experience, they make quite some difference (if the underlying filesystem is fast enough):
In a second step you can add these two lines as well and see if it makes a difference (it did for me, but not as much as the ones before): Copy the Code
- socket options = TCP_NODELAY IPTOS_LOWDELAY
- use sendfile = yes
Make sure to restart samba (or the whole system) whenever you change the smb.conf file. For more tweaking options, please refer to the thread I linked before. But even without additional tweaks samba should perform much better, so that would go last for me. Copy the Code
- aio read size = 16384
- aio write size = 16384
I checked your smb.conf. While it looks minimalistic (especially security-wise), I suppose it should work. But I'm not sure if there are minimal requirements that you are missing, so better use testparm to see if you have syntax errors. On Debian I usually install samba this way:
That includes a base smb.conf and testparm among other things. Copy the Code
- apt-get install samba samba-common samba-common-bin
Other than that, I would also suggest, you give Bananian another try, even if that means the effort of setting up the system again. The reason is that I never tried the Lubuntu image and even if most stuff should perform in a similar way, there could be something wrong with the image or configuration that we are not able to reproduce on Bananian.
Btw. just in case... When I wrote how to set up Logitech Media Server on Bananian, I might have forgotten one step: I'm not sure whether Bananian includes wget by default. In case it doesn't, run 'apt-get install wget' before attempting to download and install LMS.
Oh, btw. While I use robocopy over samba frequently, it doesn't make a huge difference for me. Especially large files should be way faster even if you use the Windows Explorer to copy files to your share.