archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <>
To: LVM general discussion and development <>,
	Sreyan Chakravarty <>
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: <> (raw)
In-Reply-To: <>

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 ?


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 

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.



      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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

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