From: Neil Bothwick <neil@digimed.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] SSDs, ext4, fstrim, discard ...
Date: Tue, 11 Oct 2011 23:05:41 +0100 [thread overview]
Message-ID: <20111011230541.436ea1a4@digimed.co.uk> (raw)
In-Reply-To: <4E94AD7F.7050405@xunil.at>
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]
On Tue, 11 Oct 2011 22:56:31 +0200, Stefan G. Weichinger wrote:
>
> As mentioned in the systemd-posting I migrated back to an SSD today (on
> my main rig, the thinkpad uses an SSD happily for a long time now).
>
> A feature in a local magazine updated my knowledge of how to make use of
> the TRIM-command.
>
> It told me not to use the mount-option "discard" anymore, but run fstrim
> on the mountpoint frequently.
>
> OK, I learn ;-)
>
> But, AFAI understand, after trimming sectors/bytes on the
> filesystem/partition, they should be trimmed. I expect X bytes to be
> trimmed at first and if I repeat the command, I expect 0 (or something
> pretty low) bytes to be trimmed then, ok?
>
> This is what I wonder about:
>
> ~ # fstrim -v /
> /: 6195433472 bytes were trimmed
> ~ # fstrim -v /
> /: 6195433472 bytes were trimmed
> ~ # fstrim -v /
> /: 6195433472 bytes were trimmed
>
>
> I tested it with "discard" on and off.
>
> / is ext4, yes, and on an SSD, yup.
>
> Do I misunderstand things here?
>
> Thanks, Stefan
>
This seems in accordance with the fstrim man page:
"fstrim will report the same potential discard bytes each time, but only
sectors which had been written to between the discards would actually be
discarded by the storage device."
What is the benefit of running fstrim manually over mounting with discard?
--
Neil Bothwick
PCMCIA: People Can't Memorize Computer Industry Acronyms
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-10-11 22:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 20:56 [gentoo-user] SSDs, ext4, fstrim, discard Stefan G. Weichinger
2011-10-11 22:05 ` Alan McKinnon
2011-10-11 22:28 ` Stefan G. Weichinger
2011-10-11 23:17 ` Alan McKinnon
2011-10-12 7:59 ` Stefan G. Weichinger
2011-10-11 22:05 ` Neil Bothwick [this message]
2011-10-11 22:26 ` Stefan G. Weichinger
2011-10-13 21:12 ` Stefan G. Weichinger
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=20111011230541.436ea1a4@digimed.co.uk \
--to=neil@digimed.co.uk \
--cc=gentoo-user@lists.gentoo.org \
/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