Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Apr 2007 21:48:23 -0400
From:      Kris Kennaway <kris@obsecurity.org>
To:        Craig Boston <craig@xfoil.gank.org>, Kris Kennaway <kris@obsecurity.org>, freebsd-current@FreeBSD.org, Pawel Jakub Dawidek <pjd@FreeBSD.org>, freebsd-fs@FreeBSD.org
Subject:   Re: ZFS committed to the FreeBSD base.
Message-ID:  <20070410014823.GA38959@xor.obsecurity.org>
In-Reply-To: <20070410013034.GC8189@nowhere>
References:  <20070407131353.GE63916@garage.freebsd.pl> <4617A3A6.60804@kasimir.com> <20070407165759.GG8831@cicely12.cicely.de> <20070407180319.GH8831@cicely12.cicely.de> <20070407191517.GN63916@garage.freebsd.pl> <20070407212413.GK8831@cicely12.cicely.de> <20070410003505.GA8189@nowhere> <20070410003837.GB8189@nowhere> <20070410011125.GB38535@xor.obsecurity.org> <20070410013034.GC8189@nowhere>

next in thread | previous in thread | raw e-mail | index | archive | help

--IJpNTDwzlM2Ie8A6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Apr 09, 2007 at 08:30:35PM -0500, Craig Boston wrote:
> On Mon, Apr 09, 2007 at 09:11:25PM -0400, Kris Kennaway wrote:
> > Nah, you were right the first time :) Your system is defaulting to
> > 160MB for the kmem_map, of which zfs will (by default) try to use up
> > to 3/4.  Naturally this doesn't leave much for the rest of the kernel
> > (40MB), so you'll easily run the kernel out of memory.
>=20
> Hmm, I had already reduced the maximum arc size to 64MB though, which I
> figured (hoped?) would leave plenty of room.
>=20
> So if kmem_size is the total size and it can't grow, what is
> kmem_size_max?  Is there a way to see a sum of total kmem allocation?
> Even the vm.zone breakdown seems to be gone in current so apparently my
> knowledge of such things is becoming obsolete :)

It's the cap used by the auto-sizing code, i.e. no matter how much RAM
the system has it will never use more than 320MB for kmem, by default.

Currently I think there is no exported way to view the amount of free
space in the map, but there should be.

> > For now, you probably want to increase vm.kmem_size a bit to allow
> > some more room for zfs, and set vfs.zfs.arc_max and arc_min to
> > something more reasonable like 64*1024*1024+1 (the +1 is needed
> > because zfs currently requires "greater than 64MB" for the arc).
>=20
> Yeah, I found that out the hard way after wondering why it was ignoring
> the tunables :)
>=20
> I ran out of kmem_map space once with it set to 64*1024*1024+1, then I
> modified the source so that it would accept zfs_arc_max >=3D (64 << 20)
> instead, just in case it was a power-of-2 thing.

OK.  Probably this is a sign that 160 - 64 =3D 96MB is not enough for
your kernel, i.e. you'd also get the panics if you turned down
vm.kmem_size to 96MB and didn't use zfs.

Kris

--IJpNTDwzlM2Ie8A6
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFGGuznWry0BWjoQKURApB9AJ4lgiraecHeW18EQjeZEk3a+sbvQACdFXUC
RSQng/cu0rDKeiciAu8DPPE=
=D/pW
-----END PGP SIGNATURE-----

--IJpNTDwzlM2Ie8A6--



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