Results 1 to 1 of 1
06-28-2004, 12:19 PM #1
- Join Date
- Jan 2004
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..
# 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
and put the changes into effect immediatly by typing
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 1000Seeksadmin - For all your administration and security needs.