Article Title: Linux Server parameter configuration optimization tips. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
LINUX system tuning record:
Solve the "dst cache overflow" alarm Problem
OS: centos4.3
1. You can change the size of the sliding window (the default value is "1 ")
Echo "1">/proc/sys/net/ipv4/tcp_window_scaling
2. Modify the Kernel shared memory limit to 256 MB. The default value is 2 MB.
Echo 268435456>/proc/sys/kernel/shmall
Echo 268435456>/proc/sys/kernel/shmmax
3. Available proxy ports
Echo "1024 65000">/proc/sys/net/ipv4/ip_local_port_range
4. Disable broadcasting and ping.
Echo "1">/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
Echo "1">/proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
5. Change/proc/sys/net/ipv4/netfilter/ip_conntrack_max to 268435456, and the default value is 65536.
6. echo "1800">/proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established
By default, the established connection will expire after 5 days, and will expire after half an hour, reducing the number of valid connections of ip_conntrack.
7. echo 1>/proc/sys/net/ipv4/tcp_syncookies
To prevent syn ddos attacks and enable TCPsyncookies, The CENTOS4 kernel is supported.
8. echo 2048 & gt;/proc/sys/net/ipv4/tcp_max_syn_backlog
The SYN queue length. Do not set it to too high, which will consume the corresponding memory.
9. echo 3>/proc/sys/net/ipv4/tcp_synack_retries
Number of SYN retries.
10. echo 3>/proc/sys/net/ipv4/tcp_syn_retries
Number of SYN retries.