From owner-freebsd-fs@FreeBSD.ORG Tue Jul 7 00:45:40 2009 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 B69E4106568A for ; Tue, 7 Jul 2009 00:45:40 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.210.181]) by mx1.freebsd.org (Postfix) with ESMTP id 7730F8FC17 for ; Tue, 7 Jul 2009 00:45:40 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: by yxe11 with SMTP id 11so6381423yxe.3 for ; Mon, 06 Jul 2009 17:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=AaZoITLTGOEHa40hsB5cw+8lovPRcvNH4P15iyX2eHQ=; b=XgJ1JjstavEg+xJmevKLWB9wayHgl/vC3VtoHq1hNzjC7YXITqX2xf7MhF61z29eKl kuLcqFzipIAMenHGND7wkXPxLK+rnrjSBfNr8k7SnZd0PNcX4Euqp7taz60LbJN/OpBv L1nHxaHcME2D2upP2JUA/GioLmdkLGaN9I2ks= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=nMPTBhrsHw5dd1s8IVtS/QCb6+dQUCCBNLe58K0j067RqXLasuSXKMh45eMY3C4SmJ 7E9Jddd/OG7ZGyJmRY6L0Tx/dMbfRnqxspEC2p3WO8+ElwhdoiciuBgrn62UqvC83wxx oC6VbMaBgxNyNCMpcx5tUmBnBz8y4lxB7ZjyU= MIME-Version: 1.0 Received: by 10.100.108.8 with SMTP id g8mr9596857anc.66.1246927539731; Mon, 06 Jul 2009 17:45:39 -0700 (PDT) Date: Tue, 7 Jul 2009 03:45:39 +0300 Message-ID: From: Dan Naumov To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: ZFS: swap on a ZVOL 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: Tue, 07 Jul 2009 00:45:41 -0000 Hello list. As far as I know, using swap on top of a "non-trivial" filesystem like ZFS is considered "unsupported", but it does in fact work. You can create a ZVOL of arbitrary size (say, 4G) and then do the following: zfs set org.freebsd:swap=on pool/swapvolname to have /etc/rc.d/zfs enable swap on said ZVOL on every boot. You can also do this in an ugly way: put swapon /dev/zvol// into your /etc/rc.local (without having to pass the "org.freebsd:swap=on" option to the ZVOL). Now the question remains, what kind of issues are expected to arise when using swap on a ZVOL and is there any work going to in order to resolve them? One of the issues mentioned is that ZVOL swap cannot handle kernel dumps and another, more serious potential issue is a race condition where "more swap is needed to swap". Assuming I have a machine with 2gb ram, if I use a 4gb ZVOL swap, am I likely to run into any serious issues assuming that under normal operation, the system uses from none to very little swap? - Sincerely, Dan Naumov