From owner-freebsd-stable@FreeBSD.ORG Fri May 10 00:53:36 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C97B1647 for ; Fri, 10 May 2013 00:53:36 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail05.adl6.internode.on.net (ipmail05.adl6.internode.on.net [IPv6:2001:44b8:8060:ff02:300:1:6:5]) by mx1.freebsd.org (Postfix) with ESMTP id 63E47E81 for ; Fri, 10 May 2013 00:53:36 +0000 (UTC) Received: from ppp247-71.static.internode.on.net (HELO leader.local) ([203.122.247.71]) by ipmail05.adl6.internode.on.net with ESMTP; 10 May 2013 10:23:35 +0930 Message-ID: <518C450B.5070809@ShaneWare.Biz> Date: Fri, 10 May 2013 10:23:31 +0930 From: Shane Ambler User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Benjamin Adams Subject: Re: recommended memory for zfs References: <518BA237.3030700@gmail.com> In-Reply-To: <518BA237.3030700@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2013 00:53:36 -0000 On 09/05/2013 22:48, Benjamin Adams wrote: > Hello zfs question about memory. > I heard zfs is very ram hungry. > Service looking to run: > - nginx > - postgres > - php-fpm > - python > > I have a machine with two quad core cpus but only 4 G Memory > > I'm looking to buy more ram now. > What would be the recommend amount of memory for zfs across 6 drives on > this setup? > I believe I heard a calculation of 1GB cache per 1TB of disk. But basically zfs will use all free ram available if you access that much data from disk. You will want to set vfs.zfs.arc_max to allow enough ram for your apps to work in. If you consider the files for your website and the data you store you may find that you would never fill more than 500MB of cache. If you will be serving large media files that will easily use up the cache you could give them their own filesystem that only caches metadata - zfs set primarycache=metadata zroot/mediafiles