kernel.pid_max=16777216
kernel.threads-max=1000000
vm.max_map_count=1000000

kernel.msgmnb=65536
kernel.msgmax=65536
kernel.shmmax=68719476736
kernel.shmall=4294967296
vm.swappiness=1 # minimum swappiness
vm.dirty_background_bytes=52428800
vm.dirty_bytes=52428800
vm.dirty_ratio=0
vm.dirty_background_ratio=0

net.core.rps_sock_flow_entries=32768
fs.file-max=1000000
fs.inotify.max_user_instances=131072
net.ipv4.conf.all.route_localnet=1
net.ipv4.ip_forward=1
net.ipv4.conf.all.forwarding=1
net.ipv4.conf.default.forwarding=1

net.ipv6.conf.all.forwarding=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.lo.forwarding=1
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.accept_ra=2
net.ipv6.conf.default.accept_ra=2

net.ipv4.conf.all.accept_redirects=0
net.ipv4.conf.default.accept_redirects=0
net.ipv4.conf.all.secure_redirects=0
net.ipv4.conf.default.secure_redirects=0
net.ipv4.conf.all.send_redirects=0
net.ipv4.conf.default.send_redirects=0
net.ipv4.conf.default.rp_filter=0
net.ipv4.conf.all.rp_filter=0

net.ipv4.tcp_syncookies=1
net.ipv4.tcp_retries1=2
net.ipv4.tcp_retries2=3
net.ipv4.tcp_orphan_retries=1
net.ipv4.tcp_max_orphans=16384
net.ipv4.tcp_syn_retries=2
net.ipv4.tcp_synack_retries=2
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_fin_timeout=10
net.ipv4.tcp_tw_timeout=30
net.ipv4.tcp_max_tw_buckets=32768
net.ipv4.tcp_max_syn_backlog=32768
net.core.netdev_max_backlog=32768
net.core.somaxconn=32768
net.ipv4.tcp_notsent_lowat=16384
net.ipv4.tcp_abort_on_overflow=1
net.tcp_timestamps=1
net.ipv4.tcp_keepalive_time=60
net.ipv4.tcp_keepalive_probes=3
net.ipv4.tcp_keepalive_intvl=10

net.ipv4.route.gc_timeout=100
net.ipv4.neigh.default.gc_thresh1=1024
net.ipv4.neigh.default.gc_thresh2=4096 
net.ipv4.neigh.default.gc_thresh3=8192
net.ipv6.neigh.default.gc_thresh1=1024
net.ipv6.neigh.default.gc_thresh2=4096
net.ipv6.neigh.default.gc_thresh3=8192

net.ipv4.tcp_fastopen=3
net.ipv4.tcp_autocorking=0
net.ipv4.tcp_slow_start_after_idle=0
net.ipv4.tcp_no_metrics_save=1
net.ipv4.tcp_ecn=0
net.ipv4.tcp_frto=0
net.ipv4.tcp_mtu_probing=0
net.ipv4.tcp_sack=1
net.ipv4.tcp_dsack=1
net.ipv4.tcp_fack=1
net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_adv_win_scale=-2
net.ipv4.tcp_moderate_rcvbuf=1
net.ipv4.tcp_rmem=524288 1048576 67108864
net.ipv4.tcp_wmem=524288 1048576 67108864
net.core.rmem_default=16384
net.core.wmem_default=16384
net.core.rmem_max=67108864
net.core.wmem_max=67108864
net.ipv4.tcp_thin_linear_timeouts=1
net.ipv4.tcp_mem=786432 2097152 3145728
net.ipv4.udp_mem=786432 2097152 3145728
net.ipv4.udp_rmem_min=131072
net.ipv4.udp_wmem_min=131072
net.ipv4.tcp_slow_start_after_idle=0
net.ipv4.tcp_pacing_ss_ratio=1000
net.ipv4.tcp_pacing_ca_ratio=200

net.ipv4.tcp_congestion_control=htcp
net.core.default_qdisc=fq
net.ipv4.ip_local_port_range=1024 65535
net.ipv4.ping_group_range=0 2147483647
net.netfilter.nf_conntrack_max=67108864
net.netfilter.nf_conntrack_buckets=16777216
net.ipv4.tcp_shrink_window=1
