zoukankan      html  css  js  c++  java
  • linux系统优化sysctl.conf【转】

    # Kernel sysctl configuration file for Red Hat Linux
    #
    # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
    # sysctl.conf(5) for more details.
    #
    # Use '/sbin/sysctl -a' to list all possible parameters.
    
    # Controls IP packet forwarding
    net.ipv4.ip_forward = 0
    
    # Controls source route verification
    net.ipv4.conf.default.rp_filter = 1
    
    # Do not accept source routing
    net.ipv4.conf.default.accept_source_route = 0
    
    # Controls the System Request debugging functionality of the kernel
    kernel.sysrq = 0
    
    # Controls whether core dumps will append the PID to the core filename.
    # Useful for debugging multi-threaded applications.
    kernel.core_uses_pid = 1
    
    # Controls the use of TCP syncookies
    net.ipv4.tcp_syncookies = 1
    
    # Controls the default maxmimum size of a mesage queue
    kernel.msgmnb = 65536
    
    # Controls the maximum size of a message, in bytes
    kernel.msgmax = 65536
    
    # Controls the maximum shared segment size, in bytes
    kernel.shmmax = 68719476736
    
    # Controls the maximum number of shared memory segments, in pages
    kernel.shmall = 4294967296
    ###pvdriver<begin>
    net.ipv4.conf.all.arp_notify = 1
    net.ipv4.conf.default.arp_notify = 1
    net.ipv4.conf.eth0.arp_notify = 1
    net.ipv4.conf.lo.arp_notify = 1
    ###pvdriver<end>
    #solve 127.0.0.1 unreatched
    net.nf_conntrack_max = 2500000
    net.netfilter.nf_conntrack_max = 2500000
    net.netfilter.nf_conntrack_tcp_timeout_established = 180
    net.netfilter.nf_conntrack_tcp_timeout_time_wait = 120
    net.netfilter.nf_conntrack_tcp_timeout_close_wait = 60
    net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 120
    ##solve too many TIME_WAIT
    net.ipv4.tcp_syncookies = 1
    net.ipv4.tcp_tw_reuse = 1
    net.ipv4.tcp_tw_recycle = 1
    net.ipv4.tcp_fin_timeout = 30
    ###solve closed_wait state
    net.ipv4.tcp_keepalive_time=600
    net.ipv4.tcp_keepalive_probes=3
    net.ipv4.tcp_keepalive_intvl=15
     

    转载于:https://my.oschina.net/mylife993/blog/2999865

  • 相关阅读:
    IE11 for Windows 7 Enterprise With SP1 故障
    UE4 中的人工智能解析—ShooterGame为例
    人类探索地外文明取得的重大进步
    物理读之LRU(近期最少被使用)的深入解析
    iOS开发
    VS2008 集成Lua解释器
    android studio下载地址
    UVA 11235 Frequent values (RMQ)
    又见关系并查集 以POJ 1182 食物链为例
    Android蓝牙技术Bluetooth使用流程(具体解释)
  • 原文地址:https://www.cnblogs.com/paul8339/p/13590331.html
Copyright © 2011-2022 走看看