#!/bin/bash
# Program:
# 	Kerrighed NFS Performance Tuning
# History:
# 2008/03/20 VER.1
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin~/bin
export PATH

#TCP Tuning
sysctl -w net.core.rmem_default=262140
sysctl -w net.core.rmem_max=8388608
sysctl -w net.core.wmem_default=262144
sysctl -w net.core.wmem_max=8388608
sysctl -w net.ipv4.tcp_rmem="4096 87380 4194304"
sysctl -w net.ipv4.tcp_wmem="4096 87380 4194304"

#IPC Tuning
echo "kernel.shmall = 796917578" >> /etc/sysctl.conf
echo "kernel.shmmax = 796917578" >> /etc/sysctl.conf
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
exit 0

