[olug] tweaks

Vincent vincentr at cox.net
Mon Sep 8 04:21:57 UTC 2003


Hey, someone remembers my name!
I've done a lot of testing and tweaking to get the best NFS performance for my needs.  Here are the proc tweaks and mount options I
use:

NFS Client:
/bin/mount -t nfs -o defaults,async,rw,noatime,rsize=16384,wsize=16384,soft,udp,lock nfs_server:volume /mnt/point
NFS Server: /etc/exports:  (rw,no_root_squash,async,wdelay)

>From /etc/sysctl.conf:
# NFS Performance
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.ipfrag_time = 90
net.ipv4.ipfrag_low_thresh = 393216
net.ipv4.ipfrag_high_thresh = 524288
# Reboot 5 secs after a kernel panic, instead of making me walk to the data center!
kernel.panic = 5


----- Original Message ----- 
From: "Adam Haeder" <adamh at omaha.org>
To: "Omaha Linux User Group" <olug at olug.org>
Sent: Sunday, September 07, 2003 10:01 PM
Subject: [olug] tweaks


> There was some talk at the last OLUG meeting about tweaks to the system
> through /proc. Here is my standard tweaks file that I use on most of my
> servers. The bdflush numbers I got from an article somewhere, and the rest
> are either unique to me or standard 'better than default' values. I put
> this in a file called /etc/rc.d/init.d/tweaks and then call it from
> the symlink S01tweaks in /etc/rc.d/rc3.d.
> I encourage you to read /usr/src/linux/Documentation/filesystems/proc.txt
> for a good explanation of all the fun things you can do with the /proc
> filesystem.
>
> echo "40 0 0 0 60 300 60 0 0" > /proc/sys/vm/bdflush
> echo "262144" > /proc/sys/net/core/rmem_default
> echo "262144" > /proc/sys/net/core/rmem_max
> echo "262144" > /proc/sys/net/core/wmem_max
> echo "262144" > /proc/sys/net/core/wmem_default
> echo "16384 65536" > /proc/sys/net/ipv4/ip_local_port_range
> echo "524288" > /proc/sys/net/ipv4/ipfrag_high_thresh
> echo "393216" > /proc/sys/net/ipv4/ipfrag_low_thresh
> echo "90" > /proc/sys/net/ipv4/ipfrag_time
> echo "1" > /proc/sys/net/ipv4/tcp_syncookies
> echo "0" > /proc/sys/net/ipv4/conf/all/accept_redirects
> echo "0" > /proc/sys/net/ipv4/conf/all/accept_source_route
> echo "1" > /proc/sys/net/ipv4/conf/all/log_martians
> echo "128" >/proc/sys/vm/min-readahead
> echo "256" >/proc/sys/vm/max-readahead
> echo "65535" > /proc/sys/fs/file-max
>
>
> And while we're on the subject of tweaks, I'll throw one in here that I
> have found personally very handy. I think I got most of this by a post
> from Vincent R. many moons ago. I have a couple of servers connected by
> NFS that see A LOT of data moving between them. To optimize this, I have
> the following settings:
>
> On the server:
> In /etc/exports, the line looks like this:
> /dir/to/export
> 192.168.1.0/255.255.255.0(rw,no_root_squash,async,wdelay)
>
> On the client:
> The /etc/fstab entry looks like this:
> server:/dir/to/export        /mnt/server   nfs
> rsize=8192,wsize=8192,timeo=20,retrans=6,async,rw,noatime,intr 0 0
>
> This has helped me avoid messages like the following in my syslog:
> Sep  2 11:59:12 $CLIENT kernel: nfs: server $SERVER not responding, still
> trying
> Sep  2 11:59:13 $CLIENT kernel: nfs: server $SERVER OK
>
> I still these occasionally, when under high load, but much fewer than with
> the default settings.
>
> Cheers
>
> -- 
> Adam Haeder
> Assistant Vice President of Information Technology
> AIM Institute
> adamh at omaha.org
> (402) 345-5025 x115
> PGP Public key: http://www.omaha.org/~adamh/pgp.html
>
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug



More information about the OLUG mailing list