[Bug 290207] [ZFS] lowering "vfs.zfs.arc.max" to a low value causes kernel threads of "arc_evict" to use 91% CPU and disks to wait. System gets unresponsive...

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 14 Oct 2025 17:52:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290207

--- Comment #4 from Nils Beyer <nbe@vkf-renzel.de> ---
Another observation of strange behaviors:

I've set "arc.max" to the lowest possible value of "512M" in
"/boot/loader.conf". Then I rebooted the system without any GUI/Xorg and did a
"rm -rf /usr/obj" of a completely filled "/usr/obj"-tree. Wired(!) memory went
up by 1GB to 1.5GB usage. Just by deleting files.

Right after reboot:
---------------------------------- SNIP ---------------------------------- 
# kenv | grep vfs.zfs.arc
vfs.zfs.arc.max="512M"

# top -n 1
 7:40PM  up 19 secs, 1 user, load averages: 0.19, 0.05, 0.02
last pid:  3822;  load averages:    0.19,    0.05,    0.02; battery: 97%  up
0+00:00:20    19:40:37
33 processes:  1 running, 32 sleeping
CPU:  0.5% user,  0.0% nice,  1.8% system,  0.1% interrupt, 97.6% idle
Mem: 37M Active, 41M Inact, 535M Wired, 13G Free
ARC: 89M Total, 17M MFU, 68M MRU, 256K Anon, 598K Header, 1961K Other
     53M Compressed, 126M Uncompressed, 2.37:1 Ratio
Swap: 16G Total, 16G Free
[...]
---------------------------------- SNIP ---------------------------------- 


So far, so good. Half a gig of wired memory usage. Now a "rm -rf /usr/obj".
And then:
---------------------------------- SNIP ---------------------------------- 
# top -n 1
  PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
 3401 colord        8  59    0    46M    15M select   9   0:00   0.44% colord

last pid:  3833;  load averages:    0.25,    0.06,    0.02; battery: 97%  up
0+00:00:26    19:40:43
33 processes:  1 running, 32 sleeping
CPU:  0.4% user,  0.0% nice,  3.8% system,  0.1% interrupt, 95.7% idle
Mem: 36M Active, 41M Inact, 1687M Wired, 12G Free
ARC: 264M Total, 12M MFU, 227M MRU, 368K Anon, 1318K Header, 24M Other
     64M Compressed, 205M Uncompressed, 3.19:1 Ratio
Swap: 16G Total, 16G Free
[...]
---------------------------------- SNIP ---------------------------------- 

Why does it suddenly use 1GB of wired(!) memory now? Where is it used? ARC uses
only 264MB.

It even gets worse after I've rsynced a whole "/usr/obj" from another system.
Then wired memory usage goes up to 2.5GB.

I've attached a short test script and my results for "vmstat -m/-z" for before
and for after...

-- 
You are receiving this mail because:
You are the assignee for the bug.