[ZFS] Using SSD with partitions

Luchesar V. ILIEV luchesar.iliev at gmail.com
Sun Oct 16 14:44:33 UTC 2011


On 16/10/2011 07:45, Patrick Donnelly wrote:
> Hi list,
> 
> 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.
> 
> Thanks for any advice,
> 

There are other, much more knowledgeable people around, who might give
you better advice, but let me just make a few points:

1. If you can afford more RAM, it's (much) better for ZFS than L2ARC.

2. It's not just the ZIL devices that get heavily written. L2ARC ones
also get their hefty share of writes. And even when the cache becomes
"hot" enough, keep in mind that...

3. You lose all L2ARC contents once the system gets rebooted. It's kind
of counter-intuitive, but that's how it is (and for a reason).

4. L2ARC and ZIL have almost the opposite performance requirements, so
putting them on the same device is likely never going to be optimal
(unless you spend a fortune on that SSD).

5. Check the output of "zpool upgrade". If your zpool version is
anything below 19 (likely 14 or 15), I'd strongly recommend that you
avoid setting up a separate ZIL. Pools before v19 fail critically when
the ZIL is removed or is corrupted, which means you lose them for good.
You might mitigate the risk with a mirrored ZIL, but it's still likely
not worth it in your case.

6. If, OTOH, you're running a reasonably recent -STABLE (8 or 9), then
your zpool version is likely 28 (thanks, pjd@), which means ZIL is not
that scary, but you might still lose some data. Even an unexpected power
failure might cause trouble, unless the SSD is designed to handle it
gracefully (this typically involves some sort of capacitor).

The topic is quite popular, and I'd suggest you do some searching and
reading around ("ZFS SSD" on Google brings a lot of interesting and
helpful things, especially on the OpenSolaris and FreeBSD's forums). If
you don't feel that geeky, a good starting point might be this one:

http://constantin.glez.de/blog/2011/02/frequently-asked-questions-about-flash-memory-ssds-and-zfs

It really depends on your needs, your current (and potential future)
system configuration, and the time and effort you're ready to spend.

Again, I'm no expert in those things, so take all my comments with a
grain of salt. Good luck!

Cheers,
Luchesar

-- 
i.dea.is/luchesar


More information about the freebsd-fs mailing list