Inactive memory
Fabian Keil
freebsd-listen at fabiankeil.de
Mon Feb 6 12:19:09 UTC 2017
Slawa Olhovchenkov <slw at zxy.spb.ru> wrote:
> What is 'Inactive' memory?
From sys/vm/vm_page.h:
/*
* Each pageable resident page falls into one of four lists:
*
* free
* Available for allocation now.
*
* cache
* Almost available for allocation. Still associated with
* an object, but clean and immediately freeable.
*
* The following lists are LRU sorted:
*
* inactive
* Low activity, candidates for reclamation.
* This is the list of pages that should be
* paged out next.
*
* active
* Pages that are "active" i.e. they have been
* recently referenced.
*
*/
A case-insensitive grep for "inactive" in the directory
will result in a couple of additional relevant comments
and implementation details.
> Can I let is definitly availably for allocation (after some time)?
> Under some load I am got about 30GB of Inactive memory and I am
> prefer migrate this memory to ARC cache.
>
> Can I have assurance about freeing this memory under pressure?
While inactive memory is supposed to be freed under memory
pressure, in vanilla FreeBSD the ARC may shrink to relieve
memory pressure first. In extreme case the ARC may shrink
to its limit while the inactive memory continues to grow.
In ElectroBSD, this patch is supposed to address this:
https://www.fabiankeil.de/sourcecode/electrobsd/ElectroBSD-r312620-6cfa243f1516/0239-sys-vm-Limit-the-inactive-pages-more-aggressively.diff
You could give it a try to see if it helps for your workload.
If you haven't already, you also may want to look at:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187594
Among other things, it contains a bunch of (conflicting)
theories about how the system behaves under memory pressure.
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20170206/b9059d8a/attachment.sig>
More information about the freebsd-hackers
mailing list