Linux Kernel Tuning for C500k

网友投稿 823 2022-10-03

Linux Kernel Tuning for C500k

Linux Kernel Tuning for C500k

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​​​ and ​​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 = 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.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:小程序名字可以重复么(可以改重复名的小程序)
下一篇:微信小程序怎么用摄像头识别二维码(微信小程序能识别二维码吗)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~