Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2016 09:27:37 -0500
From:      Karl Denninger <karl@denninger.net>
To:        freebsd-fs@freebsd.org
Subject:   Re: ZFS, SSD and encryption
Message-ID:  <b8b000ff-289c-7348-8b63-00f3ac51accf@denninger.net>
In-Reply-To: <CAJPDrRtLBNKr4BynSGMRfFGdAR0ZbDuwfcqkLupvk5HtgqrbQg@mail.gmail.com>
References:  <CAJPDrRtLBNKr4BynSGMRfFGdAR0ZbDuwfcqkLupvk5HtgqrbQg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format.

--------------ms040902060406010407040205
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable


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 SS=
D to
> boost performance but I am not sure if TRIM and ZFS+Encryption work wel=
l
> 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.  The reason for the "supported feature" flag here
is that this machine was recently rolled forward to 11.0-BETA1, but I
have not upgraded the pools yet from the feature set of 10.2.

[karl@NewFS ~]$ zpool status zsr
  pool: zsr
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can=

        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not
support
        the features. See zpool-features(7) for details.
  scan: scrub repaired 0 in 0h6m with 0 errors on Sun Jul 17 03:12:01 201=
6
config:

        NAME           STATE     READ WRITE CKSUM
        zsr            ONLINE       0     0     0
          mirror-0     ONLINE       0     0     0
            da8p4.eli  ONLINE       0     0     0
            da9p4.eli  ONLINE       0     0     0

errors: No known data errors

[karl@NewFS ~]$ gpart show da8
=3D>       34  468862061  da8  GPT  (224G)
         34       2014       - free -  (1.0M)
       2048       1024    1  freebsd-boot  (512K)
       3072       1024       - free -  (512K)
       4096   20971520    2  freebsd-zfs  [bootme]  (10G)
   20975616  134217728    3  freebsd-swap  (64G)
  155193344  313667584    4  freebsd-zfs  (150G)
  468860928       1167       - free -  (584K)

da8: <ATA INTEL SSDSC2BP24 0420> Fixed Direct Access SPC-4 SCSI device
da8: Serial Number BTJR41210025240AGN
da8: 600.000MB/s transfers
da8: Command Queueing enabled
da8: 228936MB (468862128 512 byte sectors)



root@NewFS:/var/log # sysctl -a|grep trim
vfs.zfs.trim.max_interval: 1
vfs.zfs.trim.timeout: 30
vfs.zfs.trim.txg_delay: 32
vfs.zfs.trim.enabled: 1
vfs.zfs.vdev.trim_max_pending: 10000
vfs.zfs.vdev.trim_max_active: 64
vfs.zfs.vdev.trim_min_active: 1
vfs.zfs.vdev.trim_on_init: 1
kstat.zfs.misc.zio_trim.failed: 0
kstat.zfs.misc.zio_trim.unsupported: 25748
kstat.zfs.misc.zio_trim.success: 6120223
kstat.zfs.misc.zio_trim.bytes: 295371051008


And as you can see, TRIM is definitely working (on the devices that can
handle it); there are also spinning rust disks in this machine, thus the
"unsupported" reports as well.

HOWEVER, I do suggest (strongly!) that you NOT use the particular SSD
you are intending to buy as it has no power-loss protection.  Instead,
buy an Intel 730-series drive (that's what's in this machine); it has
that protection and it is *EXTREMELY IMPORTANT* as otherwise any power
event has the potential of silent corruption which is catastrophic --
especially on an encrypted volume!

That same machine has two other 730s running a Postgresql database (also
Geli-encrypted) and they're just fine in terms of their wear leveling
and such; the media "wearout" indicator shows that 95% of the device's
life remains and they currently have 10,000 power-on-hours.

They'll wear out in something like another 20 years at present use
rates.... :)

The 480MB version of that drive is currently available for roughly
$250.  It is not the fastest SSD out there but the differences between
it and others are small and I have *verified* that the power-loss data
protection works on these units.  IMHO they're the only "consumer" style
priced devices that I find acceptable for this reason; the S3500/S3700s
are good too, but a hell of a lot more money and unless you need the
write endurance IMHO not worth it.

The 730 series hits the sweet spot in that it has power-loss protection
that *works* and yet they're reasonably priced.  I own a bunch of them;
they're in my production servers under FreeBSD and also on my Win10
desktop machine.

--=20
Karl Denninger
karl@denninger.net <mailto:karl@denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/

--------------ms040902060406010407040205
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC
Bl8wggZbMIIEQ6ADAgECAgEpMA0GCSqGSIb3DQEBCwUAMIGQMQswCQYDVQQGEwJVUzEQMA4G
A1UECBMHRmxvcmlkYTESMBAGA1UEBxMJTmljZXZpbGxlMRkwFwYDVQQKExBDdWRhIFN5c3Rl
bXMgTExDMRwwGgYDVQQDExNDdWRhIFN5c3RlbXMgTExDIENBMSIwIAYJKoZIhvcNAQkBFhND
dWRhIFN5c3RlbXMgTExDIENBMB4XDTE1MDQyMTAyMjE1OVoXDTIwMDQxOTAyMjE1OVowWjEL
MAkGA1UEBhMCVVMxEDAOBgNVBAgTB0Zsb3JpZGExGTAXBgNVBAoTEEN1ZGEgU3lzdGVtcyBM
TEMxHjAcBgNVBAMTFUthcmwgRGVubmluZ2VyIChPQ1NQKTCCAiIwDQYJKoZIhvcNAQEBBQAD
ggIPADCCAgoCggIBALmEWPhAdphrWd4K5VTvE5pxL3blRQPyGF3ApjUjgtavqU1Y8pbI3Byg
XDj2/Uz9Si8XVj/kNbKEjkRh5SsNvx3Fc0oQ1uVjyCq7zC/kctF7yLzQbvWnU4grAPZ3IuAp
3/fFxIVaXpxEdKmyZAVDhk9az+IgHH43rdJRIMzxJ5vqQMb+n2EjadVqiGPbtG9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PtpM8qaf+WjbdwZB5dK/JqbPd
9fckucJCVXYzDQvJh2r+sMZb9M6P3MIGUGFbR5fMJ3M4reyfmcppdbXm0B7gqIFucCHjwxwa
gZsMEsn5n5+8pRyN3k2rCPJrO9kAAAAAAAA=
--------------ms040902060406010407040205--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b8b000ff-289c-7348-8b63-00f3ac51accf>