[zfs-discuss] Memory Usage

Mark Maybee
Tue, 12 Sep 2006 21:04:06 -0000

Thomas Burns wrote:
> Hi,
>
> We have been using zfs for a couple of months now, and, overall, really
> like it.  However, we have run into a major problem -- zfs''s
memory
> requirements
> crowd out our primary application.  Ultimately, we have to reboot the
> machine
> so there is enough free memory to start the application.
>
> What I would like is:
>
> 1) A way to limit the size of the cache (a gig or two would be fine  for
> us)
>
> 2) A way to clear the caches -- hopefully, something faster than  rebooting
> the machine.
>
> Is there any way I can do either of these things?
>
> Thanks,
> Tom Burns

Tom,

What version of solaris are you running?  In theory, ZFS should not
be hogging your system memory to the point that it crowds out your
primary applications... but this is still an area that we are working
out the kinks in.  If you could provide a core dump of the machine
when it gets to the point that you can''t start your app, it would
help us.

As to your questions; I will give you some ways to do these things,
but these are not considered best practice:

1) You should be able to limit your cache max size by setting
arc.c_max.  Its currently initialized to be phys-mem-size - 1GB.

2) First try unmount/remounting your file system to clear the
cache.  If that doesn''t work, try exporting/importing your pool.

-Mark