Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Sep 2018 20:54:11 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        Robert <robert.ayrapetyan@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Sudden grow of memory in "Laundry" state
Message-ID:  <20180911005411.GF2849@raichu>
In-Reply-To: <55b0dd7d-19a3-b566-0602-762b783e8ff3@gmail.com>
References:  <55b0dd7d-19a3-b566-0602-762b783e8ff3@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 10, 2018 at 11:44:52AM -0700, Robert wrote:
> Hi, I have a server with FreeBSD 11.2 and 48 Gigs of RAM where an app 
> with extensive usage of shared memory (24GB allocation) is running.
> 
> After some random amount of time (usually few days of running), there 
> happens a sudden increase of "Laundry" memory grow (from zero to 24G in 
> a few minutes).
> 
> Then slowly it reduces.
> 
> Are described symptoms normal and expected? I've never noticed anything 
> like that on 11.1.

The laundry queue contains dirty inactive pages, which need to be
written back to the swap device or a filesystem before they can be
reused.  When the system is short for free pages, it will scan the
inactive queue looking for clean pages, which can be freed cheaply.
Dirty pages are moved to the laundry queue.  My guess is that the
system was running without a page shortage for a long time, and
suddenly experienced some memory pressure.  This caused lots of
pages to move from the inactive queue to the laundry queue.  Demand
for free pages will then cause pages in the laundry queue to be
written back and freed, or requeued if the page was referenced after
being placed in the laundry queue.  "vmstat -s" and "sysctl vm.stats"
output might make things more clear.

All this is to say that there's nothing particularly abnormal about what
you're observing, though it's not clear what effects this behaviour has
on your workload, if any.  I can't think of any direct reason this would
happen on 11.2 but not 11.1.



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