Tunning Samba for more speed

    • OMV 2.x
    • Resolved
    • Tunning Samba for more speed

      Hello Friends!

      You can have more speed in Samba share inside OMV.
      For this there are some commands to put in EXTRA OPTIONS in GLOBAL section or in share that you want.

      log level = 1
      socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
      read raw = yes
      write raw = yes
      max xmit = 65535
      dead time = 15
      getwd cache = yes


      log level = 1:
      Produce the basic log

      socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536:
      Tells the server to send as many packets as necessary to keep delay low. This will account for a 30 percent speedup by itself. In Samba 2.0 socket options = TCP_NODELAY became the default value.

      SO_SNDBUF and SO_RCVBUF:
      The send and receive buffers can often be the reset to a value higher than that of the operating system. This yields a marginal increase of speed until it reaches a point of diminishing returns. For a modern OpenBSD box serving shares to Windows xp/Vista or Linux machines a SO_SNDBUF and SO_RCVBUF of 65536 increased throughput by as much as 20% by itself.

      Raw read and write:
      These are important performance configuration options; they enable Samba to use large reads and writes to the network, of up to 64KB in a single SMB request. They also require the largest SMB packet structures, SMBreadraw and SMBwriteraw, from which the options take their names. In the past, some clients failed if you tried to use read raw. No clients suffer from this problem now. Read and write raw default to yes, and should be left on unless you find you have one of the ancient buggy clients.

      max xmit:
      In Samba, the option that is directly related with the MTU and window size is max xmit. This option sets the largest block of data Samba will try to write at any one time

      dead time:
      Number of minutes of inactivity before a connection should be terminated.

      getwd cache:
      This option caches the path to the current directory avoiding directory listing waits.

      If you read more about this, click here:
      arm-blog.com/samba-finetuning-for-better-transfer-speeds/

      I hope that help you!

      Thank You

      Douglas
      Douglas Giovani Oechsler
      Prudentópolis-PR-Brazil
    • There is already a dropdown for the log level. I would remove that from extra options. Setting min and max samba protocol can help sometimes as well (depending on clients connecting).
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • You can't manually edit any file that OMV controls without it being replaced at some point. You can put your customizations in the Extra Options box though.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • It was just something to try. There are hundreds of samba tuning parameters. I've never needed them so I'm not the expert. I'm sure there are plenty of posts out there that have ideas.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      It was just something to try. There are hundreds of samba tuning parameters. I've never needed them so I'm not the expert. I'm sure there are plenty of posts out there that have ideas.


      Hello Friends,

      Here at work many people are using OMV samba share folders (more than 70) then, before of tunning Samba when the people copy/paste access share folders, the samba did stay down or manyyyyy slow and after tunning every stay well and fast. We can see the difference.
      Setting max and min protocol...Can stay better?

      Thank you
      Douglas Giovani Oechsler
      Prudentópolis-PR-Brazil