1

I'm using Samba on Debian 8.4 (Jessie) to share files with a small number of Windows & Mac users (~20 total, ~5 at a time at most) and I'm seeing abysmal performance on read and write: tested by copying large file to and from the share, average < 500 KB/s.

I tested the disk by running dd if=/dev/zero of=/srv/temp.tmp ... and dd if=/srv/temp.tmp of=/dev/null ... and the disk can get to 70~80 MB/s so that's probably not the bottleneck.

I tested network by running iperf and even on the edge of the wifi I can get 4~5MB/s, in door it's ~10MB/s so I don't think it's network related either.

An interesting observation is that during my test (copying large file to/from the share) while running iostat -d -p md0 1 shows that the disk is not active all the time, but rather only read/write 1 sec for every ~10 sec inactive. This is not the case during the test with dd.

All the tests were performed when I was the only active user to rule out possible interferences. This is a fresh install of Debian with some other stuff (apache server, php, etc) and a default config of samba. The share config is as follow

[share]
  path = /srv
  force group = data
  read only = No
  create mask = 0660
  force create mode = 0660
  directory mask = 02770
  force directory mode = 02770
  • Are you sure your network is in MB/s and not Mb/s ? (Megabits, ie 8 times less information than a MegaByte [Byte=8bits]) , as 10Mbits/sec would yield what speed you are witnessing (the rest being taken up by other paquets). And then check samba.org/samba/docs/man/Samba-HOWTO-Collection/speed.html for a bunch of things to look for (read size, etc) – Olivier Dulac May 30 '16 at 13:56
  • Pretty sure it's megabyte, not megabit. iperf result is in megabit which I had divided by 8 before posting that to keep all the numbers consistent. – Binh Tran May 30 '16 at 14:35
0

To tune performance of Samba, the howto has a section about speed/performance tuning:

https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/speed.html

You can probably enhance your results by tuning : the read size, and the socket options, in particular, are worth tweaking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.