[zfs-discuss] Memory Usage

Thomas Burns
Tue, 12 Sep 2006 21:30:14 -0000

On Sep 12, 2006, at 2:04 PM, Mark Maybee wrote:

> 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.

We are running the jun 06 version of solaris (10/6?).  I don''t have a
core
dump now -- but can probably get one in the next week or so.  Where
should
I send it?

Also, where do I set arc.c_max?  In etc/system?  Out of curiosity,
why isn''t
limiting arc.c_max considered best practice (I just want to make sure
I am
not missing something about the effect limiting it will have)?  My
guess is
that in our case (lots of small groups -- 50 people or less --
sharing files
over the web)  that file system caches are not that useful.  The
small groups
mean that no one file gets used that often and, since access is over
the web,
their response time will be largely limited by their internet
connection.

Thanks a lot for the response!

>
> 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

Tom Burns