Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Aug 2015 13:36:35 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Quartz <quartz@sneakertech.com>
Cc:        FreeBSD FS <freebsd-fs@freebsd.org>
Subject:   Re: ZFS: Disabling ARC?
Message-ID:  <20150801133635.00002ecc@Leidinger.net>
In-Reply-To: <55BC14B7.9010009@sneakertech.com>
References:  <55BC14B7.9010009@sneakertech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 31 Jul 2015 20:37:11 -0400
Quartz <quartz@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@Leidinger.net: PGP 0xC773696B3BAC17DC
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0xC773696B3BAC17DC



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150801133635.00002ecc>