[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...
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Nov 2025 22:09:04 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290207
--- Comment #32 from Rick Macklem <rmacklem@FreeBSD.org> ---
Created attachment 265123
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=265123&action=edit
Add a wakeup of the reaper thread to arc_reduce_target_size()
This simple patch might be worth a try to see
if it had any positive effect.
If I read the code correctly, arc_reduce_target_size()
gets called from arc_lowmem(). arc_reduce_target_size()
wakes up the evict thread, but does not wakeup the
reap thread (arc_reap_zthr). I think the reap thread is the one that
will call uma_zone_reclaim() to release pages in the UMA
zone the arc uses. (The call path is something like..
arc_reap_cb()->arc_kmem_reap_soon()->kmem_cache_reap_now()
{ which is actually kmem_cache_reap_soon() }->uma_zone_reclaim().)
Without this patch, the only time the reaper thread gets
woken up is when new entries are created in the arc and
arc_adapt() gets called. Maybe this doesn't happen when
the usage of memory is outside of ZFS?
At least I don't think waking the arc_reap_zthr up in
arc_reduce_target_size() would be harmful, so it might
be worth a try?
--
You are receiving this mail because:
You are the assignee for the bug.