Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 May 2010 09:03:12 -0700
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        Mike Andrews <mandrews@bit0.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Freebsd 8.0 kmem map too small
Message-ID:  <20100510160312.GA62178@icarus.home.lan>
In-Reply-To: <4BE82C5D.1080806@bit0.com>
References:  <4BDEA86E.3050109@zirakzigil.org> <20100503110100.GA93137@icarus.home.lan> <4BDEC106.3040807@zirakzigil.org> <4BE110E3.8040902@zirakzigil.org> <q2vb269bc571005050819nde819098vfd3306170639a9c9@mail.gmail.com> <4BE82C5D.1080806@bit0.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 10, 2010 at 11:55:09AM -0400, Mike Andrews wrote:
> Sorry to semi-hijack this, but...  I'm also running into frequent
> "kmem_map too small" panics on 8-STABLE, such as:
> 
> panic: kmem_malloc(131072): kmem_map too small: 2023780352 total allocated
> panic: kmem_malloc(131072): kmem_map too small: 2011525120 total allocated
> panic: kmem_malloc(114688): kmem_map too small: 1849356288 total allocated
> panic: kmem_malloc(114688): kmem_map too small: 1849356288 total allocated
> panic: kmem_malloc(114688): kmem_map too small: 1849356288 total allocated
> panic: kmem_malloc(131072): kmem_map too small: 2020409344 total allocated
> panic: kmem_malloc(536576): kmem_map too small: 2022957056 total allocated
> 
> (those are over the course of 3-4 days)
> 
> On this specific system, it has 32 GB physical memory and has
> vfs.zfs.arc_max="2G" and vm.kmem_size="64G" in /boot/loader.conf.
> The latter was added per earlier suggestions on this list, but
> appears to be ignored as "sysctl vm.kmem_size" returns about 2 GB
> (2172452864) anyway.
>
> ...

In your case, vm.kmem_size being stuck at 2GB (despite you setting it
larger) is the problem.  A workaround would be for you to set
vfs.zfs.arc_max to something smaller, such as 1G or 512M.

Can you please provide output from the following 5 commands:

uname -a
sysctl vm.kmem_size_min vm.kmem_size_max vm.kmem_size vm.kmem_size_scale
sysctl hw.physmem hw.usermem hw.realmem
sysctl hw.machine_arch
sysctl hw.pagesize hw.pagesizes hw.availpages

Thanks.

-- 
| Jeremy Chadwick                                   jdc@parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |




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