https://github.com/openzfs/zfs/issues/18893
Host swapping burst observed when ZFS ARC cache grows.
Scenario:
spl_cache_grow_work → __vmalloc → alloc_pages, and it asks for an order-10
allocation, a 4 MiB contiguous block, with GFP_ATOMIC. That is ZFS (the SPL layer) growing one of its slab caches.
which is why the ARC keeps shrinking (8–9 GB, down from about 17 GB).
swappiness never stopped it, since this reclaim is driven by the failed contiguous allocation,not by general memory pressure.
Workarounds:
vm.compaction_proactiveness from 20 to about 60, so kcompactd keeps order-10 blocks available.kcompactd heavy work)kcompact wants to create continous 4MB block will throw to swap lots of small pages)zfs_arc_min (about 16 GB). It stops the kswapd runs from trimming it, but doesn't stop the swapping.zswap: enabling it on more hosts makes these bursts cheap, since the swap-outs would be compressed in RAM.