7.6 CIFS via Unix


Samba is a popular free software product for allowing Unix systems to provide file and print services to Windows systems via SMB and CIFS. Most of the system-level tuning that can be applied for NFS is also valid for Samba, so we will concentrate on a few salient Samba-specific tuning issues. Unfortunately, Samba is not widely deployed in performance-critical areas; you can almost always scale it horizontally (by adding more servers) rather than having to try to squeak out the last few percent out of the server. As a result of this limited necessity, it's hard to find good information about tuning Samba for high performance. With that caveat, here are a few of the things I've learned.

There are two things that you absolutely must avoid when tuning Samba for peak performance: do not leave the log level set to a high level unless you are actively debugging, [32] and realize that strict sync , strict locking , and sync always have huge repercussions for performance ( strict locking less so than the others).

[32] In fact, leave it set to zero.

You can experiment with setting the TCP_NODELAY and IPTOS_LOWDELAY flags; they trade throughput for reduced latency, but may be of limited use. Tuning the send and receive buffers via SO_SNDBUF and SO_RCVBUF is usually not advantageous, so it's probably better to tune them at the system level (see Section 7.4.2.3 earlier in this chapter). You should turn on read raw and write raw, as they allow Samba to pull in big chunks of data from the network (up to 64 KB). If you turn off wide links , which allows you to follow a symbolic link out of your filesystem, turn on getwd cache , which caches directory paths. This prevents "walking" directory trees and can be a substantial performance boost.



System Performance Tuning2002
System Performance Tuning2002
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 97

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net