Debian Bug report logs - #717313
lvm2: default configuration (issue_discards = 0) silently reduces SSD performance & lifespan

version graph

Package: lvm2; Maintainer for lvm2 is Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>; Source for lvm2 is src:lvm2.

Reported by: Petter Reinholdtsen <pere@hungry.com>

Date: Fri, 19 Jul 2013 08:45:01 UTC

Severity: normal

Tags: patch

Found in version lvm2/2.02.95-7

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#717313; Package lvm2. (Fri, 19 Jul 2013 08:45:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
New Bug report received and forwarded. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Fri, 19 Jul 2013 08:45:06 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: submit@bugs.debian.org
Subject: lvm2: Enable issue_discards = 1 automatically on non-rotational (SSD) disks?
Date: Fri, 19 Jul 2013 10:43:11 +0200
Package: lvm2
Version: 2.02.95-7
Severity: wishlist

Hi.

According to several recipes on how to set up Linux on a SSD disk, LVM
need to be reconfigured to issue discard (aka TRIM) instructions to the
underlying storage device.  This is done by modifying /etc/lvm/lvm.conf
and setting issue_discards = 1 in the devices section.

Why not set the option automatically when the underlying device is not
rotational?  In my case, the LVM physical device is /dev/dm-0 (encrypted
device), and /sys/block/dm-0/queue/rotational return 0.  If LVM used the
rotational value to decide to set the issue_discard option, there would
be no need for manual configuration with LVM and SSD disks.

Is there some reason this isn't done already, except lack of time to
implement it?

-- 
Happy hacking
Petter Reinholdtsen



Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#717313; Package lvm2. (Fri, 13 Dec 2013 10:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <martin.pitt@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Fri, 13 Dec 2013 10:09:03 GMT) Full text and rfc822 format available.

Message #10 received at 717313@bugs.debian.org (full text, mbox):

From: Martin Pitt <martin.pitt@ubuntu.com>
To: Petter Reinholdtsen <pere@hungry.com>, 717313@bugs.debian.org
Subject: Re: Bug#717313: lvm2: Enable issue_discards = 1 automatically on non-rotational (SSD) disks?
Date: Fri, 13 Dec 2013 11:04:13 +0100
[Message part 1 (text/plain, inline)]
tag 717313 patch
thanks

Petter Reinholdtsen [2013-07-19 10:43 +0200]:
> According to several recipes on how to set up Linux on a SSD disk, LVM
> need to be reconfigured to issue discard (aka TRIM) instructions to the
> underlying storage device.  This is done by modifying /etc/lvm/lvm.conf
> and setting issue_discards = 1 in the devices section.
> 
> Why not set the option automatically when the underlying device is not
> rotational?

The documentation says that the option has no effect if the kernel or
the drive don't support it, so I don't see why we shouldn't just
enable this by default?

I attach the Ubuntu debdiff for reference, although it's fairly
trivial.

Thanks,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[lvm2.enable-trimming.debdiff (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Added tag(s) patch. Request was from Martin Pitt <martin.pitt@ubuntu.com> to control@bugs.debian.org. (Fri, 13 Dec 2013 10:09:09 GMT) Full text and rfc822 format available.

Changed Bug title to 'lvm2: default configuration (issue_discards = 0) silently reduces SSD performance & lifespan' from 'lvm2: Enable issue_discards = 1 automatically on non-rotational (SSD) disks?' Request was from Dwayne Litzenberger <dlitz@dlitz.net> to control@bugs.debian.org. (Thu, 06 Feb 2014 16:54:05 GMT) Full text and rfc822 format available.

Severity set to 'normal' from 'wishlist' Request was from Dwayne Litzenberger <dlitz@dlitz.net> to control@bugs.debian.org. (Thu, 06 Feb 2014 16:54:06 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 10:02:10 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.