From 04d6a9b546c4a9fea79e4aa6f9d36077018cd5d6 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 10 Mar 2026 03:01:58 -0400 Subject: [PATCH] qbt: DiskIOType = Posix --- services/qbittorrent.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/qbittorrent.nix b/services/qbittorrent.nix index ead19db..4ea5c57 100644 --- a/services/qbittorrent.nix +++ b/services/qbittorrent.nix @@ -111,6 +111,12 @@ # where ZFS txg commits cause periodic I/O stalls. DiskQueueSize = 67108864; # 64MB + # POSIX-compliant disk I/O: uses pread/pwrite instead of mmap. + # On ZFS, mmap forces data into BOTH ARC and Linux page cache (double-caching), + # wasting RAM. pread/pwrite goes only through ARC, maximizing its effectiveness. + # Saved 26 gb of memory!! + DiskIOType = "Posix"; + # === Network buffer tuning (from libtorrent high_performance_seed preset) === # "always stuff at least 1 MiB down each peer pipe, to quickly ramp up send rates" SendBufferLowWatermark = 1024; # 1MB (KiB) -- matches high_performance_seed