My Tech notes: Linux SMB write performance With Simple Tips
Subscribe

Unix Documentation

Free Online Unix Training Materials

Lists many links to free Unix training materials.

Pointers and Arrays Materials

Pointers and Arrays materials Explained for C beginners

C FAQ and General Questions C Interview Questions

Powered By

Free XML Skins for Blogger

Powered by Blogger

Tuesday, August 11, 2009

Linux SMB write performance With Simple Tips

SMB write performance can be increased by Tuning the buffer cache.
The secret to good performance is to keep as much of the data in memory for as long as is possible. Writing to the disk is the slowest part of any filesystem. If you know that the filesystem will be heavily used, then you can tune this process for Linux Samba.

writing out dirty blocks to the disk until the filesystem buffer cache is 80 percent full (80). default is 40%, source = http://tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/chap29sec287.html

by writing
echo 80 > /proc/sys/vm/dirty_ratio

I am getting around 2MB increase while write operation, tested in Xp.

I have tried with this single option, as the ref source is for linux 2.2 and we are using 2.6 kernel.
we can try out Linux General Optimization suggested at http://tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/gen-optim.html

Tried with smb.conf, I am getting around 1MB gain while read and write.

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
oplocks = yes
dead time = 15
read size = 32768

TCP socket options can be tested at run time using -O option of SMBD
/usr/local/samba/bin/smbd -O socket optios = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE

source.
http://us1.samba.org/samba/docs/man/Samba3-HOWTO/speed.html

socket level perf improvement also suggests for TCP_NODELAY
ref: http://www.ibm.com/developerworks/linux/library/l-hisock.html

http://www.stuartcheshire.org/papers/NagleDelayedAck/

SAMBA perf tuning ref.

http://oreilly.com/catalog/samba/chapter/book/appb.pdf

No comments:

Post a Comment