Linux系統優化部分核心引數調優中文註釋
應用伺服器sysctl.conf部分引數
## network configurations
net.ipv4.ip_forward = 0 # IP packet forwarding
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_fin_timeout=30 #60,每條至多佔 1.5K 的記憶體
net.ipv4.tcp_keepalive_time=1800 #7200
net.core.netdev_max_backlog=3000 #1000每個網路介面接收資料包的速率比核心處理這些包的速率快時,允許送到佇列的資料包的最大數目
net.ipv4.tcp_max_syn_backlog=4096 #1024 增加TCP SYN佇列長度,使系統可以處理更多的併發連線
net.core.wmem_default = 2097152 #108544,系統套接字緩衝區
net.core.rmem_default = 2097152 #108544,系統套接字緩衝區
net.core.rmem_max=16777216 #131071,系統套接字緩衝區
net.core.wmem_max=16777216 #131071,系統套接字緩衝區
net.ipv4.tcp_rmem=4096 87380 16777216 #4096 87380 174760, TCP接收緩衝區
net.ipv4.tcp_wmem=4096 65536 16777216 #4096 16384 131072, TCP傳送緩衝區
net.ipv4.tcp_mem = 786432 1048576 1572864 # Out of socket memory
net.ipv4.tcp_syncookies=1 #0,防SyncFlood攻擊
net.ipv4.ip_local_port_range = 32768 61000 #用於向外連線的埠範圍,這是預設值
net.ipv4.tcp_max_tw_buckets = 5000 #180000,同時保持TIME_WAIT套接字的最大數量
#以下可能需要載入ip_conntrack模組 modprobe ip_conntrack
# net.ipv4.ip_conntrack_max=6553600
# net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 1800
# net.ipv4.netfilter.ip_conntrack_max=6553600
# net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait=120
# net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait=60
# net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait=120
# net.ipv4.icmp_echo_ignore_all = 1 #0, Disable ping requests
# net.ipv4.icmp_echo_ignore_broadcasts = 1 #1, Enable ignoring broadcasts request
net.ipv4.neigh.default.gc_thresh3 = 40960 #1024
net.ipv4.neigh.default.gc_thresh2 = 20480 #512
net.ipv4.neigh.default.gc_thresh1 = 10240 #128
##以上三條語句可以解決核心中出現的如下兩行錯誤
#Linux kernel: printk: xxxxx messages suppressed.
#Linux kernel: Neighbour table overflow.
## system configurations
fs.file-max = 372901 #23712, 整個系統所有可開啟檔案總數的限制, 可按256/4M記憶體計算值。
# ulimit -n 10000 #某一程式可開啟檔案 總數的限制
# kernel.ctrl-alt-del = 1 #0,Disable CTR+ALT+DEL Restart Keys
附:sysctl.conf
fs.file-max = 372901
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_fin_timeout=30
net.ipv4.tcp_keepalive_time=1800
net.core.netdev_max_backlog=3000
net.ipv4.tcp_max_syn_backlog=4096
net.core.wmem_default = 2097152
net.core.rmem_default = 2097152
net.ipv4.tcp_rmem=4096 87380 16777216
net.core.rmem_max=33554432
net.ipv4.tcp_wmem=4096 65536 16777216
net.core.wmem_max=33554432
net.ipv4.tcp_mem = 786432 1048576 1572864
net.ipv4.tcp_syncookies=1
net.ipv4.tcp_max_tw_buckets = 180000
net.ipv4.ip_conntrack_max=6553600
net.ipv4.netfilter.ip_conntrack_max=6553600
net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait=60
net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait=30
net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait=60
net.ipv4.ip_local_port_range = 32768 61000
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8183550/viewspace-688333/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- swoole優化核心引數調整優化
- Linux雲端計算架構-系統調優【CPU、IO、網路、核心引數調優】Linux架構
- linux核心引數優化重要項Linux優化
- Linux核心調優Linux
- Linux系統調優Linux
- 調優引數
- 大資料叢集核心引數調優大資料
- 數倉調優實戰:GUC引數調優
- Linux 系統優化Linux優化
- mysql 引數調優MySql
- Linux系統效能調優技巧Linux
- Linux系統調優介紹Linux
- 大資料學習—Kafka的核心調優引數大資料Kafka
- Linux系統配置(系統優化)Linux優化
- JVM 引數調優(qbit)JVM
- JVM常用調優引數JVM
- 1,Spark引數調優Spark
- MySQL優化之系統變數優化MySql優化變數
- mysql之 CentOS系統針對mysql引數優化MySqlCentOS優化
- irace package -- 引數調優神器Package
- (3)Linux效能調優之Linux檔案系統Linux
- linux系統關於kernel.sem調優Linux
- tomcat 如何調優,涉及哪些引數Tomcat
- Sklearn GridSearchCV 引數優化優化
- (mysql優化-3) 系統優化MySql優化
- 在Linux中,如何進行系統效能調優?Linux
- nginx引數調優能提升多少效能Nginx
- HBase 核心元件協調及RegionServer JVM引數調優-OLAP商業環境實戰元件ServerJVM
- Linux核心版本以及部分引數與效能之二Linux
- Linux 檔案許可權、系統優化Linux優化
- 常用的 jvm 調優的引數都有哪些JVM
- win10玩csgo優化如何設定_win10系統中csgo優化引數設定方法Win10Go優化
- 系統優化怎麼做-Tomcat優化優化Tomcat
- 介紹幾個Java大型中介軟體系統中須調整的Linux核心引數JavaLinux
- linux修改系統引數Linux
- wget命令優勢及引數選項有什麼?如何學習Linux系統wgetLinux
- Tomcat調優總結(Tomcat自身最佳化、Linux核心最佳化、JVM最佳化)【轉】TomcatLinuxJVM
- Spark Streaming調優引數及最佳實踐深入剖析-Spark商業調優實戰Spark
- Spark應用程式開發引數調優深入剖析-Spark商業調優實戰Spark