From owner-freebsd-questions@FreeBSD.ORG Fri Oct 8 10:06:01 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B46BF106564A for ; Fri, 8 Oct 2010 10:06:01 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 601A28FC19 for ; Fri, 8 Oct 2010 10:06:01 +0000 (UTC) Received: by qwe4 with SMTP id 4so20927qwe.13 for ; Fri, 08 Oct 2010 03:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=SEODFKNLDnqIE05d56qfU5cCZWwbWMXnKpKxvXrsW1E=; b=T4QC2pdX/q4p2f6paOLLYt1X22lzvxuh4FilXOTH51WuXb8WGCzu36/ger517hyGyt gX2IHsZOPsHTflmTWhVXSv9P0JVGnLt16PQlWcc6Lv4KgvoJ9f2DZdJw8GV5hA1c91bs lnQtX2KaCxRFuAkSt1i22xbtiaSVn3rwvEk8Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=DvZ2TbUjRH19CE3qmgjOsOKwObk/dTYQVJtcJT6Hs6KPtd3s3pQKsWSPWYynvLXayi pLMK0vWu43vgVbWATtCKNXVAM25ZScP9/2K3t2W3mOVWiY2fEiLSy7oQmwyEEE9JWgSN zS96K657xWnOl5Z3KHaIygPRuhSG125TI3eqw= MIME-Version: 1.0 Received: by 10.229.87.140 with SMTP id w12mr1823105qcl.125.1286532359748; Fri, 08 Oct 2010 03:05:59 -0700 (PDT) Received: by 10.229.215.209 with HTTP; Fri, 8 Oct 2010 03:05:59 -0700 (PDT) In-Reply-To: <4CAE2B99.7020804@gmail.com> References: <4CA6FBC2.8080908@gmail.com> <4CAE2B99.7020804@gmail.com> Date: Fri, 8 Oct 2010 11:05:59 +0100 Message-ID: From: krad To: Anselm Strauss Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Adam Vande More , freebsd-questions@freebsd.org Subject: Re: Swap on ZFS X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2010 10:06:01 -0000 On 7 October 2010 21:20, Anselm Strauss wrote: > On 10/02/10 17:52, Adam Vande More wrote: > > On Sat, Oct 2, 2010 at 4:30 AM, Anselm Strauss > wrote: > > > >> Hi > >> > >> I have a virtual server with only 512 MB of memory but still want to run > >> ZFS on it. > >> > >> Has there been any fix or workaround for this? I guess it does not help > >> when I use a swap file on ZFS instead of a separate zvol. > >> > > > > Make sure you are following this: > > http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot Please note swap is not a > > ZVOL, it is a sepate partition. You'd have the same problem with ZVOL. > > Also use i386, that will save you a bit of memory. Follow the ZFS tuning > > guide. Even if you follow all those things, I'm not sure you'll be able > to > > get it stable. 512MB is really tight. > > > > I now have the swap on a separate disk and it seems more stable. > Although the server still has only 512 MB of RAM, runs on amd64 and I > did no tuning. It's not a file server but compiling ports and running > some services seems okay. > > I have seen multiple posts on the net where people put swap on ZFS. What > sense does it make when every time the machine runs out of physical > memory it freezes before it can allocate some swap memory. Does it only > make sense in case you have additional non-ZFS swap? > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > there must be some logic in is as when you build a (open)*solaris box on zfs, the swap is on a vdev by defaukt. I think its because ZFS runs in kernel memory and this isn't swapable. Please correct me if im wrong somebody. $ swap -lh swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 182,2 4K 2.0G 2.0G $ uname -a SunOS desktop2 5.11 snv_134 i86pc i386 i86pc Solaris