From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RDkUY-0004k6-63 for garchives@archives.gentoo.org; Tue, 11 Oct 2011 22:08:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C29CA21C06E; Tue, 11 Oct 2011 22:07:40 +0000 (UTC) Received: from mail.digimed.co.uk (82-69-83-178.dsl.in-addr.zen.co.uk [82.69.83.178]) by pigeon.gentoo.org (Postfix) with ESMTP id 5337821C03E for ; Tue, 11 Oct 2011 22:05:49 +0000 (UTC) Received: from digimed.co.uk (yooden.digimed.co.uk [192.168.1.6]) by mail.digimed.co.uk (Postfix) with ESMTPSA id B3DE780283 for ; Tue, 11 Oct 2011 23:05:47 +0100 (BST) Date: Tue, 11 Oct 2011 23:05:41 +0100 From: Neil Bothwick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] SSDs, ext4, fstrim, discard ... Message-ID: <20111011230541.436ea1a4@digimed.co.uk> In-Reply-To: <4E94AD7F.7050405@xunil.at> References: <4E94AD7F.7050405@xunil.at> Organization: Digital Media Production X-Mailer: Claws Mail 3.7.10cvs27 (GTK+ 2.24.6; x86_64-pc-linux-gnu) X-GPG-Fingerprint: 7260 0F33 97EC 2F1E 7667 FE37 BA6E 1A97 4375 1903 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/sMXJQy1+nIooO_vmQmFPV8U"; protocol="application/pgp-signature" X-Archives-Salt: X-Archives-Hash: 73920ca19b9d19732660bf6cc7f4eb93 --Sig_/sMXJQy1+nIooO_vmQmFPV8U Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 11 Oct 2011 22:56:31 +0200, Stefan G. Weichinger wrote: >=20 > 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). >=20 > A feature in a local magazine updated my knowledge of how to make use of > the TRIM-command. >=20 > It told me not to use the mount-option "discard" anymore, but run fstrim > on the mountpoint frequently. >=20 > OK, I learn ;-) >=20 > 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? >=20 > This is what I wonder about: >=20 > ~ # fstrim -v / > /: 6195433472 bytes were trimmed > ~ # fstrim -v / > /: 6195433472 bytes were trimmed > ~ # fstrim -v / > /: 6195433472 bytes were trimmed >=20 >=20 > I tested it with "discard" on and off. >=20 > / is ext4, yes, and on an SSD, yup. >=20 > Do I misunderstand things here? >=20 > Thanks, Stefan >=20 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? --=20 Neil Bothwick PCMCIA: People Can't Memorize Computer Industry Acronyms --Sig_/sMXJQy1+nIooO_vmQmFPV8U Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk6UvboACgkQum4al0N1GQOJRgCeOru1fF96WALPBiDffzhLmdHW FBEAn2bzDo3quvD0IaE+kigDxLi5Gdjo =PCPl -----END PGP SIGNATURE----- --Sig_/sMXJQy1+nIooO_vmQmFPV8U--