CentOS6 8系統核心引數優化

2021-09-21 04:12:11 字數 2044 閱讀 1039

系統核心如下:

centos6.8

[root@localhost ~]# uname -a

linux localhost.localdomain 2.6.32-642.el6.x86_64 #1 smp tue may 10 17:27:01 utc 2016 x86_64 x86_64 x86_64 gnu/linux

伺服器硬碟配置:

2顆cpu,單核12核心,開啟超執行緒

cpu型號:intel(r) xeon(r) cpu e5-2690 v3 @ 2.60ghz (41500元一台機器)

共計48執行緒的邏輯cpu

記憶體是96g

php程式都是短鏈結

優化如下:

[root@localhost ~]# cat /etc/sysctl.conf

net.ipv4.ip_forward= 0

kernel.sysrq = 0

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 68719476736

kernel.shmall = 4294967296

net.ipv4.tcp_syncookies = 1

net.ipv4.tcp_synack_retries = 2

net.ipv4.tcp_syn_retries = 2

vm.overcommit_memory = 1

net.ipv4.tcp_max_syn_backlog = 1638400

net.core.somaxconn = 1638400

net.core.netdev_max_backlog = 20000

net.ipv4.tcp_max_tw_buckets = 1800000

net.ipv4.conf.all.send_redirects = 0

net.ipv4.conf.all.accept_redirects = 0

net.ipv4.tcp_fin_timeout = 10

net.ipv4.tcp_keepalive_time = 90

net.ipv4.ip_local_port_range = 1024 65000 

net.ipv4.tcp_window_scaling = 1

net.ipv4.icmp_echo_ignore_all = 0

net.ipv4.icmp_echo_ignore_broadcasts = 1

net.ipv4.tcp_sack = 0

net.ipv4.tcp_keepalive_probes = 5

net.ipv4.tcp_keepalive_intvl = 30

net.ipv4.tcp_retries2 = 5

net.ipv4.tcp_max_orphans = 262144

net.ipv4.tcp_orphan_retries = 3

net.ipv4.tcp_reordering = 5

net.ipv4.tcp_retrans_collapse = 0

net.ipv4.tcp_wmem = 51200 131072 4194304

net.ipv4.tcp_rmem = 51200 131072 4194304

net.ipv4.tcp_timestamps = 1

net.ipv4.tcp_tw_reuse = 1

net.ipv4.tcp_tw_recycle = 1

net.netfilter.nf_conntrack_max = 655350

net.netfilter.nf_conntrack_tcp_timeout_established = 90

net.netfilter.nf_conntrack_tcp_timeout_close_wait = 30

net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 60

net.netfilter.nf_conntrack_tcp_timeout_time_wait = 60

centos6 8 校對系統時間

我的 centos6.8 的時間一直不對?其實校對方法很簡單。編輯配置檔案 vim etc sysconfig clock zone asia shanghai utc false arc false 2.建連線檔案 ln sf usr share zoneinfo asia shanghai et...

Linux系統安裝 CentOS6 8

通常選擇第一項。在安裝之前測試 第一次用通常點ok。如果ram過小,則只能顯示字元介面。鍵盤布局選擇u.s.english。基本儲存裝置,系統安裝在本地磁碟。設定主機名,系統較多時,命名中可以帶上系統名,方便區分。設定網絡卡,ctrl alt f2切換到命令介面,輸入ifconfig查詢ip是否正常...

CentOS6 8聯網設定

測試環境 win10主機 vmware14 pro centos6.8 1.以root賬戶登入centos,執行如下指令 記下第一行的數值ifcfg eth0,接著在終端輸入 vi etc sysconfig network scripts ifcfg eth0 進入網路配置檔案,在此處設定boot...