linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] How to calculate the LVM SSD cache size?
@ 2014-10-13 12:20 Kees de Jong
  2014-10-14 13:27 ` Zdenek Kabelac
  2014-10-14 21:23 ` Brassow Jonathan
  0 siblings, 2 replies; 3+ messages in thread
From: Kees de Jong @ 2014-10-13 12:20 UTC (permalink / raw)
  To: linux-lvm

Hi,



The documentation is not clear about how big the cache size should be
for optimal performance. It only gives pointers about how big the meta
data for the cache should be.

"Create the cache metadata LV. This LV will hold cache pool metadata.
The size of this LV should be 1000 times smaller than the cache data
LV, with a minimum size of 8MiB."

There is however an example in the man page with a 100GB OriginLV
which apparently needs (at least) 10GB of cache size. But what is the
math? I for example have 4 LV's I want to cache. 6GB, 60GB, 100GB and
2TB and I have a 240GB SSD which will act as the caching disk.

Could someone please fill in the gaps here?




Thanks!
Kees.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] How to calculate the LVM SSD cache size?
  2014-10-13 12:20 [linux-lvm] How to calculate the LVM SSD cache size? Kees de Jong
@ 2014-10-14 13:27 ` Zdenek Kabelac
  2014-10-14 21:23 ` Brassow Jonathan
  1 sibling, 0 replies; 3+ messages in thread
From: Zdenek Kabelac @ 2014-10-14 13:27 UTC (permalink / raw)
  To: LVM general discussion and development

Dne 13.10.2014 v 14:20 Kees de Jong napsal(a):
> Hi,
>
>
>
> The documentation is not clear about how big the cache size should be
> for optimal performance. It only gives pointers about how big the meta
> data for the cache should be.
>
> "Create the cache metadata LV. This LV will hold cache pool metadata.
> The size of this LV should be 1000 times smaller than the cache data
> LV, with a minimum size of 8MiB."
>
> There is however an example in the man page with a 100GB OriginLV
> which apparently needs (at least) 10GB of cache size. But what is the
> math? I for example have 4 LV's I want to cache. 6GB, 60GB, 100GB and
> 2TB and I have a 240GB SSD which will act as the caching disk.
>
> Could someone please fill in the gaps here?
>
>

https://github.com/jthornber/thin-provisioning-tools/blob/master/caching/cache_metadata_size.cc

The recent lvm2 tools (git) should maintain the size of metadata device
at proper size for any given cache pool data device size.

Zdenek

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] How to calculate the LVM SSD cache size?
  2014-10-13 12:20 [linux-lvm] How to calculate the LVM SSD cache size? Kees de Jong
  2014-10-14 13:27 ` Zdenek Kabelac
@ 2014-10-14 21:23 ` Brassow Jonathan
  1 sibling, 0 replies; 3+ messages in thread
From: Brassow Jonathan @ 2014-10-14 21:23 UTC (permalink / raw)
  To: LVM general discussion and development


On Oct 13, 2014, at 7:20 AM, Kees de Jong <keesdejong@gmail.com> wrote:

> Hi,
> 
> 
> 
> The documentation is not clear about how big the cache size should be
> for optimal performance. It only gives pointers about how big the meta
> data for the cache should be.
> 
> "Create the cache metadata LV. This LV will hold cache pool metadata.
> The size of this LV should be 1000 times smaller than the cache data
> LV, with a minimum size of 8MiB."
> 
> There is however an example in the man page with a 100GB OriginLV
> which apparently needs (at least) 10GB of cache size. But what is the
> math? I for example have 4 LV's I want to cache. 6GB, 60GB, 100GB and
> 2TB and I have a 240GB SSD which will act as the caching disk.
> 
> Could someone please fill in the gaps here?

It really does depend on your workload.  We don�t have any general advice yet that I can share on how large the overall cache should be relative to the LV it is caching.  (We can compute how much space is needed for the metadata area for a given cache, which is why we can give advice on those numbers.)

You could try out various sizes and see what happens.  You could also do it a bit more deterministically by watching the number of used cache blocks vs the total cache blocks for you workload, as well as checking other reported metrics such as read/write hits/misses.  Currently, this information is had from �dmsetup status�.

 brassow

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-14 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-13 12:20 [linux-lvm] How to calculate the LVM SSD cache size? Kees de Jong
2014-10-14 13:27 ` Zdenek Kabelac
2014-10-14 21:23 ` Brassow Jonathan

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