cleanup
This commit is contained in:
@@ -133,41 +133,6 @@
|
||||
compressor = "zstd";
|
||||
supportedFilesystems = [ "f2fs" ];
|
||||
};
|
||||
|
||||
# BBR congestion control handles variable-latency VPN connections much
|
||||
# better than CUBIC by probing bandwidth continuously rather than
|
||||
# reacting to packet loss.
|
||||
kernelModules = [ "tcp_bbr" ];
|
||||
|
||||
kernel.sysctl = {
|
||||
# Use BBR + fair queuing for smooth throughput through the WireGuard VPN
|
||||
"net.core.default_qdisc" = "fq";
|
||||
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||
|
||||
# Disable slow-start after idle: prevents TCP from resetting window
|
||||
# size on each burst cycle (the primary cause of the 0 -> 40 MB/s spikes)
|
||||
"net.ipv4.tcp_slow_start_after_idle" = 0;
|
||||
|
||||
# Larger socket buffers to accommodate the VPN bandwidth-delay product
|
||||
# (22ms RTT * target throughput). Current 2.5MB max is too small.
|
||||
"net.core.rmem_max" = 16777216;
|
||||
"net.core.wmem_max" = 16777216;
|
||||
"net.ipv4.tcp_rmem" = "4096 87380 16777216";
|
||||
"net.ipv4.tcp_wmem" = "4096 65536 16777216";
|
||||
|
||||
# Higher backlog for the large number of concurrent torrent connections
|
||||
"net.core.netdev_max_backlog" = 5000;
|
||||
# Faster cleanup of dead connections from torrent peer churn
|
||||
"net.ipv4.tcp_fin_timeout" = 15; # default 60
|
||||
"net.ipv4.tcp_tw_reuse" = 1;
|
||||
|
||||
# Minecraft server optimizations
|
||||
# Disable autogroup for better scheduling of game server threads
|
||||
"kernel.sched_autogroup_enabled" = 0;
|
||||
# Huge pages for Minecraft JVM (ZGC ZGenerational needs heap + ~15% overhead)
|
||||
# 4000MB heap = 2000 pages, plus ~285 for ZGC metadata = ~2285 needed
|
||||
"vm.nr_hugepages" = 2600;
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
@@ -237,8 +202,10 @@
|
||||
hostName = hostname;
|
||||
hostId = "0f712d56";
|
||||
firewall.enable = true;
|
||||
firewall.trustedInterfaces = [ "wg-br" ];
|
||||
|
||||
useDHCP = false;
|
||||
|
||||
# Disabled because of Jellyfin (various issues)
|
||||
enableIPv6 = false;
|
||||
|
||||
interfaces.${eth_interface} = {
|
||||
|
||||
Reference in New Issue
Block a user