Date: Mon, 19 Sep 2011 13:27:59 -0700 From: Freddie Cash <fjwcash@gmail.com> To: Jason Usher <jusher71@yahoo.com> Cc: freebsd-fs@freebsd.org Subject: Re: ZFS obn FreeBSD hardware model for 48 or 96 sata3 paths... Message-ID: <CAOjFWZ6Y4PbAaZzMxyzZHmtrNBJzOK8GMVJL0GP0PMdwj9SeXg@mail.gmail.com> In-Reply-To: <1316459220.35419.YahooMailClassic@web121209.mail.ne1.yahoo.com> References: <alpine.GSO.2.01.1109171451500.1973@freddy.simplesystems.org> <1316459220.35419.YahooMailClassic@web121209.mail.ne1.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 19, 2011 at 12:07 PM, Jason Usher <jusher71@yahoo.com> wrote: > --- On Sat, 9/17/11, Bob Friesenhahn <bfriesen@simple.dallas.tx.us> wrote: > > > 150KB is a relatively small file size given that the > > default zfs blocksize is 128KB. With so many files you > > should definitely max out RAM first before using SSDs as a > > l2arc. It is important to recognize that the ARC cache > > is not populated until data has been read. The cache > > does not help unless the data has been accessed several > > times. You will want to make sure that all metada and > > directories are cached in RAM. Depending on how the > > files are used/accessed you might even want to intentionally > > disable caching of file data. > > How does one make sure that all metadata and directories are cached in RAM? > Just run a 'find' on the filesystem, or a 'du' during the least busy time > of day ? Or is there a more elegant, or more direct way to read all of that > in ? > That should work to "prime" the caches. Or you can just let the system manage it automatically, adding data to the ARC/L2ARC as it's read/accessed. The end result of that would be much more in line with how the data is actually used. > Further, if this (small files, lots of them) dataset benefits a lot from > having the metadata and dirs read in, how can I KEEP that data in the cache, > but not cache the file data (as you suggest, above) ? There are ZFS properties for this (primarycache aka ARC; secondarycache aka L2ARC) which can be set on a per-filesystem basis (and inherited). These can be set to "all", "metadata", or "data". > Can I explicitly cache metadata/dirs in RAM, and cache file data in L2ARC ? No. Data that does not go into the ARC can never go into the L2ARC. IOW, if you set primarycache=metadata and secondarycache=data, you will never see anything in L2ARC. At least, that's the understanding I've come to based on posts on the zfs-discuss mailing list. And it does jive with what I was seeing on our storage servers. It's too bad, because it would be a nice setup, ordered from fastert to slowest: ARC for metadata, L2ARC for file data, pool for permanent storage. -- Freddie Cash fjwcash@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ6Y4PbAaZzMxyzZHmtrNBJzOK8GMVJL0GP0PMdwj9SeXg>