linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Chris Edwards <chris.edwards@otago.ac.nz>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: Paging out when free memory is low but not exhausted (and available memory remains high)
Date: Thu, 23 Jan 2020 13:31:27 +0100	[thread overview]
Message-ID: <20200123123127.GK29276@dhcp22.suse.cz> (raw)
In-Reply-To: <e994b0a76099437b8edbae925e9ccac8@its-mail-p04.registry.otago.ac.nz>

On Wed 22-01-20 00:40:12, Chris Edwards wrote:
> Hi all,
> 
> I've observed a strange behaviour in recent kernels whereby the system will page out, continuously and seemingly needlessly, when free (cf. available) memory is low but not exhausted. Strangely, swap space utilisation does not increase over time, despite the continuous page-outs with little or no page-in activity.
> 
> I've seen this on 5.3 and 5.4 series kernels on Arch Linux on a Dell Optiplex 9020 (Intel Q87 Express, i5-4670 CPU, 12 GiB RAM, no NUMA). I've also replicated the behaviour on a colleague's machine (same configuration).
> 
> 
> To reproduce:
> 
> 
> 1. Get the system in a low-memory state, but not so low that it has to start paging. A convenient way is to use stress/stress-ng:
> 
> 	stress --vm-bytes $(awk '/MemAvailable/{printf "%d\n", $2 * 0.95;}' < /proc/meminfo)k --vm-keep -m 1
> 
> 	Confirm that the system isn't paging, and that memory pressure reported by /proc/pressure/memory remains low:
> 
> 	cat /proc/pressure/memory 
> 	some avg10=0.00 avg60=0.00 avg300=1.54 total=414331152
> 	full avg10=0.00 avg60=0.00 avg300=1.42 total=377927386
> 
> 
> 2. Perform an additional task that will fill up the filesystem cache and/or I/O buffers, such as dd.
> 
> 	dd if=/dev/sda of=/dev/null bs=1048576
> 
> 
> 3. Observe system behaviour (with `vmstat 1`, `xosview`, etc.) while the free memory decreases. Here's what I witness using vmstat:

Could you collect /proc/vmstat every second or so while you observe this
behavior? This should give us more information that vmstat(8) output.

Thanks!
-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2020-01-23 12:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22  0:40 Chris Edwards
2020-01-23 12:31 ` Michal Hocko [this message]
2020-01-24  5:43   ` Chris Edwards
2020-01-24 10:04     ` Michal Hocko
2020-01-24 10:28       ` Michal Hocko
2020-01-27 10:06       ` Johannes Weiner
2020-01-28  3:22         ` Chris Edwards
2020-01-28  4:58           ` Chris Edwards
2020-01-28  7:19             ` Chris Edwards
2020-01-29 11:36               ` Chris Edwards
2020-01-29 13:39                 ` Michal Hocko
2020-01-29 16:39                   ` Johannes Weiner
2020-02-02 22:56                     ` Chris Edwards
2020-02-10  8:50                       ` Michal Hocko

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=20200123123127.GK29276@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=chris.edwards@otago.ac.nz \
    --cc=linux-mm@kvack.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox