Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2016 15:10:00 -0500
From:      "Eric A. Borisch" <eborisch@gmail.com>
To:        Karl Denninger <karl@denninger.net>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Re: ZFS, SSD and encryption
Message-ID:  <CAASnNnq34crTVMoqkUhqhccYkajDT=grfMKaeWQB466P78BJOw@mail.gmail.com>
In-Reply-To: <c52ebaa8-e82b-1a17-d868-52c40032c3d5@denninger.net>
References:  <CAJPDrRtLBNKr4BynSGMRfFGdAR0ZbDuwfcqkLupvk5HtgqrbQg@mail.gmail.com> <b8b000ff-289c-7348-8b63-00f3ac51accf@denninger.net> <CAASnNnpnST%2BD6fVT%2BFrH%2BomkwNQb4rG1NJk0T=O2AetzrXEThA@mail.gmail.com> <c52ebaa8-e82b-1a17-d868-52c40032c3d5@denninger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 22, 2016 at 2:27 PM, Karl Denninger <karl@denninger.net> wrote:
> On 7/22/2016 14:02, Eric A. Borisch wrote:
>> On Friday, July 22, 2016, Karl Denninger <karl@denninger.net
>> <mailto:karl@denninger.net>> wrote:
>>
>>
>>     On 7/22/2016 07:48, Nikos Kastanas wrote:
>>     > I have a Lenovo X220 laptop running FreeBSD 10.3-RELEASE with
>>     ZFS and
>>     > encryption on a plain HDD. I am considering buying a Samsung Pro
>>     850 SSD to
>>     > boost performance but I am not sure if TRIM and ZFS+Encryption
>>     work well
>>     > together. After some research online, I found *this page*
>>     > <https://www.freebsd.org/doc/faq/all-about-zfs.html>which states the
>>     > following:
>>     >
>>     > *Note: *
>>     > ZFS TRIM may not work with all configurations, such as a ZFS
>>     filesystem on
>>     > a GELI-backed device.
>>     >
>>     > From what I can understand from the above note, I should not use the
>>     > encryption option when installing FreeBSD with ZFS on an SSD.
>>     TRIM will not
>>     > work correctly and therefore the SSD performace will be impacted.
>>     Meh.  Simply not true.
>>
>>
>> It will not work on 10.3, but will work (as Karl demonstrates) on
>> 11.x. Here's the commit to head enabling it:
>>
>> https://svnweb.freebsd.org/base?view=revision&revision=286444
>>
>> And here's what is in 10.3 (BIO_DELETE case returns EOPNOTSUPP):
>>
>> https://svnweb.freebsd.org/base/releng/10.3/sys/geom/eli/g_eli.c?revision=296373&view=markup#l319
>>
>>  -  Eric
>
> Note that the system in question (from which the stats were pulled) was
> on 10.2 for an extended period of time, with SSDs, and with
> Geli-encrypted disks.  It was fine with no performance issues; whether
> there is a problem with earlier releases has much to do with the disks
> in question.
>
> In the case of the Intel 730s it works perfectly well even though TRIM
> is not passed through in that case.

Fair, but the original question was if "TRIM will not work correctly
and therefore the SSD performace will be impacted" -- and the answer
is that TRIM+GELI does not "work correctly" for 10.3, but it does for
11.x. This is only a performance (and not "is my data safe")
statement.

As you allude to, how much this impacts performance depends on the
drive, partitioning / provisioning, and workload.

 - Eric



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAASnNnq34crTVMoqkUhqhccYkajDT=grfMKaeWQB466P78BJOw>