调整Linux内核解决C500k问题
来源:互联网 发布:alpine mysql 编辑:程序博客网 时间:2024/05/19 17:56
原文:
Kernel Options
Several parameters exist to allow for tuning and tweaking of socket-related parameters. In/etc/sysctl.conf
there 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_rmem
andnet.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 = 999999net.ipv4.tcp_rmem = 4096 4096 16777216net.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.conf
to allow for 999,999 open file descriptors for all users.
第一步:
sudo vim /etc/sysctl.conf
增加:
fs.file-max = 999999net.ipv4.tcp_rmem = 4096 4096 8192net.ipv4.tcp_wmem = 4096 4096 8192net.ipv4.ip_local_port_range = 1024 65535
第二步:
sudo vim /etc/security/limits.conf
增加:
* - nofile 999999
sudo reboot
- 调整Linux内核解决C500k问题
- C500K
- Linux Kernel Tuning for C500k
- Linux Kernel Tuning for C500k
- linux内核参数调整
- 用仿真器解决Linux内核加载问题
- VMware调整分辨率&解决鼠标"飘"的问题笔记(Linux)
- linux 内核参数调整说明
- 如何调整Linux内核参数
- linux内核参数调整说明
- LINUX内核参数的调整
- linux 内核参数调整说明
- linux 内核参数调整说明
- LINUX 初始化内核等调整
- linux 内核参数调整说明
- 调整Linux内核驱动初始化
- linux 内核参数调整说明
- Linux内核调整和内核参数详解
- 解决PIL “decoder jpeg not available” 和 “ImportError: The _imaging C module is not installed”的问题
- java学习笔记4 - HashMap,LinkedHashMap,TreeMap对比
- windows下dll注册失败解决办法
- MySQL批量更新死锁案例分析
- 抽象工厂模式(Abstract Factory Pattern)
- 调整Linux内核解决C500k问题
- java iterator如何倒序输出
- 生成GUID的Java程序
- 会议相关转载笔记
- qt信号槽
- Matlab提供了两种方法进行聚类分析
- zoj1128-Atlantis
- js数组操作大全(转)
- [疯狂Java讲义精粹] 第五章|面向对象(下)