Well this is my first article on WHC.

This article is just about how to tune the sysctl.conf file. This is mainly for high load servers, which large traffic sites on them. I think I learnt this of a guy called James origionally and then as I went through and looked at the files I started to change the way I tuned it and added things on.

So lets get dug in and begin.

You have to be root for this for the obvious reasons..

pico /etc/sysctl.conf
Ok well these are the settings that I PERSONALLY use, many a great system admin have used other codes and they have worked better but unfortunatly they dont share them

# Disables packet forwarding
net.ipv4.ip_forward = 0
# Enables source route verification
net.ipv4.conf.default.rp_filter = 1
# Disables the magic-sysrq key
kernel.sysrq = 0
# Decrease the time (default value) for tcp_fin_timeout connection
net.ipv4.tcp_fin_timeout = 25
# Decrease the time (default value) for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time = 3600
# Turn on the tcp_window_scaling
net.ipv4.tcp_window_scaling = 1
# Turn on the tcp_sack
net.ipv4.tcp_sack = 1
# tcp_fack should be on because of sack
net.ipv4.tcp_fack = 1
# Turn on the tcp_timestamps
net.ipv4.tcp_timestamps = 1
# Enable TCP SYN Cookie Protection
net.ipv4.tcp_syncookies = 1
# Enable ignoring broadcasts request
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Disable ICMP Redirect Acceptance
net.ipv4.conf.all.accept_redirects = 0
# Enable bad error message Protection
net.ipv4.icmp_ignore_bogus_error_responses = 1
# Don't Log Spoofed Packets, Source Routed Packets, Redirect Packets
net.ipv4.conf.all.log_martians = 0
# Make more local ports available
net.ipv4.ip_local_port_range = 1024 65000
# Increase maximum amount of memory allocated to shm
kernel.shmmax = 1073741824
# Improve file system performance
vm.bdflush = 100 1200 128 512 15 5000 500 1884 2
Save the File
and put the changes into effect immediatly by typing
/sbin/sysctl -p
Then to make these changes happen instantly
sysctl -w net.ipv4.route.flush=1

You can also increase the size of the interface que. There are a few ways of doing this but I type the command

/sbin/ifconfig eth0 txqueuelen 1000
Thats it.. you have now optimized your server to make the server speed up. I would reccommend you do this to any server with high load... it will speed the server up. You know when the load is so high that images wont load? This fixes that problem! So well try it and ask any questions you want.