From owner-freebsd-fs@FreeBSD.ORG Fri Oct 4 18:27:17 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C36047BC for ; Fri, 4 Oct 2013 18:27:17 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-vc0-x229.google.com (mail-vc0-x229.google.com [IPv6:2607:f8b0:400c:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 831762E5B for ; Fri, 4 Oct 2013 18:27:17 +0000 (UTC) Received: by mail-vc0-f169.google.com with SMTP id ib11so1998401vcb.28 for ; Fri, 04 Oct 2013 11:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dGSlyF5OVKGxDpHg5Y4/5kTDYEFWC+6MpaXMhB7o9zk=; b=f3o+7GyfodfB69z0eZrIjfGAvRRa32jQYae+zbpMFW2dV8zs7tRaKHuFjrVf4RrnSz 4yF005iZRyQ55Qmy5JJddxLjhyXUUsc3h7OjQVFeh5W08FzuHj6RwOK+y3xDRuoDZpGM kZDUB8GLDZ83w7/U3bdER8Ic/syASzuYmTjJtlyfm928BLtmGqBflGgh7u3OfnRdek1Q roEfGq2oc9Nn3qiicEbQlsG1HjY+y4qziZokWNiqvu9w+GUeRHpAC2QU4vNbCiPJuciI psKJAcycp8TYq4Ef14WDJSD32iIseXCsIn2qgqbpNL2jjhAJ0Fcox3sIfTr80j3eMxw+ TeBA== MIME-Version: 1.0 X-Received: by 10.220.105.199 with SMTP id u7mr13062746vco.1.1380911236275; Fri, 04 Oct 2013 11:27:16 -0700 (PDT) Received: by 10.220.30.130 with HTTP; Fri, 4 Oct 2013 11:27:16 -0700 (PDT) In-Reply-To: <524EEE40.5060208@gmail.com> References: <1380880223590-5848720.post@n5.nabble.com> <524EEE40.5060208@gmail.com> Date: Fri, 4 Oct 2013 14:27:16 -0400 Message-ID: Subject: Re: Questions re swap-on-zfs From: Zaphod Beeblebrox To: Volodymyr Kostyrko Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-fs , Beeblebrox X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2013 18:27:17 -0000 While I remain convinced that swap on ZFS is bad, it also precludes getting a dump, so I configure my ZFS systems with a partition for swap and a partition for ZFS on each drive. This has the additional bonus of making swap effectively faster on a 2 drive system (2 swap partitions). On Fri, Oct 4, 2013 at 12:35 PM, Volodymyr Kostyrko wrote: > 04.10.2013 12:50, Beeblebrox wrote: > >> I have 2 swap devices on my system. #1-tank0/swap on ZFS, #2-/dev/ada0p1 >> on >> SSD 1GB. I have some questions for swap-on-zfs: >> >> 1. I had read in the past that swap-on-zfs can cause instability if memory >> gets used to full capacity. Is this still the case, or has that issue been >> corrected? The reason I created swap-#2 is precisely for this purpose; a >> small backup resource. >> > > Yes. > > > 2. If the problem still persists, I would like to tweak the setup so that >> swap-#2 is only used as last resort. I tried setting the priority (pri) in >> fstab, but it does not seem to work - how can this be done? >> /dev/ada0p1 none swap sw,pri=0 0 0 >> tank0/swap none zfs sw,pri=9 0 0 >> > > Nope. > > > 3. Is it necessary for the data on swap to go through the Intent Log? I >> have >> a separate ZIL device for tank0 pool. What risk is there if I disable the >> log for the swap dataset? Is this done by modifying the "primarycache" >> parameter for dataset? >> > > There's no need for SWAP to go through any caches or ZIL. > > > 4. Any other ideas to speed-up swap performance on tank0/swap? >> > > In fact I even tried this: > > * primarycache=metadata (that's would speed up finding blocks without > caching them; > * logbias=throughput (don't use ZIL); > * sync=disabled (write data fast and right now); > * checksum=off (if it's gone it's gone, period). > > The machine still hangs from time to time so I think you wouldn't be lucky > too. > > PS: compression=lz4 makes this host survive longer but this can be just my > imagination... > > -- > Sphinx of black quartz, judge my vow. > > ______________________________**_________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/**mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@**freebsd.org > " >