J
J
jidckii2015-11-24 16:39:15
linux
jidckii, 2015-11-24 16:39:15

Samba limits the speed?

Good afternoon.
There is a file server on FreeNAS.
Before it is aggregated 3 gigabits.
And the CIFS ball was raised for windows users.
The problem is that I run into a speed of 50-60 MiB / s (500 megabit / sec) in 1 stream.
At the same time, if I pour ftp into 1 stream, then I see my client 1 gigabit without straining.
I logically assumed that the problem was in the limitations of the protocol and some kind of tuning might be needed.
Basically, everywhere we talk about the same parameters in smb.conf

​socket options=SO_RCVBUF=131072 SO_SNDBUF=131072 TCP_NODELAY
min receivefile size = 16384
use sendfile = true
aio read size = 16384
aio write size = 16384
aio write behind = true

Well and all in such spirit.
but these parameters do not change anything.
I must say right away that I 100% do not rest on either the disks or the processor or the network!
The problem is when working with the cifs ball.
just in case configs:
~# /usr/local/sbin/samba --version
Version 4.1.18
 ~# testparm
Load smb config files from /usr/local/etc/smb4.conf
Unknown parameter encountered: "​socket options"
Ignoring unknown parameter "​socket options"
Processing section "[obmen]"
Loaded services file OK.
Server role: ROLE_DOMAIN_MEMBER
Press enter to see a dump of your service definitions

[global]
  dos charset = CP437
  workgroup = ***
  realm = ***.LOC
  server string = Frank file Server
  interfaces = 127.0.0.1, 172.20.0.***
  bind interfaces only = Yes
  server role = member server
  security = ADS
  allow trusted domains = No
  map to guest = Bad User
  obey pam restrictions = Yes
\	username map = /usr/local/etc/smbusers
  max log size = 51200
  min receivefile size = 16384
  deadtime = 15
  max open files = 2830079
  hostname lookups = Yes
  load printers = No
  printcap name = /dev/null
  disable spoolss = Yes
  lm announce = Yes
  local master = No
  domain master = No
  dns proxy = No
  cache directory = /var/tmp/.cache/.samba
  pid directory = /var/run/samba
  panic action = /usr/local/libexec/samba/samba-backtrace
  template shell = /bin/sh
  winbind cache time = 7200
  winbind enum users = Yes
  winbind enum groups = Yes
  winbind refresh tickets = Yes
  winbind offline logon = Yes
  nsupdate command = /usr/local/bin/samba-nsupdate -g
  idmap config ***: range = 20000-90000000
  idmap config ***: backend = rid
  idmap config *: range = 90000001-100000000
  idmap config * : backend = tdb
  acl allow execute always = Yes
  create mask = 0664
  directory mask = 0775
  aio read size = 16384
  aio write size = 16384
  aio write behind = true
  ea support = Yes
  directory name cache size = 0
  kernel change notify = No
  use sendfile = Yes
  store dos attributes = Yes
  strict locking = No
  dos filemode = Yes

Answer the question

In order to leave comments, you need to log in

5 answer(s)
O
Oleg Tsilyurik, 2015-11-24
@Olej


The problem is that I run into a speed of 50-60 MiB / s (500 megabit / sec) in 1 stream.
At the same time, if I pour ftp into 1 stream, then I see my client 1 gigabit without straining.
That is, if I understand correctly, you are upset by a 2-fold decrease in the speed of exchange with respect to the speed of the physical channel with a file system completely alien to Linux and just as secondary to it? ... squeeze the last 60-70-80%?
It seems to me that this is not such a strong loss of speed as to bother with it very much. Of course, the exchange over SMB will be slower than over FTP, in the end.

A
athacker, 2015-11-25
@athacker

Samba on Fra has always suffered from performance issues. As far as I know, there is no cure for this. At one time, the community had attempts to appeal to the Samba team on this topic, but they ended after a response from the Samba team in the spirit: "Go through the forest, everything works smoothly on Linux." So if you really need gigabit from Samba, put it on linux.

M
Maxim Kovalenko, 2015-11-26
@maxxx_kovalenko

This trick needs to be added to the smb.conf of the client machine.

# Samba mounted with cifs or smbfs slow, but gvfs is fast. Use this
socket options = TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096

I looked at this on a client machine in ubuntu 12.04
Samba server was on CentOS 5

A
aleks-th, 2021-01-10
@aleks-th

Yes, this is normal, under Linux there will be low performance, because this is a crutch for those who like to cross a snake with a hedgehog.
Or use Windows or reconcile.
--
In general, I do not see any reason to use samba, especially under Linux.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question