HomeFreeBSD

Fix arc_p aggressive increase

Description

Fix arc_p aggressive increase

The original ARC paper called for an initial 50/50 MRU/MFU split
and this is accounted in various places where arc_p = arc_c >> 1,
with further adjustment based on ghost lists size/hit. However, in
current code both arc_adapt() and arc_get_data_impl() aggressively
grow arc_p until arc_c is reached, causing unneeded pressure on
MFU and greatly reducing its scan-resistance until ghost list
adjustments kick in.

This patch restores the original behavior of initially having arc_p
as 1/2 of total ARC, without preventing MRU to use up to 100% total
ARC when MFU is empty.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Gionatan Danti <g.danti@assyoma.it>
Closes #14137
Closes #14120

Details

Provenance
shodanshok <g.danti@assyoma.it>Authored on Nov 11 2022, 6:41 PM
GitHub <noreply@github.com>Committed on Nov 11 2022, 6:41 PM
Parents
rG9f4ede63d23b: Add ability to recompress send streams with new compression algorithm
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGb445b25b273d: Fix arc_p aggressive increase (authored by shodanshok <g.danti@assyoma.it>).Nov 11 2022, 6:41 PM