recommended memory for zfs

Shane Ambler FreeBSD at ShaneWare.Biz
Fri May 10 00:53:36 UTC 2013


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




More information about the freebsd-stable mailing list