From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Minchan Kim <minchan@kernel.org>, Luigi Semenzato <semenzato@google.com>
Cc: linux-mm@kvack.org
Subject: RE: behavior of zram stats, and zram allocation limit
Date: Fri, 23 Nov 2012 08:45:37 -0800 (PST) [thread overview]
Message-ID: <31ca2ed0-d039-4154-bc3d-669d29673706@default> (raw)
In-Reply-To: <20121123055144.GC13626@bbox>
> From: Minchan Kim [mailto:minchan@kernel.org]
> Sent: Thursday, November 22, 2012 10:52 PM
> To: Luigi Semenzato
> Cc: linux-mm@kvack.org; Dan Magenheimer
> Subject: Re: behavior of zram stats, and zram allocation limit
>
> On Wed, Nov 21, 2012 at 02:58:48PM -0800, Luigi Semenzato wrote:
> > Hi,
> >
> > Two questions for zram developers/users. (Please let me know if it is
> > NOT acceptable to use this list for these questions.)
> >
> > 1. When I run a synthetic load using zram from kernel 3.4.0,
> > compr_data_size from /sys/block/zram0 seems to decrease even though
> > orig_data_size stays constant (see below). Is this a bug that was
> > fixed in a later release? (The synthetic load is a bunch of processes
> > that allocate memory, fill half of it with data from /dev/urandom, and
> > touch the memory randomly.) I looked at the code and it looks right.
> > :-P
> >
> > 2. Is there a way of setting the max amount of RAM that zram is
> > allowed to allocate? Right now I can set the size of the
> > *uncompressed* swap device, but how much memory gets allocated depends
> > on the compression ratio, which could vary.
>
> There is no method to limit the RAM size but I think we can implement
> it easily. The only thing we need is just a "voice of customer".
> Why do you need it?
Hi Minchan --
I am not an expert on zram, but I do recall a conversation
with hughd in 2010 along this line and, after some thought,
he concluded it was far harder than it sounds. Since
zram appears as a block device, it is not easy to reject
writes. Zcache circumvents the block I/O system entirely
so "writes" can be managed much more dynamically.
Dan
--
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>
next prev parent reply other threads:[~2012-11-23 16:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 22:58 behavior of zram stats, and zram allocation limit Luigi Semenzato
2012-11-22 0:46 ` Luigi Semenzato
2012-11-23 5:51 ` Minchan Kim
2012-11-23 16:45 ` Dan Magenheimer [this message]
2012-11-23 17:56 ` Luigi Semenzato
2013-02-17 3:25 ` Jaegeuk Hanse
2013-02-19 23:54 ` Minchan Kim
2013-02-17 3:01 ` Jaegeuk Hanse
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=31ca2ed0-d039-4154-bc3d-669d29673706@default \
--to=dan.magenheimer@oracle.com \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=semenzato@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).