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:
    http://www.arm-blog.com/samba-…r-better-transfer-speeds/


    I hope that help you!


    Thank You


    Douglas

  • 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 5.3.9 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    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 5.3.9 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • So, we copy & paste the entire codes into the extra options?


    Code
    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
  • 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 5.3.9 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    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.


    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

  • Well, after fight with my connection I think that I have to tell something in case it can help others. Check your cables.


    I did not realize that I had cables mixed between ethernet cat5 and cat 5e. This, I think, caused a bottleneck and did not allow good connections over samba.



    Please check this before you start modifying things.

  • I have to agree with others. I have added these params to the extra options setting and there is no increase in transmission speed to/from OMV. :'(

    Hello!


    I do not know how many people use your OMV. But, I think after 50, 70 people using the NAS (tansfer, copy, open files) without add these parameters, the network will stay "heavy" "hard" to do files transfers. Here, there are more than 100 people using it and after add the parameters all works fine.


    Thank you!


    Douglas

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!