• 请不要在回答技术问题时复制粘贴 AI 生成的内容
wsgzao
V2EX  ›  程序员

sysctl.conf 学习和调优

  •  
  •   wsgzao ·
    wsgzao · Aug 11, 2015 · 4363 views
    This topic created in 3953 days ago, the information mentioned may be changed or developed.

    前言

    记得第一次接触/etc/security/limits.conf/etc/sysctl.conf时是因为部署Oracle时要按需修改内核参数。limits.conf文件实际是Linux PAM(插入式认证模块,Pluggable Authentication Modules)中 pam_limits.so 的配置文件,突破系统的默认限制,对系统访问资源有一定保护作用。 limits.conf 和sysctl.conf区别在于limits.conf是针对用户,而sysctl.conf是针对整个系统参数配置。

    调整limits.conf和sysctl.conf参数是有必要的


    更新历史

    2015年08月10日 - 初稿

    阅读原文 - http://wsgzao.github.io/post/sysctl/

    扩展阅读

    设置Sysctl.conf用以提高Linux的性能(最完整的sysctl.conf优化方案) - http://blog.csdn.net/21aspnet/article/details/6584792
    limits.conf工作原理 - http://my.oschina.net/987openlab/blog/94634
    ulimit命令 - http://man.linuxde.net/ulimit
    Sysctl学习 - http://pengyao.org/sysctl-1.html
    Kernel sysctl configuration file for Linux - https://klaver.it/linux/sysctl.conf
    LTMP索引 - http://wsgzao.github.io/index/#LTMP

    5 replies    2015-08-12 19:49:11 +08:00
    kiritoalex
        1
    kiritoalex  
       Aug 11, 2015 via Android
    已收藏√
    immjun
        2
    immjun  
       Aug 11, 2015
    感谢分享~
    adaibee
        3
    adaibee  
       Aug 12, 2015
    已经收藏,正好最近有用到
    denghongcai
        4
    denghongcai  
       Aug 12, 2015
    ```
    net.ipv4.tcp_tw_recycle = 1
    #开启TCP连接复用功能,允许将time_wait sockets重新用于新的TCP连接(主要针对time_wait连接)
    net.ipv4.tcp_tw_reuse = 1
    ```
    看到这两条我就醉了
    wsgzao
        5
    wsgzao  
    OP
       Aug 12, 2015 via Android
    @denghongcai 所以你看我用在生产的配置就不会加入一些有歧义的参数
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2943 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 12:53 · PVG 20:53 · LAX 05:53 · JFK 08:53
    ♥ Do have faith in what you're doing.