All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Thornber <thornber@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: dm-cache policy mq: promotion very picky?
Date: Tue, 14 May 2013 14:44:53 +0100	[thread overview]
Message-ID: <20130514134452.GA8304@debian> (raw)
In-Reply-To: <519159B7.3030205@pierre-beck.de>

On Mon, May 13, 2013 at 11:23:04PM +0200, Pierre Beck wrote:
> Maybe I'm misunderstanding how the heuristics work - what makes mq
> pick a block for promotion?

Hi Pierre,

The mq policy is indeed very picky.  The first thing I'd suggest is
you pick up my latest patches if you haven't already:

http://device-mapper.org/patches/3.10/

You just need the dm-cache*.patch ones, apply in the order given in
the series file.

At it's heart mq is v. simple.  It divides time up into slices called
'ticks'.  Hit counts are maintained for all blocks in the cache, and a
group of blocks that we're thinking of promoting.  A cache/origin
block can only be hit once in each tick.  When a candidate block's hit
count goes over a threshold it gets promoted.

The threshold depends on the hit counts of the entries in the cache.

At the moment hit counts don't degrade with time, that's something I
need to add to allow the cache to be more responsive to changing work
loads.


If you start with a discarded device (eg, you've run mkfs).  Then the
cache should fill up v. quickly with my latest patches.  Perhaps it
would be worth verifying this before you start investigating the
effects of sequential io?

- Joe

  reply	other threads:[~2013-05-14 13:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 21:23 dm-cache policy mq: promotion very picky? Pierre Beck
2013-05-14 13:44 ` Joe Thornber [this message]
2013-05-14 18:16   ` Darrick J. Wong
2013-05-15 10:26     ` Joe Thornber

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=20130514134452.GA8304@debian \
    --to=thornber@redhat.com \
    --cc=dm-devel@redhat.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.