linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Roy Sigurd Karlsbakk <roy@karlsbakk.net>
To: linux-lvm <linux-lvm@redhat.com>
Cc: Malin Bruland <malin.bruland@pm.me>
Subject: Re: [linux-lvm] lvconvert --uncache takes hours
Date: Thu, 2 Mar 2023 09:33:46 +0100 (CET)	[thread overview]
Message-ID: <885248342.299.1677746026822.JavaMail.zimbra@karlsbakk.net> (raw)
In-Reply-To: <CAAMCDeftn7gLN8s3EMFer+jJ95dRkdpR4007hDMqNNhjrbGDJA@mail.gmail.com>


----- Original Message -----
> From: "Roger Heflin" <rogerheflin@gmail.com>
> To: "linux-lvm" <linux-lvm@redhat.com>
> Cc: "Malin Bruland" <malin.bruland@pm.me>
> Sent: Thursday, 2 March, 2023 01:51:08
> Subject: Re: [linux-lvm] lvconvert --uncache takes hours

> On Wed, Mar 1, 2023 at 4:50 PM Roy Sigurd Karlsbakk <roy@karlsbakk.net> wrote:
>>
>> Hi all
>>
>> Working with a friend's machine, it has lvmcache turned on with writeback. This
>> has worked well, but now it's uncaching and it takes *hours*. The amount of
>> cache was chosen to 100GB on an SSD not used for much else and the dataset that
>> is being cached, is a RAID-6 set of 10x2TB with XFS on top. The system mainly
>> works with file serving, but also has some VMs that benefit from the caching
>> quite a bit. But then - I wonder - how can it spend hours emptying the cache
>> like this? Most write caching I know of last only seconds or perhaps in really
>> worst case scenarios, minutes. Since this is taking hours, it looks to me
>> something should have been flushed ages ago.
>>
>> Have I (or we) done something very stupid here or is this really how it's
>> supposed to work?
>>
>> Vennlig hilsen
>>
>> roy
> 
> A spinning raid6 array is slow on writes (see raid6  write penalty).
> Because of that the array can only do about 100 write operattions/sec.

About 100 writes/second per data drive, that is. md parallilses I/O well.

> If the disk is doing other work then it only has the extra capacity so
> it could destage slower.

The system was mostly idle.

> A lot depends on how big each chunk is.     The lvmcache indicates the
> smallest chunksize is 32k.
> 
> 100G / 32k = 3 million, and at 100seeks/sec that comes to at least an hour.

Those 100GB was on SSD, not spinning rust. Last I checked, that was the whole point with caching.

> Lvm bookkeeping has to also be written to the spinning disks I would
> think, so 2 hours if the array were idle.

erm - why on earth would you do writes to hdd if you're caching it?

> Throw in a 50% baseload on the disks and you get 4 hours.
> 
> Hours is reasonable.

As I said, the system was idle.

Vennlig hilsen

roy
--
Roy Sigurd Karlsbakk
(+47) 98013356
--
I all pedagogikk er det essensielt at pensum presenteres intelligibelt. Det er et elementært imperativ for alle pedagoger å unngå eksessiv anvendelse av idiomer med xenotyp etymologi. I de fleste tilfeller eksisterer adekvate og relevante synonymer på norsk.

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

  reply	other threads:[~2023-03-02  8:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 22:44 [linux-lvm] lvconvert --uncache takes hours Roy Sigurd Karlsbakk
2023-03-01 22:55 ` Demi Marie Obenour
2023-03-02  0:51 ` Roger Heflin
2023-03-02  8:33   ` Roy Sigurd Karlsbakk [this message]
2023-03-02 11:27     ` Roger Heflin
2023-03-02 17:34   ` Gionatan Danti
2023-03-02 18:33     ` Roger Heflin
2023-03-02 20:47       ` Gionatan Danti

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=885248342.299.1677746026822.JavaMail.zimbra@karlsbakk.net \
    --to=roy@karlsbakk.net \
    --cc=linux-lvm@redhat.com \
    --cc=malin.bruland@pm.me \
    /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).