From 5a967f4a1ec77245fafae1247979f75c03276eca Mon Sep 17 00:00:00 2001 From: Luflosi Date: Tue, 8 Jul 2025 20:08:38 +0200 Subject: [PATCH] nixos/kubo: increase maximum UDP buffer sizes The [quic-go wiki](https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes) now recommends a larger maximum send- and receive buffer size. The change to the documentation was made in April 2024: https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes/_compare/597639d834d5d6c242d37d49a02ed04ca65332c9...a3327deff89d2428d48596ce0e643531f9944f99. Without this change, the Kubo daemon will output this warning: ``` failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 4882 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details. ``` This can be seen while running the NixOS tests. --- nixos/modules/services/network-filesystems/kubo.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/network-filesystems/kubo.nix b/nixos/modules/services/network-filesystems/kubo.nix index 87d83971c706..8c1053f3a55a 100644 --- a/nixos/modules/services/network-filesystems/kubo.nix +++ b/nixos/modules/services/network-filesystems/kubo.nix @@ -330,8 +330,8 @@ in environment.variables.IPFS_PATH = fakeKuboRepo; # https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes - boot.kernel.sysctl."net.core.rmem_max" = lib.mkDefault 2500000; - boot.kernel.sysctl."net.core.wmem_max" = lib.mkDefault 2500000; + boot.kernel.sysctl."net.core.rmem_max" = lib.mkDefault 7500000; + boot.kernel.sysctl."net.core.wmem_max" = lib.mkDefault 7500000; programs.fuse = lib.mkIf cfg.autoMount { userAllowOther = true;