Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 2021 17:50:30 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        Kevin Day <toasty@dragondata.com>
Cc:        Alan Somers <asomers@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: The pagedaemon evicts ARC before scanning the inactive page list
Message-ID:  <YKQ2plgOrB66ecL5@nuc>
In-Reply-To: <3CF9B306-6006-41F8-A880-0AE3AF240BF6@dragondata.com>
References:  <CAOtMX2gvkrYS0zYYYtjD%2BAaqv62MzFYFhWPHjLDGXA1=H7LfCg@mail.gmail.com> <3CF9B306-6006-41F8-A880-0AE3AF240BF6@dragondata.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 18, 2021 at 04:37:22PM -0500, Kevin Day wrote:
> I'm not sure if this is the exact same thing, but I believe I'm seeing similar in 12.2-RELEASE as well.
> 
> Mem: 5628M Active, 4043M Inact, 8879M Laundry, 12G Wired, 1152M Buf, 948M Free
> ARC: 8229M Total, 1010M MFU, 6846M MRU, 26M Anon, 32M Header, 315M Other
>      7350M Compressed, 9988M Uncompressed, 1.36:1 Ratio
> Swap: 2689M Total, 2337M Used, 352M Free, 86% Inuse
> 
> Inact will keep growing, then it will exhaust all swap to the point it's complaining (swap_pager_getswapspace(xx): failed), and never recover until it reboots. ARC will keep shrinking and growing, but inactive grows forever. While it hasn't hit a point it's breaking things since the last reboot, on a bigger server (below) I can watch Inactive slowly grow and never free until it's swapping so badly I have to reboot.
> 
> Mem: 9648M Active, 604G Inact, 22G Laundry, 934G Wired, 1503M Buf, 415G Free

This sounds somewhat unrelated.  Under memory pressure the kernel will
reclaim clean pages from the inactive queue, making them available to
other memory consumers like the ARC.  Dirty pages in the inactive queue
have to be written to stable storage before they may be reclaimed; pages
waiting for such treatment show up as "laundry".  If swap space is all
used up, then the kernel likely has no way to reclaim dirty inactive
pages short of killing processes.  So the real question is, what's the
main source of inactive memory on your servers?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YKQ2plgOrB66ecL5>