From owner-freebsd-fs@FreeBSD.ORG Fri Oct 4 16:35: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 C3B434B1 for ; Fri, 4 Oct 2013 16:35:17 +0000 (UTC) (envelope-from c.kworr@gmail.com) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4EAA3280D for ; Fri, 4 Oct 2013 16:35:17 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id z5so3590227lbh.28 for ; Fri, 04 Oct 2013 09:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=gXpZ7FN8jotgJ02a26syQg6yqVl8zGYSZaEcigU/pK8=; b=eewSXOzRVptZKgp+NgouGckm1zZ/efjMKZtb3H8yKlqAUq9OYxp9/NdOnZzm+OA1QZ EtNGNE9qN626plMBxwqB5Kb+E8nt6UBEXLiouOrfGmMvDqA2rYmq2HuLZRz4Ts4YBg4X yk2wHOfQAHaCmWkhVvqmAFcz62YB3n8R7w3v7t91n1eNt1pTDk1wZZnSEgPeqDHnRW02 ddHWGj5Of//lQbwhiomTHLVJgjW6jhXXqvCmXRbNryJjUG0Kon1npTbuQJm4L5SnDKZi 2o0jp+Oxr8ff+Ye5+Lwxzu7IEAgHILaT6b03vDC2WEjscS5d1VNKPnUZBQQPRXKkH8JR G3gg== X-Received: by 10.112.167.66 with SMTP id zm2mr1938888lbb.46.1380904515324; Fri, 04 Oct 2013 09:35:15 -0700 (PDT) Received: from [192.168.1.129] (mau.donbass.com. [92.242.127.250]) by mx.google.com with ESMTPSA id f17sm9311107lbo.12.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Oct 2013 09:35:14 -0700 (PDT) Message-ID: <524EEE40.5060208@gmail.com> Date: Fri, 04 Oct 2013 19:35:12 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Beeblebrox , freebsd-fs@freebsd.org Subject: Re: Questions re swap-on-zfs References: <1380880223590-5848720.post@n5.nabble.com> In-Reply-To: <1380880223590-5848720.post@n5.nabble.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 16:35:17 -0000 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.