From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: Pickles Creator <picklesthecreator@gmail.com>, linux-lvm@lists.linux.dev
Subject: Re: Guidance on increasing cache_pool_max_chunks for lvmcache
Date: Mon, 22 Jul 2024 14:09:22 +0200 [thread overview]
Message-ID: <d9aade3b-498d-4aaa-9ee9-64cb8b82ac33@gmail.com> (raw)
In-Reply-To: <CAF2YDE6gvhs3o4QD4Y_CrDuQb7icHYOpNrgEiGcrwq5-Pe8qNw@mail.gmail.com>
Dne 17. 07. 24 v 13:42 Pickles Creator napsal(a):
> Hi,
>
> I'm currently evaluating using lvmcache with a local disk as a cache
> for a slower network attached disk, both of these are SSDs. The
> default value for `cache_pool_max_chunks` is 1,000,000 and I'm
> wondering the about the reasoning behind this. Is there degradation if
> the value is increased or has it not been tested?
>
> With the current limit, a larger cache will be fairly inefficient with
> smaller random reads due to large chunk size being allocated, and the
> warmup of such a cache would take some time.
>
Hi
The basic idea is that users should not really be creating that large caches
as it may turn out less efficient to manipulate metadata of the cached volume.
Although if you have larger machine with a lot of RAM you can increase this
max value to be i.e. 8 times more.
Other way is to cache bigger chunks (i.e. 256K) - that should also reduce
burden on the metadata manipulation.
Another thing to note is - dm-cache is Hot Spot cache - if you would have
1.000.000 hot spots on your drive - maybe you may consider consider switching
to NVMe for the whole drive instead of caching it.
With all that said - if you have a lot of RAM - raising the limit of
cache_pool_max_chunks is the easy way forward - but it's most likely not the
best utilization of the caching resource (aka having 'chunks' in cache
which are there occupying the space for days/months without any use...)
Regards
Zdenek
prev parent reply other threads:[~2024-07-22 12:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 11:42 Guidance on increasing cache_pool_max_chunks for lvmcache Pickles Creator
2024-07-22 12:09 ` Zdenek Kabelac [this message]
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=d9aade3b-498d-4aaa-9ee9-64cb8b82ac33@gmail.com \
--to=zdenek.kabelac@gmail.com \
--cc=linux-lvm@lists.linux.dev \
--cc=picklesthecreator@gmail.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).