51 lines
No EOL
1.2 KiB
Text
51 lines
No EOL
1.2 KiB
Text
# Disable swap
|
|
vm.swappiness = 0
|
|
|
|
# Maximum percentage of memory with disk write buffers
|
|
vm.dirty_ratio = 30
|
|
|
|
# Percentage of memory with disk write buffers until writes start
|
|
vm.dirty_background_ratio = 15
|
|
|
|
# Prefer directory and inode caches
|
|
vm.vfs_cache_pressure = 50
|
|
|
|
# Prefer low latency over high throughput
|
|
net.ipv4.tcp_low_latency = 1
|
|
|
|
# Enable TCP Fast Open (lower latency)
|
|
net.ipv4.tcp_fastopen = 3
|
|
|
|
# Set congestion control to BBR
|
|
net.ipv4.tcp_congestion_control = bbr
|
|
net.core.default_qdisc = fq
|
|
|
|
# Additional send buffer size (improves HTTP/2 prioritization)
|
|
net.ipv4.tcp_notsent_lowat = 16384
|
|
|
|
# Maximum number of established connections
|
|
net.core.somaxconn = 32768
|
|
|
|
# Maximum number of half-open connections
|
|
net.ipv4.tcp_max_syn_backlog = 32768
|
|
|
|
# Receive queue size per CPU core
|
|
net.core.netdev_max_backlog = 16386
|
|
|
|
# Read buffer size
|
|
net.ipv4.tcp_rmem = 4096 65536 102400000
|
|
net.ipv4.udp_rmem_min = 16384
|
|
net.core.rmem_default = 65536
|
|
net.core.rmem_max = 102400000
|
|
|
|
# Write buffer size
|
|
net.ipv4.tcp_wmem = 4096 65536 102400000
|
|
net.ipv4.udp_wmem_min = 16384
|
|
net.core.wmem_default = 65536
|
|
net.core.wmem_max = 102400000
|
|
|
|
# Maximum per-socket optional memory buffer size
|
|
net.core.optmem_max = 65536
|
|
|
|
# Disable slow start restart
|
|
net.ipv4.tcp_slow_start_after_idle = 0 |