SAMBA - extremely bad performance

Hi I have very bad experience with samba performance. I am connected through RJ-45 and I am not using OMNIA to any other function except NAS. I have 2GB RAM.
I have installed 3.6.25-11 samba version.
I have HDD ST4000DM004-2CV104
Sometimes it runs 30MB/s but most of the time it runs at 75kB/s. I have on the disk only big file, not small one.

When I login through SSH , smbd -F takes 100%CPU
it did not help when I restart service.
do you have any idea why it is not working
Thanks for help

Some tips https://wiki.samba.org/index.php/Performance_Tuning ]. If you can post your actual smb.conf (ie. /var/etc/smb.conf ) it will be handy >> interesting options from smb.conf file: smb encrypt, socket options, max protocol, security, min recievefile size.

Quite handy source :slight_smile: https://www.performancevision.com/blog/5-things-know-before-start-troubleshooting-smb-performance/ >> (CZ) Maxovy poznamky k smb.conf

EDIT: NAS (samba) data transfer speed problems not same issue, but linked sources are very handy.

Samba 3.6 is really old.
Can you try to run a more recent version of samba on an lxc-guest?
When I do that, I don’t have any problems with transfer speed.
I’m using Debian stable as the guest.

Indeed, there are lot of oldish stuff in TOS. But it is not necessary to have something extra fresh , my 3.6.x samba is running pretty fast (TOS vs Win10) (first peak is samba, second peak is sftp : https://forum.test.turris.cz/uploads/default/original/2X/b/bec77a677127da08a63aa34a584a7ee01254e6a8.png )

… just a note , run only one samba-server. Having one in TOS and second in lxc might bring some extra issues. Ideally one samba server running under TOS and samba-client inside lxc (… you can share mounts between host/guest machines directly using unix or/and lxc tools.).

Regarding “sometimes” , maybe it is not related, but i faced some issues with samba when i plugged/unplugged my “work” laptop to/from my network. (after some time, i found that problem was samba master election)

Yes one should run one samba server only.
But 3.11 (currently in RC) has the latest stable version of samba, so perhaps the OP could try to run that?

What’s the local performance of the hard drive on the router? Can you measure it and post results?

That is great message, I will wait for 3.11 :slight_smile:

it is seagate 4TB disk over sata, and it is able to work over 20MB/s over samba when it is working ok