kern/75755: kmem_malloc(45056): kmem_map too small: 335540224
total allocated
Michael Haro
mharo at FreeBSD.org
Wed Jan 5 01:20:28 PST 2005
The following reply was made to PR kern/75755; it has been noted by GNATS.
From: Michael Haro <mharo at FreeBSD.org>
To: Kris Kennaway <kris at obsecurity.org>
Cc: FreeBSD-gnats-submit at 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
More information about the freebsd-bugs
mailing list