Parameter Suggested Value
/sbin/ifconfig lo mtu 1500
kernel.msgmni 1024
kernel.sem 1000 32000 32 512
fs.file-max 65535
kernel.shmmax 2147483648
net.ipv4.tcp_max_syn_backlog 8192
相关:
如何调整内核参数
1 sysctl
1)察看所有内核参数
sysctl -a
在sysctl中,分开不同级别的"/"被用“.”所替换。
2)察看单个参数
sysctl net.ipv4.tcp_sack
3)设置参数
sysctl -w net.ipv4.tcp_sack=0
4)使更改的参数生效
sysctl -p
可以将参数保存到文件中,然后使用-p参数使更改生效
sysctl -p /etc/testsysctl.conf
2 With /proc
All you need to use this method of reading and setting variables is the cat and echo commands as well as a standard shell such as bash.
cd /proc/sys/net/ipv4
To see all the variables available, issue the following command
ls
[root@work1 ipv4]# echo "1" > ip_forward
阅读(1531) | 评论(0) | 转发(0) |