All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <baoquan.he@linux.dev>
To: Klara Modin <klarasmodin@gmail.com>
Cc: "Chris Li" <chrisl@kernel.org>, "Rik van Riel" <riel@surriel.com>,
	"Gregory Price" <gourry@gourry.net>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Nhat Pham" <nphamcs@gmail.com>,
	"Kairui Song" <kasong@tencent.com>,
	"Michal Hocko" <mhocko@kernel.org>,
	"Roman Gushchin" <roman.gushchin@linux.dev>,
	"Shakeel Butt" <shakeel.butt@linux.dev>,
	"Yosry Ahmed" <yosry@kernel.org>,
	"David Hildenbrand" <david@kernel.org>,
	"Muchun Song" <muchun.song@linux.dev>,
	"Kemeng Shi" <shikemeng@huaweicloud.com>,
	"Barry Song" <baohua@kernel.org>,
	"YoungJun Park" <youngjun.park@lge.com>,
	"Chengming Zhou" <chengming.zhou@linux.dev>,
	"Lorenzo Stoakes (Oracle)" <ljs@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	"Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
	"Mike Rapoport" <rppt@kernel.org>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Qi Zheng" <qi.zheng@linux.dev>,
	"Axel Rasmussen" <axelrasmussen@google.com>,
	"Yuanchu Xie" <yuanchu@google.com>, "Wei Xu" <weixugc@google.com>,
	"Wenchao Hao" <haowenchao22@gmail.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Hugh Dickins" <hughd@google.com>,
	"Baolin Wang" <baolin.wang@linux.alibaba.com>,
	"Tejun Heo" <tj@kernel.org>, "Michal Koutný" <mkoutny@suse.com>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Kunwu Chan" <kunwu.chan@linux.dev>,
	"Meta kernel team" <kernel-team@meta.com>,
	"Linux Memory Management List" <linux-mm@kvack.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	linux-doc@vger.kernel.org,
	"open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)"
	<cgroups@vger.kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Kairui Song" <ryncsn@gmail.com>,
	"Joshua Hahn" <joshua.hahnjy@gmail.com>
Subject: Re: Path forward for Virtualized Swap?
Date: Thu, 24 Sep 2026 13:51:50 +0800	[thread overview]
Message-ID: <arS6dvzAI5XLHuG-@MiWiFi-R3L-srv> (raw)
In-Reply-To: <arO0RCCE3Woh_I_z@parmesan.int.kasm.eu>

On 09/23/26 at 02:52pm, Klara Modin wrote:
> Hi,
> 
> On 2026-09-22 21:10:53 -1000, Chris Li wrote:
> > On Tue, Sep 22, 2026 at 5:53 AM Rik van Riel <riel@surriel.com> wrote:
> > >
> > > On Tue, 2026-09-22 at 05:43 -1000, Chris Li wrote:
> > > > On Tue, Sep 22, 2026 at 5:20 AM Gregory Price <gourry@gourry.net>
> > > > wrote:
> > > > >
> > > > > On Tue, Sep 22, 2026 at 03:32:44AM -1000, Chris Li wrote:
> > > > > > > Right now it has 64GB of memory.
> > > > > >
> > > > > > That is exactly my point. You are running 1/8 = 12.5% system ram.
> > > > > >
> > > > >
> > > > > Chris you are missing the point
> > > > >
> > > > > Zswap:           8812236 kB
> > > > > Zswapped:       24927876 kB
> > > >
> > > > I am well aware of the point. The 7%-10% data I provided is before
> > > > compression. After compression, the real saving is about 1.5% - 2%.
> > > >
> > > Here I'm at 28% without any issues, with room for
> > > more.
> > 
> > 28% is one thing, 100% is a difference beast completely. If you
> > haven't tried it, don't assume 100% will behave the same as 28%. There
> > is a point where too much zswap makes the system unusable. It is hard
> > to pinpoint the exact upper boundary. However, figuring out the upper
> > bound larger than that exact boundary is not hard at all. I haven't
> > seen any one can use 100% system RAM sized memory swap out to zswap.
> > If you have a data point showing what that system with 100% swap to
> > zswap looks like, please share it.
> > 
> 
> Chiming in as more of a user perspective.
> 
> On my 4 GiB BPI-F3, I can reach more than 10:1 compression ratio on
> zswap during some parts when building GCC 17 snapshots. E.g:
> 
> MemTotal:        3966864 kB
> SwapCached:        31872 kB
> SwapTotal:      16777212 kB
> SwapFree:       16638128 kB
> Zswap:            280140 kB
> Zswapped:        2859840 kB
> AnonPages:       2927376 kB
> AnonHugePages:   1409024 kB
> 
> While this is 72 % rather than the 100 % you asked for, I think this
> shows that what size a potential limit on the uncompressed size of zswap
> is suitable heavily depends on the workload.
> 
> I have been using vswap consistently on all my machines since about
> August, and I have also tried one or two versions of xswap (but the
> current lack of writeback makes it inconvenient for me). I really

