## /etc/sysctl.d/91-sysctl.conf
# enable ipv6
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
net.ipv6.conf.all.forwarding=1
#net.ipv6.conf.all.autoconf=0
#net.ipv6.conf.default.autoconf=0
#net.ipv6.conf.all.accept_ra=0
## docker kube gateway nat :1
net.ipv4.ip_forward = 1
ip_nonlocal_bind = 1
## NAT,GATEWAY:0
## net.ipv4.tcp_tw_recycle = 0
## net.ipv4.tcp_tw_recycle = 1
# anti ddos,but slow:1
#net.ipv4.tcp_syncookies = 1
fs.aio-max-nr = 16777216
fs.file-max = 16777216
fs.nr_open = 16777216
kernel.core_pipe_limit = 0
#kernel.core_pattern=/tmp/core.%e.%p.%t
kernel.core_pattern=/dev/null/core.%e.%p.%t
#disable core dump
fs.suid_dumpable=0
kernel.core_uses_pid = 1
kernel.exec-shield = 1
kernel.randomize_va_space = 1
kernel.msgmax = 65536
kernel.msgmnb = 65536
kernel.sem = 250 32000 100 128
kernel.shmall = 4294967296
kernel.shmmax = 68719476736
kernel.sysrq = 0
kernel.pid_max = 4194303
kernel.perf_cpu_time_max_percent = 5
net.bridge.bridge-nf-call-arptables = 0
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.core.netdev_max_backlog = 524288
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.somaxconn=65535
#net.core.somaxconn=262144
net.core.wmem_default = 8388608
net.core.wmem_max = 16777216
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.all.arp_notify = 1
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.arp_announce = 2
net.ipv4.conf.eth0.accept_source_route = 0
net.ipv4.conf.lo.accept_source_route = 0
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.ip_local_port_range = 10000 65535
net.ipv4.neigh.default.gc_stale_time = 120
net.ipv4.tcp_fin_timeout = 60
#net.ipv4.tcp_keepalive_time = 1200
##net.ipv4.tcp_keepalive_time = 300
##net.ipv4.tcp_keepalive_probes=3
net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 10
net.ipv4.tcp_max_orphans = 3276800
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_max_tw_buckets = 16777216
net.ipv4.tcp_mem = 94500000 915000000 927000000
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_slow_start_after_idle = 1
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_window_scaling = 1
#net.ipv4.tcp_rmem = 4096 87380 4194304
#net.ipv4.tcp_wmem = 4096 65536 4194304
net.ipv4.tcp_rmem = 10240 131072 33554432
net.ipv4.tcp_wmem = 10240 131072 33554432
net.ipv4.tcp_rfc1337=1
# net.ipv4.tcp_congestion_window=10
#net.netfilter.nf_conntrack_max = 16777216
#net.nf_conntrack_max = 16777216
# 16G
#net.netfilter.nf_conntrack_max=16777216
net.nf_conntrack_max = 16777216
net.netfilter.nf_conntrack_max=16777216
net.netfilter.nf_conntrack_buckets=2097152
##net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 600
net.netfilter.nf_conntrack_generic_timeout = 120
# kernel 2.6 only
#net.netfilter.nf_conntrack_tcp_timeout_close = 10
#net.netfilter.nf_conntrack_tcp_timeout_close_wait = 60
#net.netfilter.nf_conntrack_tcp_timeout_established = 180
#net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 120
#net.netfilter.nf_conntrack_tcp_timeout_last_ack = 30
#net.netfilter.nf_conntrack_tcp_timeout_max_retrans = 300
#net.netfilter.nf_conntrack_tcp_timeout_syn_recv = 60
#net.netfilter.nf_conntrack_tcp_timeout_syn_sent = 120
#net.netfilter.nf_conntrack_tcp_timeout_time_wait = 120
#net.netfilter.nf_conntrack_tcp_timeout_unacknowledged = 300
vm.overcommit_memory=1
vm.swappiness = 0
###vm.min_free_kbytes=65536
net.ipv4.tcp_fastopen = 3
net.ipv4.ip_local_reserved_ports =10050,11215,18000-18099,27017,60000-60099
kernel.printk_ratelimit = 30
kernel.printk_ratelimit_burst = 200
# es,oracle
vm.max_map_count=262144
# recommended for hosts with jumbo frames enabled
#net.ipv4.tcp_mtu_probing=1
fs.inotify.max_user_watches = 50000000
fs.inotify.max_user_instances = 50000000
fs.inotify.max_queued_events = 50000000
# net.ipv4.tcp_base_mss = 512
# net.ipv4.ip_no_pmtu_disc = 0
# net.ipv4.tcp_timestamps = 0
# net.ipv4.tcp_sack = 0
# net.ipv4.tcp_low_latency = 0
# arp for vxlan
net.ipv4.neigh.default.gc_thresh3 = 65536
net.ipv4.neigh.default.gc_thresh2 = 49152
net.ipv4.neigh.default.gc_thresh1 = 10240
#bbr for kernel 4.9+
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
vm.dirty_ratio = 10
vm.dirty_background_ratio = 5
# aarch64 secomp
net.core.bpf_jit_limit=452534528
kernel sysctl
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
- 文/潘曉璐 我一進(jìn)店門几晤,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人植阴,你說(shuō)我怎么就攤上這事蟹瘾』常” “怎么了?”我有些...
- 文/不壞的土叔 我叫張陵憾朴,是天一觀的道長(zhǎng)狸捕。 經(jīng)常有香客問我,道長(zhǎng)众雷,這世上最難降的妖魔是什么灸拍? 我笑而不...
- 正文 為了忘掉前任,我火速辦了婚禮砾省,結(jié)果婚禮上鸡岗,老公的妹妹穿的比我還像新娘。我一直安慰自己编兄,他們只是感情好轩性,可當(dāng)我...
- 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著狠鸳,像睡著了一般揣苏。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上件舵,一...
- 那天卸察,我揣著相機(jī)與錄音,去河邊找鬼芦圾。 笑死,一個(gè)胖子當(dāng)著我的面吹牛俄认,可吹牛的內(nèi)容都是我干的个少。 我是一名探鬼主播,決...
- 文/蒼蘭香墨 我猛地睜開眼眯杏,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼夜焦!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起岂贩,我...
- 序言:老撾萬(wàn)榮一對(duì)情侶失蹤茫经,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后萎津,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體卸伞,經(jīng)...
- 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
- 正文 我和宋清朗相戀三年锉屈,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了荤傲。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
- 正文 年R本政府宣布铃彰,位于F島的核電站,受9級(jí)特大地震影響芯咧,放射性物質(zhì)發(fā)生泄漏牙捉。R本人自食惡果不足惜,卻給世界環(huán)境...
- 文/蒙蒙 一唬党、第九天 我趴在偏房一處隱蔽的房頂上張望鹃共。 院中可真熱鬧,春花似錦驶拱、人聲如沸霜浴。這莊子的主人今日做“春日...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)阴孟。三九已至,卻和暖如春税迷,著一層夾襖步出監(jiān)牢的瞬間永丝,已是汗流浹背。 一陣腳步聲響...
- 正文 我出身青樓毕泌,卻偏偏與公主長(zhǎng)得像喝检,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子撼泛,可洞房花燭夜當(dāng)晚...
推薦閱讀更多精彩內(nèi)容
- Sysctl是一個(gè)允許改變正在運(yùn)行中的Linux系統(tǒng)的接口挠说。調(diào)參俠必知必會(huì)[https://www.jianshu...
- 1. 錯(cuò)誤描述 需求:修改容器可用端口范圍 操作:將容器的/etc/sysctl.conf 文件掛載出來(lái),并配置可...
- 今天要介紹的是一個(gè)目前論文中常用到的方法:無(wú)條件kernel核密度、空間靜態(tài)kernel核密度和空間動(dòng)態(tài)kerne...
- micro-kernel 和 macro-kernel 的差別是設(shè)計(jì)思想的不同潘酗。 在此之前討論一個(gè)基本的問題:什么...
- [2014-07-23 14:03:41](javascript:;) kernel.shmmax = 21474...