From owner-freebsd-bugs@FreeBSD.ORG Wed Jan 5 09:20:28 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46FC416A4CE for ; Wed, 5 Jan 2005 09:20:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D96F43D3F for ; Wed, 5 Jan 2005 09:20:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j059KRl5007236 for ; Wed, 5 Jan 2005 09:20:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j059KRUZ007235; Wed, 5 Jan 2005 09:20:27 GMT (envelope-from gnats) Date: Wed, 5 Jan 2005 09:20:27 GMT Message-Id: <200501050920.j059KRUZ007235@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Michael Haro Subject: Re: kern/75755: kmem_malloc(45056): kmem_map too small: 335540224 total allocated X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Michael Haro List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2005 09:20:28 -0000 The following reply was made to PR kern/75755; it has been noted by GNATS. From: Michael Haro To: Kris Kennaway Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: kern/75755: kmem_malloc(45056): kmem_map too small: 335540224 total allocated Date: Wed, 5 Jan 2005 01:18:45 -0800 Dual Processor FreeBSD server with 4096MB RAM: vm.kvm_size: 1069543424 vm.kvm_free: 188739584 vm.kmem_size : 335544320 vm.kmem_size_max: 335544320 vm.kmem_size_scale: 3 Single Processor FreeBSD server with 512MB RAM: vm.kvm_size: 1073737728 vm.kvm_free: 624947200 vm.kmem_size: 169992192 vm.kmem_size_max: 335544320 vm.kmem_size_scale: 3 Single Processor FreeBSD server with 128MB RAM: vm.kvm_size: 1073737728 vm.kvm_free: 864022528 vm.kmem_size: 40898560 vm.kmem_size_max: 335544320 vm.kmem_size_scale: 3 All are FreeBSD 5.3. What unit is kvm displayed in? Also, why is vm.kvm_size smaller on the machine with 4GB? From looking at kmem_size on the 2 UP servers, assuming it is what freebsd dynamicly allocated, it looks to be roughly 30% of system RAM. This would imply that the big server would need about 1.2GB of RAM allocated to kmem. What system functions require kmem? If it matters, I have two other Dell servers (that perform different tasks) with the same hardware configuration as the big machine above. Both of them list the same values from sysctl as the one above. Neither of them have been up 40+ days yet, so we'll see if they crash too. Michael On Tue, Jan 04, 2005 at 10:45:41PM -0800, Kris Kennaway wrote: > On Tue, Jan 04, 2005 at 10:09:52PM -0800, Michael Haro wrote: > > How would I figure out what this value should be set to without just > > increasing it and waiting for it to run out of KMEM space and panicing > > again? > > That's what you have to do. Dynamic memory allocation is, well, > dynamic :) > > > I'm not following the system workload thing you stated. This server > > mostly just nfs client, sendmail, clamav, mimedefang and seti and only > > receives about 300 messages per day. > > Something that your system is doing is causing it to run out of > memory. The default value is apparently fairly low on 4GB machines, > so it's not hard to do. > > > top currently says: > > Mem: 311M Active, 1532M Inact, 118M Wired, 67M Cache, 112M Buf, 1735M Free > > Swap: 4096M Total, 4096M Free > > > > How do I find out the amount of kmem being used? > > The vm.kvm_size and vm.kvm_free sysctl, maybe. > > Kris