nixos-config/common/sysctl.nix
2024-03-22 22:57:05 +01:00

19 lines
467 B
Nix

{
boot.kernel.sysctl = {
# Discourage from swapping out idle processes
"vm.swappiness" = 1;
# Less aggressive vfs cache reclaiming
"vm.vfs_cache_pressure" = 50;
# Less aggressive task migrations
"kernel.sched_autogroup_enabled" = 0;
"kernel.sched_migration_cost_ns" = 5000000;
"net.ipv4.tcp_fastopen" = 3;
"net.ipv4.tcp_tw_reuse" = 1;
"net.ipv4.tcp_congestion_control" = "bbr";
"net.core.default_qdisc" = "fq";
};
}