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

    Douglas Giovani Oechsler
    Prudentópolis-PR-Brazil

    • Offizieller Beitrag

    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 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • How do you manually edit /etc/samba/smb.conf?


    Can I just vi that file? Seems to get replaced with the parameters in the WebGui after I manually edit smb.conf.


    Thanks.

    • Offizieller Beitrag

    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 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    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

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    • Offizieller Beitrag

    Yep except for log level. There is a already a drop down for that.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Yep. I might even try min protocol = smb2

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    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 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    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

    Douglas Giovani Oechsler
    Prudentópolis-PR-Brazil

  • 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

    Douglas Giovani Oechsler
    Prudentópolis-PR-Brazil

  • I am getting 100mb - 115mb when I copied my file from computer to server. Is it normal on Gigabite connection or is can be better? Just don't know what is normal.

  • I am getting 100mb - 115mb when I copied my file from computer to server. Is it normal on Gigabite connection or is can be better? Just don't know what is normal.

    Are you sure you are getting mbits and not mbytes?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!