From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-user+bounces-148847-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id D3E451381F3
	for <garchives@archives.gentoo.org>; Mon, 22 Jul 2013 22:22:57 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7E12CE0A8E;
	Mon, 22 Jul 2013 22:22:49 +0000 (UTC)
Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53])
	(using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 60276E0A6B
	for <gentoo-user@lists.gentoo.org>; Mon, 22 Jul 2013 22:22:48 +0000 (UTC)
Received: by mail-pa0-f53.google.com with SMTP id lb1so779444pab.12
        for <gentoo-user@lists.gentoo.org>; Mon, 22 Jul 2013 15:22:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:sender:in-reply-to:references:from:date
         :x-google-sender-auth:message-id:subject:to:content-type;
        bh=WPrL3zIyO+jyybetdwyMFBXPnBjZLSPThihi+0eJcrY=;
        b=gKfJjxalBZPhLbHOS7JssEP25uwhCmaDstXfdJpLXw9y7Ce4ztO9WM0fOpzUO5HHbA
         55YCEYA1jk7qvOO22UyiuDfsxXK3NUFYRuBnchs7RKbYhzac8njuYoZbJXJ755v+dXS1
         0PC4WWPzlqGV0w4YkYuVi05KLb5fYXQf+dPV0reC/7Q8fFNdquj1hMTtESxNR82Rh8Yi
         eeklCXu1BiU1hs+9L3Trh2WiGeL8h/dulHryvsajJzFjpVZRP6acSRd8GmHqSJkQnMMX
         uKq1qE53ui6KdtCh2E01amvrZRBwvNAg8CX7SK7nGeR8RK4F/RYJtQs3xcYNVRLqq9FC
         /XfA==
X-Received: by 10.67.8.98 with SMTP id dj2mr33974206pad.47.1374531767222; Mon,
 22 Jul 2013 15:22:47 -0700 (PDT)
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Sender: paul.hartman@gmail.com
Received: by 10.70.2.227 with HTTP; Mon, 22 Jul 2013 15:22:27 -0700 (PDT)
In-Reply-To: <51EDA72F.9010400@xunil.at>
References: <20130718182232.5c1301ce@acme7.acmenet> <20130719114234.332ff09e@acme7.acmenet>
 <51E96CBB.4080300@gmail.com> <201307191945.46099.michaelkintzios@gmail.com>
 <CAEH5T2OJuUsO7PSmEQPONdM0MYm37XY2Eq2D=foOFZ0BJQcYRg@mail.gmail.com> <51EDA72F.9010400@xunil.at>
From: Paul Hartman <paul.hartman+gentoo@gmail.com>
Date: Mon, 22 Jul 2013 17:22:27 -0500
X-Google-Sender-Auth: t5hsJLqzLXjvEnfgUE-L2V-hCBs
Message-ID: <CAEH5T2NegfAXkqX8=dqhK=g4LotOfhWXO56kVbbkPaxe_GgAow@mail.gmail.com>
Subject: Re: [gentoo-user] SSD partitioning and migration
To: gentoo-user@lists.gentoo.org
Content-Type: text/plain; charset=ISO-8859-1
X-Archives-Salt: c948d260-a1cd-4933-b00c-fb7ff5636ee8
X-Archives-Hash: 1cd81d69232a566d6cde2d2d63758dd5

On Mon, Jul 22, 2013 at 4:42 PM, Stefan G. Weichinger <lists@xunil.at> wrote:
> Am 19.07.2013 21:02, schrieb Paul Hartman:
>
>> Old SSDs that did not support TRIM would suffer write amplification
>> after a certain amount of data had been written to them, but any
>> modern SSD and modern OS will keep it nice and tidy.
>
> What's the "best practice" now for TRIM?
>
> I changed to manual "fstrim -v /" back then as they wrote that the
> fstab-options weren't the right way of doing it.
>
> Any news on this?
>
> I have root-fs on ext4, btw ...

I think it depends on your usage patterns. "discard" will trim unused
space immediately as files are deleted. Putting fstrim in your cron
jobs will wait to free all unused space at once.

If you delete many files, or large files, you may notice performance
slowdowns by using discard.  On the other hand, if your SSD is near
full you may benefit from discard to allow faster write speed before
the cron job runs.

As far as I remember, some filesystems don't support "discard" option,
but do support fstrim. So fstrim job may be "safer" as generic
advice... and it was older advice, before "discard" existed, so old
SSD guides may refer to it by default.

I personally use "discard" with ext4 and btrfs, but I have not done
tests or have evidence that it is the best choice for me. It's simply
what I chose and never changed it. :)