Subject: Re: Virtual Memory Issues on 2.0
To: Gary Parker <G.J.Parker@lboro.ac.uk>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-sparc
Date: 01/11/2005 19:40:33
On Tue, Jan 11, 2005 at 12:15:21PM -0000, Gary Parker wrote:
> Hi all, I've got a bit of an issue with my system which has manifested
> itself a few times while I was playing about and setting it up but now it's
> in service I could without it.
> 
> Hardware:
> SS20 with 2x 150MHz Ross HyperSPARC and 384MB RAM
> 
> I'm running 2.0 stable with a non-generic SMP kernel.
> 
> The problem is that the system appears to not be able to access swap, after
> running a number of intensive tasks (case in point this morning being
> compiling Python) I get the following error message and anything that
> requires a lot of memory subsequently fails to run:
> 
> virtual memory exhausted: Cannot allocate memory
> 
> The output of free at the time is as follows:
> 
>              total       used       free    buffers
> Mem:        351140     332496      18644     178180
> Swap:       720892          0     720892
> 
> Curiously, dmesg give the following message repeated over and over:
> 
> sd1(esp1:0:3:0): unable to allocate scsipi_xfer
> sdstart(): try again
> 
> ...and /var/log/messages contains:
> 
> Jan 11 10:31:30 wintermute /netbsd: sdstart(): try again
> Jan 11 10:31:30 wintermute /netbsd: sd1(esp1:0:3:0): unable to allocate
> scsipi_xfer

Most likely you're running out of kmem_map entries. Check the current value
with
sysctl vm.nkmempages
and recompile a kernel with
options NKMEMPAGES=<some highter value>
I run with 6144 on a dual-CPU ss10, and this seems to be enouth.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--