From owner-freebsd-fs@FreeBSD.ORG Sun Oct 16 14:44:33 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 499DD106564A for ; Sun, 16 Oct 2011 14:44:33 +0000 (UTC) (envelope-from luchesar.iliev@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id D17058FC14 for ; Sun, 16 Oct 2011 14:44:32 +0000 (UTC) Received: by eyd10 with SMTP id 10so2886521eyd.13 for ; Sun, 16 Oct 2011 07:44:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=gfGlrJxD+iHNimqd0P7Mcnfxitgs/gMna1ov/EOWu88=; b=AyiCFhqxP2QCaY5losVsHj3204VCAqWKJMy2jHx2jS5DRDtNVm/lYrYHnN8bccaykP ly3ODRK6Qc7J17HxW31p+F0AqPOyEpOTYRYQ1SGILsYKMAmCGmQcov+ZU5Mi4w+YbBSk 3yzFVxjo1LVi/fA7PJA6QUFt2vQyyPEFQ87ZM= Received: by 10.223.81.205 with SMTP id y13mr17771083fak.34.1318774567893; Sun, 16 Oct 2011 07:16:07 -0700 (PDT) Received: from [79.124.93.41] ([79.124.93.41]) by mx.google.com with ESMTPS id y8sm17403394faj.10.2011.10.16.07.16.06 (version=SSLv3 cipher=OTHER); Sun, 16 Oct 2011 07:16:06 -0700 (PDT) Message-ID: <4E9AE725.4040001@gmail.com> Date: Sun, 16 Oct 2011 17:16:05 +0300 From: "Luchesar V. ILIEV" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111002 Thunderbird/7.0.1 MIME-Version: 1.0 To: Patrick Donnelly References: In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=9A1FEEFF; url=https://cert.acad.bg/pgp-keys/ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: [ZFS] Using SSD with partitions X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 14:44:33 -0000 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