From owner-freebsd-fs@FreeBSD.ORG Sun Oct 16 05:25:27 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 46832106566B for ; Sun, 16 Oct 2011 05:25:27 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 12BC58FC12 for ; Sun, 16 Oct 2011 05:25:26 +0000 (UTC) Received: by iaky10 with SMTP id y10so5762104iak.13 for ; Sat, 15 Oct 2011 22:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dWSCMADqJks7EtUtMxQ+YvbaQBAM1skD9bjAc0Bf698=; b=G0JVCQvLRg49dVxdZi3vl4o9+YKt3xkZ103flx9FOggpK/XTQLusFdDFwkSwT5C/s6 QWXi5DOe/h1Pp4pNQLg3Rz4+1wZ/Yuar5Yb7Iw5zew3LNwn2i6CNpShokqvyucQcFCpS diNRaaKESNRz+V5gA75Ytxwq0/P+UzrEgz2Pw= MIME-Version: 1.0 Received: by 10.68.6.234 with SMTP id e10mr10617632pba.86.1318742726032; Sat, 15 Oct 2011 22:25:26 -0700 (PDT) Received: by 10.142.239.12 with HTTP; Sat, 15 Oct 2011 22:25:25 -0700 (PDT) In-Reply-To: References: Date: Sat, 15 Oct 2011 22:25:25 -0700 Message-ID: From: Freddie Cash To: Patrick Donnelly Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 05:25:27 -0000 On Sat, Oct 15, 2011 at 9:45 PM, Patrick Donnelly 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@gmail.com