From owner-freebsd-fs@freebsd.org Wed Aug 19 08:58:36 2015 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 74C8B9BD952 for ; Wed, 19 Aug 2015 08:58:36 +0000 (UTC) (envelope-from joh.hendriks@gmail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (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 0CB5DC02 for ; Wed, 19 Aug 2015 08:58:36 +0000 (UTC) (envelope-from joh.hendriks@gmail.com) Received: by wicja10 with SMTP id ja10so1637940wic.1 for ; Wed, 19 Aug 2015 01:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=RhrInTTZZHU7sOov59QUH70WPae19sOtWvr18M+UEiQ=; b=wXNvvn8ReROgUwodWMaWoWy4JjqtDe0sYR1NyXuNKh8Gl48cexrQ9eYPqZELHwDszm 6HGVjZGgEOcOKoamJnS1VnA5d62RvOsMaA7ZWy8waRtxwELJsM6T6d2UKRzOJmFuy5tu WEjdGu/I9CyQH/oJFXtjbjmCgLuT+skHDaQ+lpbocoMY2b8/FeV3WfBWyhRXpeNF7EMY WLctEqlof46x5EFQMzY/h5yHCrm+qBIAB58q/btGQi96sVMUhpzV+K2q4MrxW+HlhPw/ vUYhkJgIsIORlj5G3fVLVo7JW3SpdlBr5I5M2fHdlEu3850n3lWJa3NnGK9VN0kynO3B +Iqg== X-Received: by 10.194.112.3 with SMTP id im3mr21687619wjb.54.1439974714492; Wed, 19 Aug 2015 01:58:34 -0700 (PDT) Received: from Johans-MacBook-Air.local (92-70-102-130.glasvezel.netexpo.nl. [92.70.102.130]) by smtp.googlemail.com with ESMTPSA id bd9sm581224wib.18.2015.08.19.01.58.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Aug 2015 01:58:33 -0700 (PDT) Subject: Re: Optimizing performance with SLOG/L2ARC To: javocado References: From: Johan Hendriks X-Enigmail-Draft-Status: N1110 Cc: freebsd-fs@freebsd.org Message-ID: <55D4453C.7040203@gmail.com> Date: Wed, 19 Aug 2015 10:58:36 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Aug 2015 08:58:36 -0000 Op 19/08/15 om 02:28 schreef javocado: > Hi, > > I've been trying to optimize and enhance my ZFS filesystem performance > (running FreeBSD 8.3amd) which has been sluggish at times. Thus far I have > added RAM (256GB) and I've added an SLOG (SSD mirror). The RAM seems to > have helped a bit, but not sure if the SLOG was of much help. My vdev is > decently busy, with writes and reads averaging at 100 per second with > spikes as high as 500. > > Here's what arc_statistics is showing me: > > ARC Size: 70.28% 173.89 GiB > Target Size: (Adaptive) 71.84% 177.77 GiB > Min Size (Hard Limit): 12.50% 30.93 GiB > Max Size (High Water): 8:1 247.44 GiB > > ARC Efficiency: 2.25b > Cache Hit Ratio: 95.76% 2.16b > Cache Miss Ratio: 4.24% 95.55m > Actual Hit Ratio: 64.95% 1.46b > > Data Demand Efficiency: 94.83% 330.99m > Data Prefetch Efficiency: 26.36% 64.23m > > CACHE HITS BY CACHE LIST: > Anonymously Used: 30.87% 665.74m > Most Recently Used: 7.54% 162.67m > Most Frequently Used: 60.29% 1.30b > Most Recently Used Ghost: 0.18% 3.97m > Most Frequently Used Ghost: 1.11% 23.89m > > CACHE HITS BY DATA TYPE: > Demand Data: 14.56% 313.89m > Prefetch Data: 0.79% 16.93m > Demand Metadata: 53.28% 1.15b > Prefetch Metadata: 31.38% 676.68m > > CACHE MISSES BY DATA TYPE: > Demand Data: 17.90% 17.10m > Prefetch Data: 49.50% 47.30m > Demand Metadata: 24.46% 23.37m > Prefetch Metadata: 8.14% 7.78m > > > 1. based on the output above, I believe a larger ARC may not necessarily > benefit me at this point. True? > > 2. Is more (L2)ARC always better? One thing to remember is that a L2ARC requires memory! So for your hardware you need to find the sweetspot which L2ARC size is best performing. http://www.mail-archive.com/zfs-discuss@opensolaris.org/msg34674.html > > 3. I know it's a good idea to mirror the SLOG (and I have). Do I understand > correctly that I do not need to mirror the L2ARC since it's just a read > cache, nothing to lose if the SSD goes down? You could potentially loose data if the ZIL/SLOG is lost, so always use a mirrorred vdev as ZIL/SLOG. You do not need a large vdev for ZIL/SLOG 8 to 10 GB is large enough. https://pthree.org/2013/04/19/zfs-administration-appendix-a-visualizing-the-zfs-intent-log/ For L2ARC you do not need to mirror the disks. It just copies data to the device for cache, if it is not on the cache it will use the spinning disks. If for whatever reason the cache vdev dies it will use the spinning disks again. > > 4. Is there a better way than looking at zpool iostat -v to determine the > SLOG utilization and usefulness? > > I'd like to test-see if adding L2ARC yields any performance boost. Since > SLOG isn't doing much for me, I'm thinking I could easily repurpose my SLOG > into an L2ARC. > > Questions: > > 5. In testing, it seemed fine to remove the SLOG from a live/running system > (zpool remove pool mirror-3). Is this in fact a safe thing to do to a > live/running system? ZFS knows that it should flush the ZIL, then remove > the device? Is it better or necessary to shut down the system and remove > the SLOG in "read only" mode? You can without problem remove the ZIL/SLOG on a running system. ZFS will fall back to the spinning disks for ZIL/SLOG > > 6. Am I missing something about how the SLOG and L2ARC play together that I > would miss by running my proposed test. i.e. if I take down the SLOG and > repurpose as an L2ARC might I be shooting myself in the foot cause the SLOG > and L2ARC combo is much more powerful than the L2ARC alone (or SLOG alone)? > My hope here is to see if the L2ARC improves performance, after which I > will proceed with buying the SSD(s) for both the SLOG and L2ARC. > > Thanks > _______________________________________________ > freebsd-fs@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"