linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Seth Jennings <sjenning@linux.vnet.ibm.com>
To: Shaohua Li <shli@kernel.org>
Cc: linux-mm@kvack.org, bob.liu@oracle.com, dan.magenheimer@oracle.com
Subject: Re: [RFC 0/4] cleancache: SSD backed cleancache backend
Date: Thu, 26 Sep 2013 11:14:01 -0500	[thread overview]
Message-ID: <20130926161401.GA3288@medulla.variantweb.net> (raw)
In-Reply-To: <20130926141428.392345308@kernel.org>

On Thu, Sep 26, 2013 at 10:14:28PM +0800, Shaohua Li wrote:
> Hi,
> 
> This is a cleancache backend which caches page to disk, usually a SSD. The
> usage model is similar like Windows readyboost. Eg, user plugs a USB drive,
> and we use the USB drive to cache clean pages to reduce IO to hard disks.

Very interesting! A few thoughts:

It seems that this is doing at the page level what bcache/dm-cache do at
the block layer.  What is the advantage of doing it this way?

I've always had an issue with cleancache.  It hooks into the page cache
eviction code which is an otherwise fast path.  Clean page cache
eviction is the cheapest kind of memory reclaim. However, cleancache
introduces overhead into this path for an uncertain benefit; namely that
a future page access, if done before it is dropped from the secondary
cache, will be faster.

Another side effect of introducing overhead here is in the case of a
large memory allocation, the reclaim system can evict a LOT of page
cache pages.  It seems that with this model, the eviction/reclaim speed
is throttled by the SSD write speed.

It looks like this set makes quite a few changes outside of the backend
itself.  I'm sure we would have to come up with some convincing use case
in order to justify introducing changes into these highly used paths.

I can see this burning out your SSD as well.  If someone enabled this on
a machine that did large (relative to the size of the SDD) streaming
reads, you'd be writing to the SSD continuously and never have a cache
hit.

Thanks,
Seth

> 
> So far I only did some micro benchmark, for example, access files with size
> excess memory size. The result is positive. Of course we need solid data for
> more real workloads. I'd like some comments/suggestions before I put more time
> on it.
> 
> Thanks,
> Shaohua
> 
> --
> 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>
> 

--
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>

  parent reply	other threads:[~2013-09-26 16:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26 14:14 [RFC 0/4] cleancache: SSD backed cleancache backend Shaohua Li
2013-09-26 14:14 ` [RFC 1/4] cleancache: make put_page async possible Shaohua Li
2013-09-26 14:14 ` [RFC 2/4] cleancache: make get_page " Shaohua Li
2013-09-26 14:14 ` [RFC 3/4] cleancache: invalidate cache at dirty page Shaohua Li
2013-09-26 14:14 ` [RFC 4/4] cleancache: SSD backed cleancache backend Shaohua Li
2013-09-26 16:14 ` Seth Jennings [this message]
2013-09-29  9:19   ` [RFC 0/4] " Shaohua Li
2013-10-09 11:52   ` Theodore Ts'o
2013-10-10 10:24     ` Alex Elsayed
2013-10-10 10:38     ` Bob Liu

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=20130926161401.GA3288@medulla.variantweb.net \
    --to=sjenning@linux.vnet.ibm.com \
    --cc=bob.liu@oracle.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=shli@kernel.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;
as well as URLs for NNTP newsgroup(s).