.:. mad science & brainfarts .:.

Tweaking Transfer Rates of SAMBA Shares

When I was setting up SAMBA (SMB) shares on my Debian Wheezy based home server lately, I noticed transfer rates are considerably slower compared to NFS shares provided by the same machine. Particularly if accessed via wireless connection. In order to boost transfer speeds, it is necessary to add few lines to /etc/samba/smb.conf. This works likewise on Ubuntu based systems.

Open a terminal and fire up your editor of choice:

sudo nano /etc/samba/smb.conf

Scroll down to the [global] section and add these lines

max xmit = 65535


read raw = yes

write raw = yes

max connections = 65535

max open files = 65535

Save and exit nano, you know how to do that. Finally, restart your samba server.

sudo service samba restart


sudo /etc/init.d/samba restart

This tweak is not exactly new, however, I was surprised by the results. You could also try max xmit = 131072 and see what works best for you.

3 responses to “Tweaking Transfer Rates of SAMBA Shares

  1. manuti November 16, 2013 at 11:10 pm

    My Raspberry Pi fly after that change … thanks

  2. Charlie May 15, 2014 at 11:33 am

    I had found a recommendation to just have “socket options = TCP_NODELAY” (nothing more on the end of this). however after attempting that i found that the file was link-saved into /tmp/usr/lib … So, without pulling the drive out how can i try mine or yours? and, what is the default settings for SO_SNDBUF and all the others? (i had tried killing samba and nmbd first before the edit)

  3. Charlie May 15, 2014 at 11:42 am

    with the unmodifiable settings it has, (same, but without nodelay) the speed is 7MB/s
    according to http://oreilly.com/openbook/samba/book/appb_02.html some of these are defaults.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: