调整Linux内核解决C500k问题
2012-12-12 13:26
351 查看
原文:
Kernel Options
Several parameters exist to allow for tuning and tweaking of socket-related parameters. In
First is
Second, we have the socket buffer parameters
number of bytes that may be buffered for a socket. Set these low with a tolerant max to reduce the amount of ram used for each socket.
The relevant portions of our config look like this:
Meaning that the kernel allows for 999,999 open file descriptors and each socket buffer has a minimum and default 4096-byte buffer, with a sensible max of 16MB.
We also modified
第一步:
增加:
第二步:
增加:
第三步:
Kernel Options
Several parameters exist to allow for tuning and tweaking of socket-related parameters. In
/etc/sysctl.confthere are a few options we’ve modified.
First is
fs.file-max, the maximum file descriptor limit. The default is quite low so this should be adjusted. Be careful if you’re not ready to go super high.
Second, we have the socket buffer parameters
net.ipv4.tcp_rmemand
net.ipv4.tcp_wmem. These are the buffers for reads and writes respectively. Each requires three integer inputs: min, default, and max. These each correspond to the
number of bytes that may be buffered for a socket. Set these low with a tolerant max to reduce the amount of ram used for each socket.
The relevant portions of our config look like this:
fs.file-max = 999999 net.ipv4.tcp_rmem = 4096 4096 16777216 net.ipv4.tcp_wmem = 4096 4096 16777216
Meaning that the kernel allows for 999,999 open file descriptors and each socket buffer has a minimum and default 4096-byte buffer, with a sensible max of 16MB.
We also modified
/etc/security/limits.confto allow for 999,999 open file descriptors for all users.
第一步:
sudo vim /etc/sysctl.conf
增加:
fs.file-max = 999999 net.ipv4.tcp_rmem = 4096 4096 8192 net.ipv4.tcp_wmem = 4096 4096 8192 net.ipv4.ip_local_port_range = 1024 65535
第二步:
sudo vim /etc/security/limits.conf
增加:
* - nofile 999999
第三步:
sudo reboot
相关文章推荐
- 解决vmware10在linux内核升级后不能启动的问题VMWare Kernel Module Updater
- Linux下磁盘保留空间的调整,解决df看到的空间和实际磁盘大小不一致的问题
- arm-linux内核编译及其问题解决
- Linux下磁盘保留空间的调整,解决df看到的空间和实际磁盘大小不一致的问题
- windows7解决桌面图标大小问题(具体调整方法)
- 解决ubuntu无法调整和保存屏幕亮度的问题
- 2011-11-11(2440linux实验一)编译linux内核遇到的问题及解决办法
- 解决宏碁5750g ubuntu无法调整和保存屏幕亮度的问题
- 解决ubuntu无法调整和保存屏幕亮度的问题【已验证可行】
- [Visio 2007]解决 “类图”调整宽度后,换行的文字溢出的问题(如何调整“类图”的高度?)
- 调整SGA_MAX_SIZE无法启动实例的问题的解决
- Linux内核升级步骤及问题解决方法
- Jenkins遇到问题三:调整jdk版本不生效的解决办法
- linux内核的移植与遭遇问题的解决 启动调试 printascii
- 座位调整问题【解决思路及求证】
- Linux下磁盘保留空间的调整,解决df看到的空间和实际磁盘大小不一致的问题
- 解决MFC应用程序在调整系统比列放大后出错问题心得
- 【解决】移动端设备·横竖屏时页面内容字体大小调整的问题
- 如何通过微调整功能,解决打印位置上下偏移的问题?(转)
- 调整数组顺序使奇数位于偶数前面及运用解耦方法解决扩展问题