All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Hugh Dickins <hughd@google.com>, Johannes Weiner <hannes@cmpxchg.org>
Cc: Suleiman Souhlal <suleiman@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Rafael Aquini <aquini@redhat.com>,
	Michal Hocko <mhocko@suse.cz>,
	Yuanhan Liu <yuanhan.liu@linux.intel.com>,
	Seth Jennings <sjennings@variantweb.net>,
	Bob Liu <bob.liu@oracle.com>, Minchan Kim <minchan@kernel.org>,
	Luigi Semenzato <semenzato@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Only force scan in reclaim when none of the LRUs are big enough.
Date: Thu, 27 Mar 2014 16:41:45 -0400	[thread overview]
Message-ID: <53348D09.3060802@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1403151957160.21388@eggly.anvils>

On 03/15/2014 11:36 PM, Hugh Dickins wrote:
> From: Suleiman Souhlal <suleiman@google.com>
>
> Prior to this change, we would decide whether to force scan a LRU
> during reclaim if that LRU itself was too small for the current
> priority. However, this can lead to the file LRU getting force
> scanned even if there are a lot of anonymous pages we can reclaim,
> leading to hot file pages getting needlessly reclaimed.
>
> To address this, we instead only force scan when none of the
> reclaimable LRUs are big enough.
>
> Gives huge improvements with zswap. For example, when doing -j20
> kernel build in a 500MB container with zswap enabled, runtime (in
> seconds) is greatly reduced:
>
> x without this change
> + with this change
>      N           Min           Max        Median           Avg        Stddev
> x   5       700.997       790.076       763.928        754.05      39.59493
> +   5       141.634       197.899       155.706         161.9     21.270224
> Difference at 95.0% confidence
>          -592.15 +/- 46.3521
>          -78.5293% +/- 6.14709%
>          (Student's t, pooled s = 31.7819)
>
> Should also give some improvements in regular (non-zswap) swap cases.
>
> Yes, hughd found significant speedup using regular swap, with several
> memcgs under pressure; and it should also be effective in the non-memcg
> case, whenever one or another zone LRU is forced too small.
>
> Signed-off-by: Suleiman Souhlal <suleiman@google.com>
> Signed-off-by: Hugh Dickins <hughd@google.com>

Acked-by: Rik van Riel <riel@redhat.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Rik van Riel <riel@redhat.com>
To: Hugh Dickins <hughd@google.com>, Johannes Weiner <hannes@cmpxchg.org>
Cc: Suleiman Souhlal <suleiman@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Rafael Aquini <aquini@redhat.com>,
	Michal Hocko <mhocko@suse.cz>,
	Yuanhan Liu <yuanhan.liu@linux.intel.com>,
	Seth Jennings <sjennings@variantweb.net>,
	Bob Liu <bob.liu@oracle.com>, Minchan Kim <minchan@kernel.org>,
	Luigi Semenzato <semenzato@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Only force scan in reclaim when none of the LRUs are big enough.
Date: Thu, 27 Mar 2014 16:41:45 -0400	[thread overview]
Message-ID: <53348D09.3060802@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1403151957160.21388@eggly.anvils>

On 03/15/2014 11:36 PM, Hugh Dickins wrote:
> From: Suleiman Souhlal <suleiman@google.com>
>
> Prior to this change, we would decide whether to force scan a LRU
> during reclaim if that LRU itself was too small for the current
> priority. However, this can lead to the file LRU getting force
> scanned even if there are a lot of anonymous pages we can reclaim,
> leading to hot file pages getting needlessly reclaimed.
>
> To address this, we instead only force scan when none of the
> reclaimable LRUs are big enough.
>
> Gives huge improvements with zswap. For example, when doing -j20
> kernel build in a 500MB container with zswap enabled, runtime (in
> seconds) is greatly reduced:
>
> x without this change
> + with this change
>      N           Min           Max        Median           Avg        Stddev
> x   5       700.997       790.076       763.928        754.05      39.59493
> +   5       141.634       197.899       155.706         161.9     21.270224
> Difference at 95.0% confidence
>          -592.15 +/- 46.3521
>          -78.5293% +/- 6.14709%
>          (Student's t, pooled s = 31.7819)
>
> Should also give some improvements in regular (non-zswap) swap cases.
>
> Yes, hughd found significant speedup using regular swap, with several
> memcgs under pressure; and it should also be effective in the non-memcg
> case, whenever one or another zone LRU is forced too small.
>
> Signed-off-by: Suleiman Souhlal <suleiman@google.com>
> Signed-off-by: Hugh Dickins <hughd@google.com>

Acked-by: Rik van Riel <riel@redhat.com>


  reply	other threads:[~2014-03-27 20:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-16  3:36 [PATCH] mm: Only force scan in reclaim when none of the LRUs are big enough Hugh Dickins
2014-03-16  3:36 ` Hugh Dickins
2014-03-27 20:41 ` Rik van Riel [this message]
2014-03-27 20:41   ` Rik van Riel
2014-03-28 18:10 ` Rafael Aquini
2014-03-28 18:10   ` Rafael Aquini
2014-04-01 19:49 ` Andrew Morton
2014-04-01 19:49   ` Andrew Morton

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=53348D09.3060802@redhat.com \
    --to=riel@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=aquini@redhat.com \
    --cc=bob.liu@oracle.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=minchan@kernel.org \
    --cc=semenzato@google.com \
    --cc=sjennings@variantweb.net \
    --cc=suleiman@google.com \
    --cc=yuanhan.liu@linux.intel.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.