1 | #!/bin/bash |
---|
2 | # Program: |
---|
3 | # Kerrighed NFS Performance Tuning |
---|
4 | # History: |
---|
5 | # 2008/03/20 VER.1 |
---|
6 | PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin~/bin |
---|
7 | export PATH |
---|
8 | |
---|
9 | #TCP Tuning |
---|
10 | sysctl -w net.core.rmem_default=262140 |
---|
11 | sysctl -w net.core.rmem_max=8388608 |
---|
12 | sysctl -w net.core.wmem_default=262144 |
---|
13 | sysctl -w net.core.wmem_max=8388608 |
---|
14 | sysctl -w net.ipv4.tcp_rmem="4096 87380 4194304" |
---|
15 | sysctl -w net.ipv4.tcp_wmem="4096 87380 4194304" |
---|
16 | |
---|
17 | #IPC Tuning |
---|
18 | echo "kernel.shmall = 796917578" >> /etc/sysctl.conf |
---|
19 | echo "kernel.shmmax = 796917578" >> /etc/sysctl.conf |
---|
20 | echo "kernel.shmmni = 4096" >> /etc/sysctl.conf |
---|
21 | exit 0 |
---|
22 | |
---|