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? Also can 9.1 now boot to zfs from the installer? (no tricks for post install) Thanks Ben
On Thu, May 9, 2013 at 2:18 PM, Benjamin Adams <benjamindadams at gmail.com> 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? >There is no right answer to this question. ZFS does not use a lot of RAM, but it will use as much as you allow as cache (in the ARC). How much data is your working set? How much of your working set do you need to keep in cache? You need that much memory (plus whatever to run your applications).> > Also can 9.1 now boot to zfs from the installer? > (no tricks for post install) >Can you clarify? The installer still cannot setup zfs pools, you must do so manually (but then can return to the installer). Cheers Tom
Le 09/05/2013 15:18, Benjamin Adams a ?crit :> 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? > > > Also can 9.1 now boot to zfs from the installer? > (no tricks for post install)Without cache, footprint of ZFS is larger than any other filesystem but it is really very tiny (8Mio if my memory is good). I run my server on an Intel Atom with 2GB of RAM, with Apache22, PHP, MySQL database and ejabberd. If you want to get ZFS on your system at install time, there are many scripts on the Internet, and if you want you can take mine: http://projet.beastie.eu/?p=freebsd-zfs.git;a=blob_plain;f=zfs.sh;hb=HEAD Hoping it will help you. -- Florent Peterschmitt +33 (0)6 64 33 97 92 florent at peterschmitt.fr ------------------------ O< ascii ribbon campaign - stop html mail - www.asciiribbon.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 555 bytes Desc: OpenPGP digital signature URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20130509/f25ce457/attachment.sig>
In the last episode (May 09), Benjamin Adams said:> 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?As much as is reasonable to purchase. Postgres would probably appreciate the memory more than ZFS. You can run ZFS on memory-limited machines (I've gone as far down as 256MB), but the critical part is running a 64-bit kernel. ZFS does a lot of kernel malloc/free operations, and address space fragmentation on a 32-bit system will eventually cause a panic when ZFS can't malloc a contiguous 128k chunk. -- Dan Nelson dnelson at allantgroup.com
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