refactor: split sysctl file
This commit is contained in:
parent
f0d2e555ac
commit
1b98ea698d
13 changed files with 346 additions and 127 deletions
21
common/nixos/sysctl/networking/net.nix
Normal file
21
common/nixos/sysctl/networking/net.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot.kernel.sysctl = {
|
||||
# increase the maximum length of processor input queues
|
||||
"net.core.netdev_max_backlog" = 250000;
|
||||
|
||||
# enable BPF JIT hardening for all users
|
||||
# this trades off performance, but can mitigate JIT spraying
|
||||
"net.core.bpf_jit_harden" = 2;
|
||||
|
||||
# increase TCP max buffer size setable using setsockopt()
|
||||
"net.core.rmem_max" = 8388608;
|
||||
"net.core.wmem_max" = 8388608;
|
||||
"net.core.rmem_default" = 8388608;
|
||||
"net.core.wmem_default" = 8388608;
|
||||
#net.core.optmem_max = 40960
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue