Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several improvements to ARC shrinking #16197

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Commits on Jul 24, 2024

  1. Several improvements to ARC shrinking

     - When receiving memory pressure signal from OS be more strict
    trying to free some memory.  Otherwise kernel may come again and
    request much more.  Return as result how much arc_c was actually
    reduced due to this request, that may be less than requested.
     - On Linux when receiving direct reclaim from some file system
    (that may be ZFS) instead of ignoring request completely, just
    shrink the ARC, but do not wait for eviction.  Waiting there may
    cause deadlock.  Ignoring it as before may put extra pressure on
    other caches and/or swap, and cause OOM if nothing help.  While
    not waiting may result in more ARC evicted later, and may be too
    late if OOM killer activate right now, but I hope it to be better
    than doing nothing at all.
     - On Linux set arc_no_grow before waiting for reclaim, not after,
    or it may grow back while we are waiting.
     - On Linux add new parameter zfs_arc_shrinker_seeks to balance
    ARC eviction cost, relative to page cache and other subsystems.
     - Slightly update Linux arc_set_sys_free() math for new kernels.
    
    Signed-off-by:	Alexander Motin <[email protected]>
    Sponsored by:	iXsystems, Inc.
    amotin committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    2905b40 View commit details
    Browse the repository at this point in the history