From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>,
Sreyan Chakravarty <sreyan32@gmail.com>
Subject: Re: [linux-lvm] Is TRIM and DISCARD needed for normal HDD ?
Date: Thu, 26 Nov 2020 12:01:33 +0100 [thread overview]
Message-ID: <35aef4e6-5a3c-7fdd-9ea1-ef795e91b00b@redhat.com> (raw)
In-Reply-To: <CAMaziXsttreCZ28V3aw1srY17HFawW_g2DZjvDHSpa+5EeSQag@mail.gmail.com>
Dne 25. 11. 20 v 16:37 Sreyan Chakravarty napsal(a):
> Hi,
>
> I am using thin LVM pools, but I have a normal hard disk and not a SSD.
>
> Is there any reason to enable TRIM and/or DISCARD for my HDD ?
>
> I have heard it is only useful for a SSD. Will it offer any advantages in my
> case ?
>
Hi
Thin-pool is created by default with 'passdown' TRIM/discard support.
This means - discard to thin LV (i.e. fstrim of ext4 on thinLV) gets
propagated to thin-pool, where it may deallocate full chunk when possible
(i.e. if you use 256K chunk, WHOLE chunk must be free to have an effective
discard).
With "passdown" mode - such released chunks are also then passed through to
origin _tdata device - where again some 'alignment rules' of discardable
regions applie (i.e. lot of SSD need 512KiB blocks).
If you have HDD - then clearly such discard stops at thin-pool level
(automatically) and just releases chunks in thin-pool for future reuse.
"ignore" discard mode is usefull in the case you want to keep already
'allocated' chunks for thin LV always there - and also in some case it may
make timing more predictible - as discard requires processing - so it ma
slowdown few things - but at the expense of more filled thin-pool....
Hopefully this makes it clear.
Regards
Zdenek
prev parent reply other threads:[~2020-11-26 11:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 15:37 [linux-lvm] Is TRIM and DISCARD needed for normal HDD ? Sreyan Chakravarty
2020-11-26 8:47 ` Marek Podmaka
2020-11-26 11:01 ` 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=35aef4e6-5a3c-7fdd-9ea1-ef795e91b00b@redhat.com \
--to=zkabelac@redhat.com \
--cc=linux-lvm@redhat.com \
--cc=sreyan32@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).