[ZFS] Using SSD with partitions

Freddie Cash fjwcash at gmail.com
Sun Oct 16 05:25:27 UTC 2011


On Sat, Oct 15, 2011 at 9:45 PM, Patrick Donnelly <batrick at batbytes.com>wrote:

> I've got an array for home use where my boot drive (UFS) finally died.
> I've decided to upgrade to a SSD for a replacement but am looking to
> maybe simultaneously improving performance of my ZFS array. Naturally
> a FreeBSD install doesn't use much space so partitioning the drive to
> get maximum usage seems wise. I was thinking for a hypothetical 40GB
> drive:
>
> 20GB -- FreeBSD / partition
> 2GB  -- ZFS ZIL
> 18GB -- ZFS Cache
>
> What I'm wondering is if this will be a bad idea. I know that SSDs are
> not designed to be written to *a lot*, which a ZIL will experience. Is
> this a bad idea? I'm hoping for experiences from people in similar
> scenarios. As I'm not an enterprise IT person who can't simply choose
> to just throw more mon-- I mean SSDs -- at the problem, I need to be
> efficient. :) [I'm thinking the cache drive partition might be
> pointless as I don't think I'd benefit that much from it.]
>
> Disclaimer: I've looked at a lot of guides, including the standard
> best practices guide, and none of it seemed helpful for my particular
> problem, especially given that I'm using FreeBSD.
>

For home use, there's nothing wrong with doing this.

Unless it's an NFS server used by multiple clients, you won't be pounding
the ZIL; and you may not even need to have a separate log device.  Create
the pool, create a test filesystem, do some benchmarks to get a baseline
(preferably with the "normal" workload you'd be doing).  Then destroy/create
the filesystem again, "zfs set sync=off" on the filesystem, and benchmark
the filesystem again.  If you get a huge performance gain, then turn sync on
again, create the separate log and test again.

Using the SSD for the OS and the cache will be fine.  L2ARC is throttled to
7 MBps of writes, and is then a read-heavy partition, so is very easy on the
drive.  Whether or not you benefit from the L2ARC depends on whether you
will be using dedupe and whether or not your files are accessed multiple
times within short periods of times.

If you are really worried about the longevity of the SSD, then
under-provision it.  Only partition/format 36 GB of it, leaving the extra 4
GB to be used internally for extra wear-leveling.

-- 
Freddie Cash
fjwcash at gmail.com


More information about the freebsd-fs mailing list