linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "John Stoffel" <john@stoffel.org>
To: "Brian J. Murrell" <brian@interlinx.bc.ca>
Cc: linux-lvm@lists.linux.dev
Subject: Re: Best use of a small SSD with LVM
Date: Thu, 7 Aug 2025 11:16:37 -0400	[thread overview]
Message-ID: <26772.50005.551492.387442@quad.stoffel.home> (raw)
In-Reply-To: <1b749fa978a120d9d9e3ed1951aa45aa753e8006.camel@interlinx.bc.ca>

>>>>> "Brian" == Brian J Murrell <brian@interlinx.bc.ca> writes:

> I'm wondering what are the best practices for taking advantage of the
> speed of SSDs in combination with spinning rust drives in a volume
> group.

> I have 111GB of free SSD space in the same volume group as all of my
> system's filesystems (/, /usr, /var, /home, various other /var/cache/*
> filesystems, other data, etc.).

> Currently the 111GB PV on the SSD is completely unused.  But I wonder
> what the best use of it is.

> Should I just move entire VGs (i.e. something like /usr or /var or
> something else) on to it, or should I use it with LVM caching?  IOW is
> LVM caching effective?

> LVM caching seems like a lot of guesswork regarding how to split the
> SSD up most effectively so that you have the right size cache for
> the various volumes that you want to cache.  I.e. for every
> filesystem I have in my VG, I need to decide what percentage of the
> SSD I want to use for it and then how big I want the cache LV vs the
> cache metadata LV, etc.  Is there any way to monitor performance of
> the cache VGs to decide if they are being used effectively or if
> space should be moved from one cache LV to another?

I tried LVcache for quite a while when I had more HDDs with small
SSDs, and I didn't really find it make any visible different to me.  I
had my home directory and some scratch areas using this, but never
really got any wall time improvements.

Some of my tests were just reading emails and storing them on the
disk, starting/stopping applications.  Doing kernel compiles (git
pull, make oldconfig, make bzImage, etc) and it just didn't seem to do
much.  

> Can cache LVs be resized to optimize the size of them?  Perhaps I
> created a cache LV too big and it's not being used efficiently and
> then want to reduce it's size and use the freed up space to make a
> different cache LV bigger.

> Assuming one wants a writethrough cache because one does not have
> battery/UPS backed systems (such that they are vulnerable to power
> outages) (writethrough is the correct choice for that situation,
> correct?) is there any point to caching write-mostly filesystems such
> as /var/[log/] with a writethrough cache?

> Any other insights anyone wants to add?

I wouldn't bother honestly, I just never found it to be providing
meaningful performance.  But that's just me.

      parent reply	other threads:[~2025-08-07 15:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06 22:35 Best use of a small SSD with LVM Brian J. Murrell
2025-08-07  2:22 ` matthew patton
2025-08-07  5:59   ` Brian J. Murrell
     [not found]   ` <d754fa089d273.c3f10ab0005ac8@gmail.com>
2025-08-07  6:58     ` Brian J. Murrell
2025-08-07 15:21   ` John Stoffel
2025-08-07 17:45     ` Brian J. Murrell
2025-08-07 15:16 ` John Stoffel [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=26772.50005.551492.387442@quad.stoffel.home \
    --to=john@stoffel.org \
    --cc=brian@interlinx.bc.ca \
    --cc=linux-lvm@lists.linux.dev \
    /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).