On Thu, May 15, 2008 at 10:07:14PM -0400, Ted Unangst wrote:
> On 5/15/08, Kevin <[EMAIL PROTECTED]> wrote:
> > All,
> >
> >  I'm getting quite a lot of these errors in /var/log/messages and can't
> >  seem to find an appropriate fix in the archives:
> >
> >      May 14 21:05:54 svr02 /bsd: uvm_mapent_alloc: out of static map entries
> >      May 14 21:57:47 svr02 /bsd: uvm_mapent_alloc: out of static map entries
> >      May 14 23:00:05 svr02 /bsd: uvm_mapent_alloc: out of static map entries
> >      May 15 07:27:53 svr02 /bsd: uvm_mapent_alloc: out of static map entries
> >      May 15 07:39:59 svr02 /bsd: uvm_mapent_alloc: out of static map entries
> >
> >  N.B. This machine serves mirror content for various F/OSS projects in
> >  addition to standard www content, so it quite often has >350 users
> >  concurrently connected downloading mirrored content (in addition to
> >  visitors who're actually visiting the site).
> 
> Are you using squid as well?  You may try doing something like
> restarting apache.
> 
> The problem seems related to certain long running processes with
> fragmented address spaces.
> 
> Basically, in order to manage address spaces, the kernel keeps track
> of a bunch of maps.  Entries in these maps are stored in... map
> entries.  In certain situations, the kernel can't wait to allocate a
> map entry, so it grabs one from a static list.  Previously, when they
> ran out, the kernel paniced.  Now it just says uh oh.  The kernel will
> merrily go on making more static entries as needed.

the problem is not in the user land.
the problem is in i386 pmap which abuses kmem_map that is there
for malloc(9)s use and allocates pv_entries from it.
this leads to enormous kmem_map fragmentation and unaccounted
allocations that does not show up in the vmstat and as well leads
to livelocks (sleeping on kmem_map) and out of space in kmem_map
panics as well. there is a number of measures to remediate the
situation proper
- convert pv_entries allocations to pool (i have a diff if you wanna)
- backend malloc w/ pool (filed in sendbug)
- a number of uvm fixes (such as amap ops) that reduce fragmentation.
cu
-- 
    paranoic mickey       (my employers have changed but, the name has remained)

Reply via email to