From owner-freebsd-fs@freebsd.org Fri Jul 22 18:44:20 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0506BBA124A for ; Fri, 22 Jul 2016 18:44:20 +0000 (UTC) (envelope-from zerotronic@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4FF71C5C for ; Fri, 22 Jul 2016 18:44:19 +0000 (UTC) (envelope-from zerotronic@gmail.com) Received: by mail-io0-x230.google.com with SMTP id q83so113052070iod.1 for ; Fri, 22 Jul 2016 11:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=Rl4x3qYkr93MzKMtRagBElDyD9qdB3ImUKjFT1mPkMI=; b=gYguyle5GXUkraVxorXSq0LNLssaiPtVsq0avomeheTSYNBi2M/39NnNCypfjeN5FR MB5rBWGiA76xnNG3qqryrleBSsBElfyiJ+opNyf+h6GfybnqkL+clADBfd/eAf2UtPe8 qDMJeKJ/swIoy3HH81nNud9gUwke6wENAgwsLhPnQIH920w7E645bFQDJ1+0JZPypz/M zIljHihzqTsmcakbqadhas8CRu0y3h9K8I7splNq4ZDiDOYXqPNIxTjSerCay+3w8huS zXGQLPbI8BvRJghM+CXeLTW5AfyA1izmR4ztiBlwBUMSOeezOWDzqUrpoY5vhjM5vZJm d2Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Rl4x3qYkr93MzKMtRagBElDyD9qdB3ImUKjFT1mPkMI=; b=FAyIKMjXgNe530IlLY4WFNklIrwqQ8ANaFBBqojjpQojVjorky0EsgrRuJP2yLSrxA 4DJdDYXj09ukcBe5krGHEth7ZXXKuQ6kfy4yB0zWsucHJvweqGJykBLytecH9bT5eQbo pW6kzqKsu6K49l9t46Xz+GBRhRu9e+Fl/LgPp+v+CKAvuCXAnuarEcJ++rFBUI2zRi1B 4Gf+udhsy71/ju3qZRDqi8yzG2gf6jxwewpNpHY6Wmw0YJ5pkcCSADbAB9elvvUyu+26 7/dv9Sk5I3bhf28lQN3TMZC7bq3zvR8BhRWoWK5wZzBt/3WOVr0weMr8x9oYVLhEQVhY khng== X-Gm-Message-State: AEkoouslpn6WYSCIWoB4VDat/2vDJIkHNZeX9ttt4inReJT8NEmYuygzzTJvergGj/PosKjhJeQMgirg+n3ReA== X-Received: by 10.107.179.9 with SMTP id c9mr6926555iof.170.1469213059178; Fri, 22 Jul 2016 11:44:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.134.195 with HTTP; Fri, 22 Jul 2016 11:44:18 -0700 (PDT) From: Nikos Kastanas Date: Fri, 22 Jul 2016 21:44:18 +0300 Message-ID: Subject: RE: RE: ZFS, SSD and encryption To: Karl Denninger , freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2016 18:44:20 -0000 >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* > >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 2016 >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 >=> 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: 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. > >-- >Karl Denninger >karl@denninger.net > >/The Market Ticker/ >/[S/MIME encrypted email preferred]/ Thank you for your answer. So I guess the warning in the FAQ is probably outdated. I will seriously consider your suggestion considering the Intel SSD. Thank you for your help