系统优化 /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf() and sysctl.d().
#关闭ipv6 net.ipv6.conf.all.disable_ipv6 = net.ipv6.conf.default.disable_ipv6 = # 避免放大攻击 net.ipv4.icmp_echo_ignore_broadcasts = # 开启恶意icmp错误消息保护 net.ipv4.icmp_ignore_bogus_error_responses = #关闭路由转发 net.ipv4.ip_forward = net.ipv4.conf.all.send_redirects = net.ipv4.conf.default.send_redirects = #开启反向路径过滤 net.ipv4.conf.all.rp_filter = net.ipv4.conf.default.rp_filter = #处理无源路由的包 net.ipv4.conf.all.accept_source_route = net.ipv4.conf.default.accept_source_route = #关闭sysrq功能 kernel.sysrq = #core文件名中添加pid作为扩展名 kernel.core_uses_pid = # 开启SYN洪水攻击保护 net.ipv4.tcp_syncookies = #修改消息队列长度 kernel.msgmnb = kernel.msgmax = #设置最大内存共享段大小bytes kernel.shmmax = kernel.shmall = #timewait的数量,默认180000 net.ipv4.tcp_max_tw_buckets = net.ipv4.tcp_sack = net.ipv4.tcp_window_scaling = net.ipv4.tcp_rmem = net.ipv4.tcp_wmem = net.core.wmem_default = net.core.rmem_default = net.core.rmem_max = net.core.wmem_max = #每个网络接口接收数据包的速率比内核处理这些包的速率快时,允许送到队列的数据包的最大数目 net.core.netdev_max_backlog = #限制仅仅是为了防止简单的DoS 攻击 net.ipv4.tcp_max_orphans = #未收到客户端确认信息的连接请求的最大值 net.ipv4.tcp_max_syn_backlog = net.ipv4.tcp_timestamps = #内核放弃建立连接之前发送SYNACK 包的数量 net.ipv4.tcp_synack_retries = #内核放弃建立连接之前发送SYN 包的数量 net.ipv4.tcp_syn_retries = #启用timewait 快速回收 net.ipv4.tcp_tw_recycle = #开启重用。允许将TIME-WAIT sockets 重新用于新的TCP 连接 net.ipv4.tcp_tw_reuse = net.ipv4.tcp_mem = net.ipv4.tcp_fin_timeout = #当keepalive 起用的时候,TCP 发送keepalive 消息的频度。缺省是2 小时 net.ipv4.tcp_keepalive_time = #允许系统打开的端口范围 net.ipv4.ip_local_port_range = #修改防火墙表大小,默认65536 #net.netfilter.nf_conntrack_max= #net.netfilter.nf_conntrack_tcp_timeout_established= # 确保无人能修改路由表 net.ipv4.conf.all.accept_redirects = net.ipv4.conf.default.accept_redirects = net.ipv4.conf.all.secure_redirects = net.ipv4.conf.default.secure_redirects =
vm.max_map_count =
fs.file-max=
系统优化 /etc/sysctl.conf的更多相关文章
- 转 Linux调优方案,sysctl.conf的设置
$ /proc/sys/net/core/wmem_max最大socket写buffer,可参考的优化值:873200 $ /proc/sys/net/core/rmem_max最大socket读bu ...
- /etc/sysctl.conf参数解释
/etc/sysctl.conf参数解释: fs.file max = 999999 #表示进程(例如一个worker进程)可能同时打开的最大句柄数,直接限制最大并发连接数 net.ipv4.tcp_ ...
- LINUX优化得很好的sysctl.conf配置
最近找了个不错的sysctl.conf的优化参数,在网站响应上已经算不错了的,time超时连接据说几乎为0了. 系统:centos 5.x sysctl.conf配置参数: kernel.msgmn ...
- 优化Linux内核参数/etc/sysctl.conf sysctl 《高性能Linux服务器构建实战:运维监控、性能调优与集群应用》
优化Linux内核参数/etc/sysctl.conf sysctl <高性能Linux服务器构建实战:运维监控.性能调优与集群应用> http://book.51cto.com/ar ...
- sysctl.conf
linux系统接口 允许改变正在运作linux系统接口Tcp/IP堆栈和虚拟内存系统的高级选项 用来控制Linux网络配置/proc/sys/net/core/ TCP/IP参数修改添加到/etc/s ...
- linux /etc/sysctl.conf 禁止别人ping自己
vi /etc/sysctl.conf如果希望屏蔽别人 ping 你的主机,则加入以下代码:# Disable ping requestsnet.ipv4.icmp_echo_ignore_all = ...
- 内核参数优化/etc/sysctl.conf
net.nf_conntrack_max = 65536000net.netfilter.nf_conntrack_tcp_timeout_established = 1200net.ipv4.tcp ...
- sysctl.conf和limit.conf备忘待查
#################################limits.conf设置################################### #修改最大进程和最大文件打开数限制v ...
- 长连接锁服务优化实践 C10K问题 nodejs的内部构造 limits.conf文件修改 sysctl.conf文件修改
小结: 1. 当文件句柄数目超过 10 之后,epoll 性能将优于 select 和 poll:当文件句柄数目达到 10K 的时候,epoll 已经超过 select 和 poll 两个数量级. 2 ...
随机推荐
- iOS archiveRootObject 归档失败问题
归档失败问题出在路径上,NSHomeDirectory() NSString *stringPath = [NSSearchPathForDirectoriesInDomains(NSDocument ...
- 【LeetCode】142. Linked List Cycle II (2 solutions)
Linked List Cycle II Given a linked list, return the node where the cycle begins. If there is no cyc ...
- XP系统下建立WIFI热点让手机、电脑能上网
http://wenku.baidu.com/view/372c5b1fa300a6c30c229f42.html 这里记录xp系统下建立共享无线网络连接,若是支持手机设备上的话,网络适配器必须是wi ...
- HDU 2256 Problem of Precision (矩阵乘法)
Problem of Precision Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Oth ...
- python学习笔记——线程threading (二)重写run()方法和守护进程daemon()
1 run()方法 1.1 单个线程 在threading.Thread()类中有run()方法. from time import ctime,sleep import threading # 定义 ...
- hive sql 行列转换
-- 对一张大表的每一行,后面加多种label值 -- 其实就是笛卡尔积,举例 -- SELECT * FROM dev.dev_jiadian_user_yuge_temp -- CROSS JOI ...
- ES6 class setTimeout promise async/await 测试Demo
class Person { async getVersion () { return new Promise((resolve, reject) => { setTimeout(functio ...
- 由于CentOS的系统安装了epel-release-latest-7.noarch.rpm 导致在使用yum命令时出现Error: xz compression not available问题
由于CentOS6的系统安装了epel-release-latest-7.noarch.rpm 导致在使用yum命令时出现Error: xz compression not available问题.解 ...
- unity 在Game视图中显示Gizmos
自己画的Gizmos要想在Game视图中能看到,需要把Game视图窗口右上角的"Gizmos"按钮点下去.如图: 比如,下面代码以角色的capsuleCollider中心为中心画一 ...
- How to set JAVA environment variables in Linux or CentOS
How to set JAVA environment variables JAVA_HOME and PATH in Linux After installing new java (jdk or ...