From: Joe Thornber <thornber@redhat.com>
To: Brassow Jonathan <jbrassow@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>,
ejt@redhat.com, Mike Snitzer <snitzer@redhat.com>
Subject: Re: [PATCH for-3.14] dm cache: add total cache blocks to status output
Date: Fri, 10 Jan 2014 10:32:59 +0000 [thread overview]
Message-ID: <20140110103258.GD20496@debian> (raw)
In-Reply-To: <684DDE51-1D4E-44AB-8E85-CDD6F38B5D07@redhat.com>
On Thu, Jan 09, 2014 at 03:28:13PM -0600, Brassow Jonathan wrote:
> Yes, that'd be nice if we could have this.
>
> It would be great if chunk_size (i.e. cache block size) was also
> included somehow. If I had that, I could calculate the size of the
> cache using the status output alone. I won't complain much if it
> isn't there though, because I can get that from the mapping table.
Yes, either get it from the table or LVM's metadata. This is static
information, that doesn't change during the lifetime of the cache.
> The reason I like adding the total number of cache blocks is because
> I /can't/ get that information from either type of status (_INFO or
> _TABLE) for the cache target. Instead, I would have to get the
> cache device from the mapping table and query that device for its
> size - possible, but the level of indirection is a pain. As it sits
> in the kernel today, it seems strange to provide some information,
> but not enough to fill in the whole picture.
You do have the information. And since LVM set up these devices I
don't understand why it's so hard to find the size of the fast device
used in the cache.
> Speaking of values I can't compute with the _INFO and _TABLE
> status... "block size" does not mean the same thing for the
> metadata and data numbers - one is in chunk_size and the other is in
> something else (neither seem to be in sectors, as is DM custom).
> Honestly, I'm not very sure why the ratios are provided for the
> metadata area... who cares? Is it info we don't need? No-one has
> ever asked if the RAID or mirror log areas are mostly full. I don't
> need to worry about overfilling, do I?
The metadata block size is always 4k (common to dm-thin, dm-cache and
dm-era), the cache block size is variable. For dm-thin it's
impossible to predict how much metadata space is enough, since it
depends on the number of snapshots, and the degree of metadata sharing
within those snapshots. dm-cache is a lot more predictable, but it is
an error condition we need to check for. For instance;
i) The metadata device may have been created too small in the first
place due to some bug in userland tools.
ii) A bug in the kernel driver may cause a metadata leak (happened last month).
iii) At the moment cache policies have the option of storing a 4byte
'hint' against each cache entry. We do have a patch to make this
hint size variable; this is all tested, and integrated with the
tools. The only reason it wasn't pushed is the policy that was
going to use it didn't go up. As soon as someone dreams up a
policy that needs more space than 4 bytes then metadata use will
become less predictable.
- Joe
next prev parent reply other threads:[~2014-01-10 10:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 21:04 [PATCH for-3.14] dm cache: add total cache blocks to status output Mike Snitzer
2014-01-09 21:28 ` Brassow Jonathan
2014-01-09 22:13 ` Mike Snitzer
2014-01-09 23:55 ` [PATCH v2 for-3.14] dm cache: add block sizes and " Mike Snitzer
2014-01-10 0:09 ` [PATCH] dmts: update CacheStatus to parse new " Mike Snitzer
2014-01-16 1:16 ` [PATCH v2 for-3.14] dm cache: add block sizes and total cache blocks to " Brassow Jonathan
2014-01-16 4:34 ` Mike Snitzer
2014-01-16 17:18 ` Brassow Jonathan
2014-01-16 19:35 ` Mike Snitzer
2014-01-10 1:16 ` [PATCH for-3.14] dm cache: add " Brassow Jonathan
2014-01-10 10:32 ` Joe Thornber [this message]
2014-01-10 10:42 ` Joe Thornber
2014-01-10 14:17 ` Mike Snitzer
2014-01-10 10:11 ` Joe Thornber
2014-01-10 14:10 ` [PATCH v3 for-3.14] dm cache: add block sizes and " Mike Snitzer
2014-01-10 15:13 ` 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=20140110103258.GD20496@debian \
--to=thornber@redhat.com \
--cc=dm-devel@redhat.com \
--cc=ejt@redhat.com \
--cc=jbrassow@redhat.com \
--cc=snitzer@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.