Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2003 01:34:01 -0700
From:      David Schultz <das@FreeBSD.ORG>
To:        Peter Losher <Peter_Losher@isc.org>
Cc:        current@FreeBSD.ORG
Subject:   Re: Problems tuning kmem_map on 5.1-REL box.
Message-ID:  <20030618083401.GA74409@HAL9000.homeunix.com>
In-Reply-To: <20030617080628.H1802@farside.isc.org>
References:  <20030617080628.H1802@farside.isc.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 17, 2003, Peter Losher wrote:
> Hi -
> 
> If this sort of question is better asked on a more specialized list
> @freebsd.org, please let me know. (Since 5.1 is still considered a
> developmental release, one doesn't know if either -current or -stable
> would be more appropriate.  So I am sending it to -current.
> 
> So, I recently put a Quad-Xeon server (w/ 4GB of RAM) into production as
> primarily as a master FTP server for ISC as well as for FreeBSD (US/IPv6
> side of ftp.freebsd.org).  All has been going well for the past couple of
> weeks until 5.1 was released. Traffic spiked, and the server started
> panicking every 12 hours:
> 
> > panic: kmem_malloc(4096): kmem_map too small: 377487360 total allocated
> 
> So after looking at the archives, I read that FreeBSD had issues with
> installed memory above 2GB, so I set the sysctl kern.maxvnodes=130000, but
> to no effect:
> 
> > panic: kmem_malloc(16384): kmem_map too small: 293519360 total allocated
> 
> I have since removed my NMBCLUSTER setting in the kernel, so it would be
> set automatically, I have even set VM_KMEM_SIZE_SCALE="2" (I haven't messed
> with the other KMEM kernel options, as I was hoping to avoid it)  And a
> couple of hours ago I updated the kernel with the latest kern_malloc.c file
> in the RELENG_5_1 branch.

To allow the kmem_map to exceed 200 MB, you'll also need to tweak
VM_KMEM_SIZE_MAX to (for example) '(1024 * 1024 * 1024)'.  BTW,
the formula, which I stole from vmparam.h, is:

min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX)



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