Thanks for testing xswap and reporting issue on xswap rfc v3.

xswap has writeback now. I only built foundation for xswap, while
writeback part was left to other people for collaboration. Finally
I added it.

[RFC PATCH 00/17] mm, swap: xswap writeback to a physical backend
https://lore.kernel.org/all/20260920072043.430390-1-hebaoquan@kylinos.cn/T/#u


> appreciate the work being put in to decouple zswap from needing a
> physical swap device to work.
> 
> > >
> > > > You are not listening. The boundary was set due to feedback from the
> > > > application SLO. Those are real deployments not imaginary usage.
> > > > Please respect the user.
> > > >
> > > Different users need different things.
> > >
> > > The kernel needs to be able to accommodate all of them.
> > >
> > > The kernel default should accommodate the people who
> > > are least capable of configuring their systems.
> > >
> > > Hyperscalers can set their own defaults across their
> > > fleets. They know how to adjust settings.
> > 
> > They can use a safe value, e.g., 100% of RAM. Let the people who know
> > exactly what they want to swap configure the boundary they want.
> 
> My personal preference would be for a default uncapped (or very high,
> and I don't think 100 % of RAM is high) limit on the uncompressed data
> which is backed by zswap, since that would mean one less knob to tune.
> 
> > 
> > Chris
> 
> Regards,
> Klara Modin


  parent reply	other threads:[~2026-09-24  5:52 UTC|newest]

Thread overview: 176+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 21:14 Path forward for Virtualized Swap? Nhat Pham
2026-09-07  5:51 ` Kairui Song
2026-09-08 16:36   ` Nhat Pham
2026-09-11 16:09     ` Kairui Song
2026-09-11 16:57       ` Nhat Pham
2026-09-11 18:14         ` Kairui Song
2026-09-11 19:03           ` Nhat Pham
2026-09-12  8:47             ` Kairui Song
2026-09-14 16:49               ` Nhat Pham
2026-09-08 18:30   ` Johannes Weiner
2026-09-09 16:41     ` Nhat Pham
2026-09-09 17:47       ` Nhat Pham
2026-09-12  9:00       ` Kairui Song
2026-09-12 11:51         ` Johannes Weiner
2026-09-19  7:23           ` Chris Li
2026-09-20  1:06             ` Rik van Riel
2026-09-21  0:18               ` Chris Li
2026-09-21  0:35                 ` Rik van Riel
2026-09-21  0:53                   ` Chris Li
2026-09-14 16:10         ` Nhat Pham
2026-09-10 23:27   ` Nhat Pham
2026-09-07 11:30 ` David Hildenbrand (Arm)
2026-09-08 16:45   ` Nhat Pham
2026-09-10 10:56     ` David Hildenbrand (Arm)
2026-09-10 16:22       ` Nhat Pham
2026-09-10 17:57         ` David Hildenbrand (Arm)
2026-09-11 16:20         ` Kairui Song
2026-09-11 16:56           ` David Hildenbrand (Arm)
2026-09-14 15:00           ` Baoquan He
2026-09-19  6:50             ` Chris Li
2026-09-21 18:55               ` Nhat Pham
2026-09-22 13:38                 ` Chris Li
2026-09-22 14:43                   ` Shakeel Butt
2026-09-22 14:56                     ` Chris Li
2026-09-22 15:07                       ` Johannes Weiner
2026-09-22 15:30                         ` Chris Li
2026-09-22 15:45                           ` Shakeel Butt
2026-09-23  6:44                             ` Chris Li
2026-09-22 15:46                           ` Johannes Weiner
2026-09-22 15:28                       ` Baoquan He
2026-09-25 18:47                         ` Shakeel Butt
2026-10-05 11:06                   ` David Hildenbrand (Arm)
2026-10-07 16:47                     ` Nhat Pham
2026-10-07 16:54                       ` Yosry Ahmed
2026-10-09 17:40                     ` Shakeel Butt
2026-10-13  5:26                     ` Chris Li
2026-10-14 17:17                       ` Kairui Song
2026-10-14 18:46                         ` David Hildenbrand (Arm)
2026-10-14 19:11                         ` Nhat Pham
2026-10-14 20:24                         ` Johannes Weiner
2026-10-13 16:58                     ` Kairui Song
2026-10-13 17:01                       ` Nhat Pham
2026-10-14  1:30                     ` Baoquan He
2026-10-14 19:53                     ` Johannes Weiner
2026-10-19 12:24                       ` Nhat Pham
2026-10-19 12:28                         ` David Hildenbrand (Arm)
2026-10-19 12:35                           ` Nhat Pham
2026-10-21  7:41                             ` Chris Li
2026-10-21  8:18                               ` David Hildenbrand (Arm)
2026-10-21  9:06                                 ` Baoquan He
2026-10-21 20:59                                 ` Huan Nguyen
2026-10-22 12:00                                 ` Youngjun Park
2026-10-21  9:42                               ` Barry Song
2026-10-23 17:24                             ` Nhat Pham
2026-10-23 18:48                               ` Yosry Ahmed
2026-10-23 18:49                                 ` Yosry Ahmed
2026-10-23 20:03                               ` Rik van Riel
2026-10-23 20:25                                 ` Yosry Ahmed
2026-10-23 21:52                                   ` Gregory Price (Meta)
2026-10-23 22:38                                     ` Nhat Pham
2026-10-24 15:50                                 ` Kairui Song
2026-10-24 18:16                                   ` Rik van Riel
2026-10-24 20:48                                     ` Gregory Price (Meta)
2026-10-25  4:21                                     ` Kairui Song
2026-10-26 15:58                                       ` Rik van Riel
2026-10-28  7:38                                         ` Kairui Song
2026-10-26 16:01                                       ` Nhat Pham
2026-10-28  7:42                                         ` Kairui Song
2026-10-28 18:50                               ` Nhat Pham
2026-09-10  7:09 ` Baoquan He
2026-09-10 16:39   ` Shakeel Butt
2026-09-11 13:06     ` Baoquan He
2026-09-11 16:45       ` Shakeel Butt
2026-09-15  5:48         ` Baoquan He
2026-09-15  6:44           ` Baoquan He
2026-09-19  6:55             ` Chris Li
2026-09-19 16:15               ` Rik van Riel
2026-09-19 21:21                 ` Chris Li
2026-09-19 22:50                   ` Rik van Riel
2026-09-21  0:13                     ` Chris Li
2026-09-22 17:54                       ` Nhat Pham
2026-09-23  7:44                         ` Chris Li
2026-09-23 16:30                           ` Shakeel Butt
2026-09-24 11:27                             ` Chris Li
2026-09-24 13:15                               ` Shakeel Butt
2026-09-25 13:15                           ` Kairui Song
2026-09-25 15:41                             ` Johannes Weiner
2026-09-25 19:21                               ` Kairui Song
2026-09-25 20:20                                 ` Johannes Weiner
2026-09-26 21:27                               ` Chris Li
2026-09-27  0:58                                 ` Rik van Riel
2026-09-27  6:23                                   ` Chris Li
2026-09-27 12:29                                     ` Rik van Riel
2026-09-27 16:17                                       ` Chris Li
2026-09-27 18:12                                         ` Rik van Riel
2026-09-27 23:50                                           ` Chris Li
2026-09-25 16:11                             ` Gregory Price
2026-09-25 20:44                               ` Kairui Song
2026-09-25 21:30                                 ` Gregory Price
2026-09-25 21:53                                   ` Johannes Weiner
2026-09-25 16:54                             ` Nhat Pham
2026-09-25 20:26                               ` Kairui Song
2026-09-28 12:38                                 ` Nhat Pham
2026-09-25 19:36                             ` Shakeel Butt
2026-09-25 20:20                               ` Kairui Song
2026-09-19  7:07           ` Chris Li
2026-09-10 17:03   ` Johannes Weiner
2026-09-11 12:27     ` Baoquan He
2026-09-11 16:21       ` Johannes Weiner
2026-09-19  8:45     ` Chris Li
2026-09-19 16:08       ` Gregory Price
2026-09-19 19:02         ` Chris Li
2026-09-20  1:14           ` Rik van Riel
2026-09-20  1:53           ` Gregory Price
2026-09-21  9:43             ` Chris Li
2026-09-21 12:53               ` Gregory Price
2026-09-21 16:11                 ` Chris Li
2026-09-22 17:14                   ` Rik van Riel
2026-09-22 17:21                     ` Nhat Pham
2026-09-23  7:20                       ` Chris Li
2026-09-22 17:31                     ` Johannes Weiner
2026-09-23  7:32                       ` Chris Li
2026-09-23 13:55                         ` Johannes Weiner
2026-09-21 14:06               ` Rik van Riel
2026-09-21 16:15                 ` Chris Li
2026-09-21 15:16               ` Rik van Riel
2026-09-21 16:31                 ` Chris Li
2026-09-21 16:36                   ` Rik van Riel
2026-09-21 18:10                     ` Chris Li
2026-09-21 18:52                       ` Rik van Riel
2026-09-22 13:32                         ` Chris Li
2026-09-22 14:59                           ` Rik van Riel
2026-09-22 15:23                             ` Chris Li
2026-09-22 15:43                               ` Johannes Weiner
2026-09-23  6:10                                 ` Chris Li
2026-09-22 15:48                               ` Rik van Riel
2026-09-23  7:00                                 ` Chris Li
2026-09-23 14:21                                   ` Rik van Riel
2026-09-22 17:32                               ` Nhat Pham
2026-09-23  7:37                                 ` Chris Li
2026-09-23 14:11                                   ` Johannes Weiner
2026-09-23 15:39                                   ` Nhat Pham
2026-09-22 15:20                           ` Gregory Price
2026-09-22 15:43                             ` Chris Li
2026-09-22 15:52                               ` Rik van Riel
2026-09-23  7:10                                 ` Chris Li
2026-09-23 12:52                                   ` Klara Modin
2026-09-23 15:43                                     ` Nhat Pham
2026-09-23 17:26                                       ` Klara Modin
2026-09-24  5:51                                     ` Baoquan He [this message]
2026-09-24  7:20                                       ` Klara Modin
2026-09-24  7:53                                         ` Baoquan He
2026-09-21 10:01           ` Kairui Song
2026-09-21 13:27             ` Gregory Price
2026-09-21 15:27               ` Rik van Riel
2026-09-21 15:48                 ` Gregory Price
2026-09-21 16:32               ` Chris Li
2026-09-21 17:02                 ` Gregory Price
2026-09-23  9:39                   ` Baoquan He
2026-09-23 12:11                     ` Gregory Price
2026-09-24 11:02                     ` Chris Li
2026-09-24 14:18                       ` Gregory Price
2026-09-23 14:34               ` Kairui Song
2026-09-21 18:11             ` Nhat Pham
2026-09-22 17:16           ` Johannes Weiner
2026-09-10 17:16   ` Nhat Pham

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=arS6dvzAI5XLHuG-@MiWiFi-R3L-srv \
    --to=baoquan.he@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=cgroups@vger.kernel.org \
    --cc=chengming.zhou@linux.dev \
    --cc=chrisl@kernel.org \
    --cc=corbet@lwn.net \
    --cc=david@kernel.org \
    --cc=gourry@gourry.net \
    --cc=hannes@cmpxchg.org \
    --cc=haowenchao22@gmail.com \
    --cc=hughd@google.com \
    --cc=joshua.hahnjy@gmail.com \
    --cc=kasong@tencent.com \
    --cc=kernel-team@meta.com \
    --cc=klarasmodin@gmail.com \
    --cc=kunwu.chan@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=muchun.song@linux.dev \
    --cc=nphamcs@gmail.com \
    --cc=qi.zheng@linux.dev \
    --cc=riel@surriel.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rppt@kernel.org \
    --cc=ryncsn@gmail.com \
    --cc=shakeel.butt@linux.dev \
    --cc=shikemeng@huaweicloud.com \
    --cc=skhan@linuxfoundation.org \
    --cc=surenb@google.com \
    --cc=tj@kernel.org \
    --cc=vbabka@kernel.org \
    --cc=weixugc@google.com \
    --cc=yosry@kernel.org \
    --cc=youngjun.park@lge.com \
    --cc=yuanchu@google.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.