75 lines
3.8 KiB
Text
75 lines
3.8 KiB
Text
# Set the maximum watches on files
|
||
fs.inotify.max_user_watches = 600000
|
||
|
||
# For efficiency run-time is transferred between the global pool and CPU local
|
||
# "silos" in a batch fashion. This greatly reduces global accounting pressure
|
||
# on large systems. The amount transferred each time such an update is required
|
||
# is described as the "slice".
|
||
# Larger slice values will reduce transfer overheads, while smaller values allow
|
||
# for more fine-grained consumption.
|
||
kernel.sched_cfs_bandwidth_slice_us = 3000
|
||
|
||
# This file contains the maximum number of memory map areas a process may have. Memory map areas are used as a side-effect of calling malloc, directly by mmap, mprotect, and madvise, and also when loading shared libraries.
|
||
# While most applications need less than a thousand maps, certain programs, particularly malloc debuggers, may consume lots of them, e.g., up to one or two maps per allocation.
|
||
# The default value is 65536
|
||
# Value is higher set to fix games like DayZ, Hogwarts Legacy, Counter Strike 2
|
||
vm.max_map_count = 2147483642
|
||
|
||
# This action will speed up your boot and shutdown, because one less module is loaded. Additionally disabling watchdog timers increases performance and lowers power consumption
|
||
# Disable NMI watchdog
|
||
kernel.nmi_watchdog = 0
|
||
|
||
# Increase the maximum connections
|
||
# The upper limit on how many connections the kernel will accept (default 4096 since kernel version 5.6):
|
||
net.core.somaxconn = 8192
|
||
|
||
# Enable TCP Fast Open
|
||
# TCP Fast Open is an extension to the transmission control protocol (TCP) that helps reduce network latency
|
||
# by enabling data to be exchanged during the sender’s initial TCP SYN [3].
|
||
# Using the value 3 instead of the default 1 allows TCP Fast Open for both incoming and outgoing connections:
|
||
net.ipv4.tcp_fastopen = 3
|
||
|
||
# Enable BBR3
|
||
# The BBR3 congestion control algorithm can help achieve higher bandwidths and lower latencies for internet traffic
|
||
net.ipv4.tcp_congestion_control = bbr
|
||
|
||
# TCP SYN cookie protection
|
||
# Helps protect against SYN flood attacks. Only kicks in when net.ipv4.tcp_max_syn_backlog is reached:
|
||
net.ipv4.tcp_syncookies = 1
|
||
|
||
# TCP Enable ECN Negotiation by default
|
||
net.ipv4.tcp_ecn = 1
|
||
|
||
# TCP Reduce performance spikes
|
||
# Refer https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_for_real_time/7/html/tuning_guide/reduce_tcp_performance_spikes
|
||
net.ipv4.tcp_timestamps = 0
|
||
|
||
# Increase netdev receive queue
|
||
# May help prevent losing packets
|
||
net.core.netdev_max_backlog = 16384
|
||
|
||
# Disable TCP slow start after idle
|
||
# Helps kill persistent single connection performance
|
||
net.ipv4.tcp_slow_start_after_idle = 0
|
||
|
||
# Protect against tcp time-wait assassination hazards, drop RST packets for sockets in the time-wait state. Not widely supported outside of Linux, but conforms to RFC:
|
||
net.ipv4.tcp_rfc1337 = 1
|
||
|
||
# Contains, as a bytes of total available memory that contains free pages and reclaimable
|
||
# pages, the number of pages at which a process which is generating disk writes will itself start
|
||
# writing out dirty data.
|
||
vm.dirty_bytes = 268435456
|
||
|
||
# Contains, as a bytes of total available memory that contains free pages and reclaimable
|
||
# pages, the number of pages at which the background kernel flusher threads will start writing out
|
||
# dirty data.
|
||
vm.dirty_background_bytes = 134217728
|
||
|
||
# The kernel flusher threads will periodically wake up and write old data out to disk. This
|
||
# tunable expresses the interval between those wakeups, in 100'ths of a second (Default is 500).
|
||
vm.dirty_writeback_centisecs = 1500
|
||
|
||
# The sysctl swappiness parameter determines the kernel's preference for pushing anonymous pages or page cache to disk in memory-starved situations.
|
||
# A low value causes the kernel to prefer freeing up open files (page cache), a high value causes the kernel to try to use swap space,
|
||
# and a value of 100 means IO cost is assumed to be equal.
|
||
vm.swappiness = 100
|