how to recycle Inact memory more aggressively?

Fabian Keil freebsd-listen at fabiankeil.de
Sun Mar 13 16:56:40 UTC 2016


Gary Jennejohn <gljennjohn at gmail.com> wrote:

> In the course of the last year or so the behavior of the vm system
> has changed in regard to how aggressively Inact memory is recycled.
> 
> My box has 8GB of memory.  At the moment I'm copying 100s of gigabytes
> from one file system to another one.
> 
> Looking at top I observe that there are about 6GB of Inact memory.
> This value hardly changes.  Instead of aggressively recycling the
> Inact memory the vm now seems to prefer to swap.

Are you using ZFS?

> Last year, can't rmember excatly when, the behavior was totally
> different.  The vm very aggessively recycled Inact memory and,
> even when copying 100s of GB of files, the system hardly swapped.
> 
> It seems rather strange to me that the vm happily allows gigbytes
> of Inact memory to be present and prefers swapping to recyclincg.
>
> Are there any sysctl's I can set to get the old behavior back?

I don't think so.

I'm currently using this patch set to work around the issue:
https://www.fabiankeil.de/sourcecode/electrobsd/vm-limit-inactive-memory-more-aggressively.diff

Patch 4 adds a couple of sysctls that can be used to let the ZFS
ARC indirectly put pressure on the inactive memory until a given
target is reached.

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20160313/5c40fe81/attachment.sig>


More information about the freebsd-current mailing list