Speeding Up Samba in Tomato ND USB Mod with kernel 2.6

Discussion in 'Tomato Firmware' started by rotorbudd, Mar 28, 2010.

  1. rotorbudd

    rotorbudd Addicted to LI Member

    Hopes this helps someone. I'm a Linux newbie but I do know how to read ;)
    I was getting very slow transfers from and too my RT-N16 under samba with a WD USB hard drive under Ubuntu and Win7. i.e. when transferring a 1gig .mp4 file it was less than 2gig a second.
    After doing the Google thing I found some suggestions for modifying the standard smb.conf.
    Take a look at this site. . . .http://ogre.ikratko.com/archives/347
    I just added his suggestions to the Samba Custom Configuration in the File Sharing section, and restart samba. (I tried to edit the file directly with vi but couldn't get it to stick)
    Speeds in both OS's went up to around 4.5, 5.8gig a second, BTW this guys suggestions for the Win fix screwed up my NIC until I changed back. Maybe it's only good for XP.
  2. teddy_bear

    teddy_bear Network Guru Member

    Interesting... I wonder which of these settings actually helped. Most of them should not have any effect since they set the parameters to their default values.

    Let's see what this site recommends for global options:

    So the only settings that could possibly make a difference are "dead time" and "socket options". "dead time" is just a timeout to kill inactive connections, so unless you have a bunch of clients opening files via Samba, and then leaving their computers unattended, it can't help with performance. The share-level settings also should not affect anything - "delete readonly" just allows to delete read-only files, and "oplocks = yes" is the default setting.

    It leaves us with the "socket options" in the [global] section.

    What if you remove all other settings from the "Samba Custom Configuration" box, and keep the "socket options" only? Will you get the same results?
    Also, did you change/tune the buffer sizes for SO_RCVBUF and SO_SNDBUF, or just used the value recommended on that site - 17520?
  3. mstombs

    mstombs Network Guru Member

    What unit is a "gig a second".
  4. Catalin

    Catalin Addicted to LI Member

    Don't know, but sounds pretty fast...:tongue:
  5. rotorbudd

    rotorbudd Addicted to LI Member

    Sorry, of course I meant meg. a second (wish it was a gig!)
    I tried removing all options but "socket options = TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=17520 SO_SNDBUF=17520 IPTOS_LOWDELAY" and the download speeds stayed within the 4.5 to 5.8 range as before. Removing the last option lowered speeds to under 3 meg.
    I'll try changing the buffer sizes for RCV and SND and let you know.
  6. happytotry

    happytotry Networkin' Nut Member

    only "socket options = TCP_NODELAY IPTOS_LOWDELAY",about 4M/s,from3.85 to 4.3
    without "socket options = TCP_NODELAY IPTOS_LOWDELAY",about 3.6-3.8M/s
    from HDD(1T,ntfs) on router(rt-n16) to vaio fw27 (vista)
  7. free2share

    free2share Addicted to LI Member

    RT-N16: tomato-1.27-NDUSB-9044MIPSR2-beta07-vpn3.6

    With this entry, I get over 400KB/s via VPN to USB

    Without entry, I get over 700KB/s via VPN to USB

    I'm not home to try local wire to USB speed test. I will try that tonight and post it.
  8. asterger

    asterger Network Guru Member

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice