Subject: Changing NKMEMPAGES_MAX_DEFAULT
To: None <tech-kern@netbsd.org>
From: David Brownlee <abs@netbsd.org>
List: tech-kern
Date: 03/04/2004 20:38:35
	nkmempages is defined as  'physmem / 4', clipped by MD
	values of NKMEMPAGES_MAX and NKMEMPAGES_MIN.

	The default values for these vary  widly between ports, and
	with the default values on at least sparc it is very easy
	to get a heavily used box running as an NFS server and client
	to panic with "panic: malloc: out of space in kmem_map".
	This is under 1.6.x and 1.6ZK.

	Running a google search on "panic: malloc: out of space in kmem_map"
	Excluding acorn26 which has amazingly tight VM restrictions
	and specifies it in pages, the various sizes across the
	ports in MB are listed below. In many cases the MIN and MAX
	values are the same, effectively clamping the values.

	    PORT	MIN     MAX
	    alpha	  8	128
	    amd64	  8	128
	    amiga	  3	128
	    amigappc	128	128
	    atari	  3	  3
	    cesfic	  3	  3
	    hp300	  6	  8
	    hppa	 16	 16
	    i386	  8	128
	    luna68k	  3	  3
	    mac68k	  3	128
	    macppc	  8	 48
	    mvme68k	  4	  6
	    news68k	  3	  4
	    next68k	  4	  4
	    pc532	  4	  4
	    pdp10	  4	  4
	    powerpc	 16	128 (can be overridded by each port)
	    sh3		  6	  6
	    sh5		  6	  6
	    sparc	  6	  6
	    sparc64	  6	128
	    sun2	  3	  3
	    sun3	  3	  3
	    vax		  4	  4
	    x68k	  3	  4

	I know sun4c has quite tight VM limits, which explains the lower
	value for sparc, but the above table just does not feel right -
	should 512MB i386 and amiga boxes need 128MB nkmempages while
	equivalent sparc, vax and atari only need 6MB or less?

	I'd like to propose changing the default sparc MAX to 16MB, but
	does it make sense to rationalise some of the other numbers as
	well?

--
		David/absolute          -- www.netbsd.org: No hype required --