Re: how to recycle Inact memory more aggressively?

From: Mark Johnston <markj_at_freebsd.org>
Date: Sun, 13 Mar 2016 18:51:04 -0700
On Sun, Mar 13, 2016 at 06:33:46PM -0700, Adrian Chadd wrote:
> Hi,
> 
> I can reproduce this by doing a mkimage on a large destination file
> image. it looks like it causes all the desktop processes to get paged
> out whilst it's doing so, and then the whole UI freezes until it
> catches up.

mkimg(1) maps the destination file with MAP_NOSYNC, so if it's larger
than RAM, I think it'll basically force the pagedaemon to write out the
image as it tries to reclaim pages from the inactive queue. This can
cause stalls if the pagedaemon blocks waiting for some I/O to complete.
The user/alc/PQ_LAUNDRY branch helps alleviate this problem by using a
different thread to launder dirty pages. I use mkimg on various desktop
machines to build bhyve images and have noticed the problem you're
describing; PQ_LAUNDRY helps quite a bit in that case. But I don't know
why this would be a new problem.

> 
> I'll poke alc and others to see if I can figure out how to trace
> what's going on. eg, are we running out of free pages and instead of
> waiting, deciding we're okay just paging out binaries/libraries so we
> can issue more dirty write io..
> 
> 
> -a
Received on Mon Mar 14 2016 - 00:48:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:03 UTC