22 lines
807 B
Nix
22 lines
807 B
Nix
{
|
|
# Transparent Hugepages for better memory performance
|
|
boot.kernel.sysctl = {
|
|
"vm.max_map_count" = 1048576; # For some games that need it
|
|
"vm.swappiness" = 200;
|
|
# BBR congestion control
|
|
"net.core.default_qdisc" = "cake";
|
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
|
"kernel.sysrq" = 1; # Enable SysRq for emergency recovery
|
|
|
|
# CachyOS performance tweaks
|
|
"kernel.nmi_watchdog" = 0; # Disable NMI watchdog (reduces overhead)
|
|
"vm.vfs_cache_pressure" = 50; # Better file cache retention
|
|
"vm.dirty_ratio" = 10; # Faster writes to disk
|
|
"vm.dirty_background_ratio" = 5; # Background write threshold
|
|
"kernel.sched_autogroup_enabled" = 0; # Better CPU scheduling for gaming
|
|
|
|
# ECN
|
|
"net.ipv4.tcp_ecn" = 1;
|
|
"net.ipv4.tcp_ecn_fallback" = 1;
|
|
};
|
|
} |