D
D
Dmitry Lebedev2015-04-27 07:43:00
Debian
Dmitry Lebedev, 2015-04-27 07:43:00

How to increase download speed in Samba on Debian?

Hello.
There is a server on Debian 7.8 with Samba 3.6.6.
This config is used:

[global]
  workgroup = WORKGROUP
  #realm = WORKGROUP
  netbios name = lazyvat
  server string = Main File Server
#  hosts allow =  10.0.0.0/24 127.0.0.1
#  log file = /var/log/samba/log.smbd
#  max xmit = 64000
# socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=64000 SO_RCVBUF=64000 SO_KEEPALIVE  
 log file = /dev/null
   log level = 0 
  max log size = 50
  dead time = 15
  security = user
 map to guest = bad user
  guest account = nobody
  auth methods = guest, sam_ignoredomain, winbind:ntdomain
  encrypt passwords = yes
  create mask = 0664
  directory mask = 0775
  domain master = no
  local master = yes
  preferred master = yes

#load printers = no
#read size = 32768
#keepalive = 900
#disable spoolss = Yes

  os level = 65
  use mmap = yes
  use sendfile = yes
  dns proxy = no
  #idmap uid = 10000-65000
  #idmap gid = 10000-65000
  dont descend = /proc,/dev,/etc
  admin users =
  null passwords = yes
  oplocks = no
unix extensions = no
  debug level = 1
  server signing = no

 #[Private]
 #path = /DataVolume/Public/
 #comment = Private Share (For Administration Access)
 #security = user
 #writable = yes
 #map read only = no
 #guest only = no
 #guest ok = no


 [Share]
 path = "/var/base/"
 comment = base!
 public =  yes
 guest_ok = yes
 writeable = yes
 browseable = yes

[new] 
 path = "/usr/share/new/"
 comment = new!
 public =  yes
 guest_ok = yes
 writeable = yes
 browseable = yes

The download speed on the ball is very slow (700-800kb / s), in a 100Mb LAN.
I made a test bench with Ubuntu 14.04 with Samba 4.1.6 here, the speed is within 7-8Mb / s, which is already normal.
File for test ISO image weighing 400MB and 4GB.
I did everything on the ESXi virtual machine. I downloaded the file via Windows 7.
On the advice of Google, I played with socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=64000 SO_RCVBUF=64000 SO_KEEPALIVE
None of the options offered helped.
Where and how to cheat in order to increase the speed of downloading files?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Luponos, 2015-04-27
@Bessome

Config on Freebsd, I think you will find similar options for Debian. The meaning of the action:
1. sysctl.conf

net.inet.tcp.sendspace=65535
net.inet.tcp.recvspace=65535
net.inet.udp.maxdgram=57344
net.local.stream.recvspace=65535
net.local.stream.sendspace=65535
kern.ipc.maxsockbuf=16777216
kern.maxfiles=65535
kern.maxfilesperproc=32768
kern.maxvnodes=800000
net.inet.tcp.delayed_ack=0
net.inet.tcp.inflight.enable=0
net.inet.tcp.path_mtu_discovery=0
net.inet.tcp.recvbuf_auto=1
net.inet.tcp.recvbuf_inc=524288
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.recvspace=65535
net.inet.tcp.rfc1323=1
net.inet.tcp.sendbuf_auto=1
net.inet.tcp.sendbuf_inc=524288
net.inet.tcp.sendspace=65535
net.inet.udp.maxdgram=57344
net.inet.udp.recvspace=65535
net.local.stream.recvspace=65535
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.mssdflt=1460
kern.ipc.somaxconn=32768
kern.ipc.shmall=32768
kern.ipc.shmmax=134217728
kern.ipc.semmap=256

smb.conf:
[global]
<что то в конфиге> 
   socket options = SO_RCVBUF=131072 SO_SNDBUF=131072 TCP_NODELAY
    min receivefile size=16384
    use sendfile=true
    aio read size = 65535
    aio write size = 65535
    aio write behind = true
    blocking locks = no
    kernel oplocks = yes
    locking = no
    oplocks = no
    level2 oplocks = no
    posix locking = yes
    strict locking = no
    strict locking = Auto

<что то в конфиге>

if it doesn't work, we are looking for how to enable AIO for samba in Debian.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question