All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Gushchin <guro@fb.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Spock <dairinin@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@surriel.com>,
	Sasha Levin <alexander.levin@microsoft.com>
Subject: Re: Memory management issue in 4.18.15
Date: Sat, 20 Oct 2018 17:41:00 +0000	[thread overview]
Message-ID: <20181020174053.GA6149@castle.DHCP.thefacebook.com> (raw)
In-Reply-To: <a655c898-0701-f10d-bbf3-8a0090544560@infradead.org>

On Sat, Oct 20, 2018 at 08:37:28AM -0700, Randy Dunlap wrote:
> [add linux-mm mailing list + people]
> 
> 
> On 10/20/18 4:41 AM, Spock wrote:
> > Hello,
> > 
> > I have a workload, which creates lots of cache pages. Before 4.18.15,
> > the behavior was very stable: pagecache is constantly growing until it
> > consumes all the free memory, and then kswapd is balancing it around
> > low watermark. After 4.18.15, once in a while khugepaged is waking up
> > and reclaims almost all the pages from pagecache, so there is always
> > around 2G of 8G unused. THP is enabled only for madvise case and are
> > not used.
> > 
> > The exact change that leads to current behavior is
> > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.18.y&id=62aad93f09c1952ede86405894df1b22012fd5ab
> > 

Hello!

Can you, please, describe your workload in more details?
Do you use memory cgroups? How many of them? What's the ratio between slabs
and pagecache in the affected cgroup? Is the pagecache mmapped by some process?
Is the majority of the pagecache created by few cached files or the number
of files is big?

This is definitely a strange effect. The change shouldn't affect pagecache
reclaim directly, so the only possibility I see is that because we started
applying some minimal pressure on slabs, we also started reclaim some internal
fs structures under background memory pressure, which leads to a more aggressive
pagecache reclaim.

Thanks!

  reply	other threads:[~2018-10-20 17:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-20 11:41 Memory management issue in 4.18.15 Spock
2018-10-20 15:37 ` Randy Dunlap
2018-10-20 17:41   ` Roman Gushchin [this message]
2018-10-22  8:33 ` Michal Hocko
2018-10-22 15:08   ` Roman Gushchin
2018-10-22 17:01     ` Michal Hocko
2018-10-25 11:26       ` Sasha Levin
2018-10-22 17:35   ` Roman Gushchin
2018-10-22 23:44   ` Roman Gushchin
2018-10-22 23:44     ` Roman Gushchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181020174053.GA6149@castle.DHCP.thefacebook.com \
    --to=guro@fb.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.levin@microsoft.com \
    --cc=dairinin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rdunlap@infradead.org \
    --cc=riel@surriel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.