ZFS: Disabling ARC?

Alexander Leidinger Alexander at Leidinger.net
Sat Aug 1 11:36:54 UTC 2015


On Fri, 31 Jul 2015 20:37:11 -0400
Quartz <quartz at sneakertech.com> wrote:

> Can someone help clear up a few ZFS basics for me?
> 
> A few recent threads about ARC issues and memory-induced panics have 
> made me realize I'm not 100% sure I understand ARC as well as I
> thought I did.
> 
> Say you have a ZFS file server that houses very large single files
> which are very infrequently accessed. For the sake of argument, let's
> say you're using ZFS on a home server for your family, and it holds 
> exclusively a whole bunch of multi-gig bluray rips or whatever
> (nothing else). When someone wants to watch something, they copy the
> file to their desktop and watch it there. Although the family will
> watch several videos each day, any given file will only be accessed
> maybe once every couple months. (I know streaming would make more
> sense in real life, and that this example is kinda silly in general,
> but ignore that for now).

No matter if you stream or copy, it's the same operation, read once in
a while.

> If I understand ARC correctly this would be a worst case scenario, 
> right? Besides hogging ram, would ARC cause any problems here? Would 
> disabling ARC and devoting the ram to other things be a wise idea? Is 
> disabling ARC ever a wise idea?

You can tune how the ARC is used:

# zfs get all space/export/Movies | grep cache
space/export/Movies  primarycache          metadata               local
space/export/Movies  secondarycache        none                   local

"primarycache" is the ARC in RAM, "secondarycache" is a cache device /
L2ARC (SSD).

"metadata" is directory listing, file sizes, access permissions and the
like.

So the above example means that metadata is allowed to go to the ARC in
RAM, and nothing of the real data in this dataset shall be cached
anywhere at all (neither in a cache device nor in RAM).

Bye,
Alexander.

-- 
http://www.Leidinger.net Alexander at Leidinger.net: PGP 0xC773696B3BAC17DC
http://www.FreeBSD.org    netchild at FreeBSD.org  : PGP 0xC773696B3BAC17DC


More information about the freebsd-fs mailing list