Monday, August 3, 2009

NetApp NFS mount for Red Hat Linux 5.2

Just another post from my mails, where I have collected some Best Practices for mounting NFS share in RHRL.

Automounter
An automounter can cause a lot of network chatter, so it is best to disable the automounter on your client and set up static mounts before taking a network trace. Automounters depend on the availability of several network infrastructure services. If any of these services is not reliable or performs poorly, it can adversely affect the performance and availability of your NFS clients. When diagnosing an NFS client problem, triple-check your automounter configuration first. It is often wise to disable the automounter before drilling into client problem diagnosis.

LINUX KERNEL TUNING FOR KNFS
sunrpc.tcp_slot_table_entries = 128

Increasing this parameter from the default of 16 to the maximum of 128 increases the number of in-flight Remote Procedure Calls (I/Os). Be sure to edit /etc/init.d/netfs to call /sbin/sysctl –p in the first line of the script so that sunrpc.tcp_slot_table_entries is set before NFS mounts any file systems. If NFS mounts the file systems before this parameter is set, the default value of 16 will be in force.

Mount options
rw,bg,hard,intr,rsize=32768,wsize=32768,vers=3,proto=tcp,timeo=600,retrans=2

Kernel Tuning
Most modern Linux distributions contain a file called /etc/sysctl.conf where you can add changes such as this so they will be executed after every system reboot. Add these lines to your /etc/sysctl.conf file on your client systems:

net.core.rmem_default

262144

Default TCP receive window size (Default buffer size)

Improve network performance for IPbased protocols

net.core.rmem_max

16777216

Max. TCP receive window size.(Max. buffer size)

Improve network performance for IPbased protocols

net.core.wmem_default

262144

Default TCP send window size (Default buffer size)

Improve network performance for IPbased protocols

net.core.wmem_max

16777216

Max. TCP send window size (Max. buffer size)

Improve network performance for IPbased protocols

net.ipv4.tcp_rmem

4096 262144 16777216

Autotuning for TCP receive window size (Default and Max. values are overridden by rmem_default rmem_max)

Improve network performance for IPbased protocols

net.ipv4.tcp_wmem

4096 262144 16777216

Autotuning for TCP send window size (Default and Max. values are overridden by wmem_default wmem_max)

Improve network performance for IPbased protocols

net.ipv4.tcp_window_scaling

1

TCP scaling, allows a TCP window size greater than 65536 to be used

This is enabled by default (value 1), make sure that it doesn't get disabled (Value 0).

net.ipv4.tcp_syncookies

0

Disables generation SYN (crypto) COOKIES

Helps to reduce CPU overhead

net.ipv4.tcp_timestamps

0

Disables new RTTM feature introduced in RFC-1323

Helps to reduce CPU overhead Prevents adding 10-byte overhead to TCP header

net.ipv4.tcp_sack

0

Disables selective ack

Helps to reduce CPU overhead

References:

NetApp whitepaper tr-3700,tr-3183, tr-3369

NetApp Knowledge Base Article 7518

No comments: