From owner-freebsd-fs@FreeBSD.ORG Sat Aug 14 04:13:48 2010 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 DE7C810656A6 for ; Sat, 14 Aug 2010 04:13:48 +0000 (UTC) (envelope-from andriy@irbisnet.com) Received: from smtp104.rog.mail.re2.yahoo.com (smtp104.rog.mail.re2.yahoo.com [206.190.36.82]) by mx1.freebsd.org (Postfix) with SMTP id 9A21E8FC1D for ; Sat, 14 Aug 2010 04:13:48 +0000 (UTC) Received: (qmail 55033 invoked from network); 14 Aug 2010 04:13:47 -0000 Received: from smtp.irbisnet.com (andriy@99.235.226.221 with login) by smtp104.rog.mail.re2.yahoo.com with SMTP; 13 Aug 2010 21:13:47 -0700 PDT X-Yahoo-SMTP: dz9sigaswBA5kWoYWVTZrGHmIs2vaKgG1w-- X-YMail-OSG: i6a6KNIVM1k3tTJI8PschhiK.CEUEuOiZQ00V.rytlOiZGU 3M9_zvRUu_JJVjJUr2yjWCEw_.AeB8H5Zo8VHsUYx2FFR40AJ8hF99MJNTo4 KgYUKLIlQnzEOaLfnAya2Jc2MLoy2GWHDTAurGTwV9XiTpKrWJlGAsiB.mlq CopkC2a0LnitOpunIf301D4GNqw4V7H_t.9YAMVIC8AwEmGISCn_6P2L6Cnf UFEyJ_MQ9LLXz.V8kdQYUN8omrE95s6YbY0DY0bQU4gD6oRrV3QL.4oDGPxb E094A70ewlQV4Mgqf6wNNkrmWDGsQ0MW3SnIVo9ZsvtUIb4_xIjEiWhek6TA yjmXuKCTkzdkc7HtT0DDTUu7lU_iZ8PsQ3mdDp20Vw40nSBMx63fV8AK1AE1 mS8ki3gAJ0YENhyfUjJunbpWTnapXpkkb3RvLK2qquH_E X-Yahoo-Newman-Property: ymail-3 Received: from prime.irbisnet.com (prime.irbisnet.vpn [10.78.76.4]) by smtp.irbisnet.com (Postfix) with ESMTPSA id 181441140C; Sat, 14 Aug 2010 00:13:40 -0400 (EDT) Message-ID: <4C6617F2.7080807@irbisnet.com> Date: Sat, 14 Aug 2010 00:13:38 -0400 From: Andriy Bakay User-Agent: Thunderbird 2.0.0.23 (X11/20091223) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20100813191521.GB2006@garage.freebsd.pl> In-Reply-To: <20100813191521.GB2006@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: Converting sysinstalled FreeBSD into ZFS-only server. 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: Sat, 14 Aug 2010 04:13:49 -0000 Pawel Jakub Dawidek wrote: > On Mon, Aug 09, 2010 at 04:22:42PM -0400, Andriy Bakay wrote: >> 1. In your post you are using dedicated partition for swap. Did it provide >> any advantages versus swap on ZFS volume? > > There is a good chance to deadlock your system when you have swap based > on ZVOL, as to operat on ZVOL ZFS needs to allocate some memory, which > you probably don't have much when you're swapping. > Just to clarify. It means I can only use swap based on ZVOL only in non-production environment? Could this problem be solved or it is something fundamental (for FreeBSD) here? As far as I know on Solaris ZVOL based swap works without problems. >> 2. You are suggesting to set 'vm_kmem_size' value to 150% of RAM. What >> pros. and cons. against following formula: >> >> vm_kmem_size = RAM / 2 >> vfs.zfs.arc_max = vm_kmem_size - 512M > > Well, I prefer to have as much address space as I have RAM, when you > count VM fragmentation in, 150% should be enough to be able to allocate > even entire memory for kernel. Of course it all depends on what you run, > etc. This is setting I use and I had no problems with it. > I have FreeBSD 8.0-RELEASE-p2 amd64 with 4G RAM, when I set vm_kmem_size to 6G my vfs.zfs.arc_max became 5G. Is it normal for this kind of setup? Could such ARC value become a problem, because I only have 4G RAM? >> 3. Could you be more verbose about your ZFS layout, what major advantages >> it provide against for example the following: >> http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot. I found it very interesting >> but I need more info. > > I added some notes why I use and recommend such layout at the end of the > post. From my experience the fact that file systems are cheap in ZFS > doesn't mean it is to have too many of them. For example I don't like to > have all /var/ subdirectories are separate ZFS datasets. There are > strong reasons to separate some of them (to turn on compression, for > example), but not all of them. > > Of course if you don't like my reasoning or you have different needs, > feel free to use whatever layout you feel fits best for you:) > > I'm also open to comments on the layout I proposed. I use it for quite a > while now and I tried different ones before too, but this one I simply > find the best. If our official installer will support creating ZFS-only > install, I'll be forcing this layout, so if you think something is > _very_ wrong about it, let me know. > Your notes in the blog (http://blogs.freebsdish.org/pjd/2010/08/06/from-sysinstall-to-zfs-only-configuration/) sounds very reasonable. So, should /var/db be compressed as well? In your layout you create home dataset under /usr: system/usr/home. maybe it is more logical to create it one level upper: system/home or in this case you just follow standard FreeBSD filesystem layout? Thanks for your answers. Andriy