Subject: Re: memory limits
To: maximum entropy <entropy@tardis.bernstein.com>
From: Anders Magnusson <ragge@ludd.luth.se>
List: port-vax
Date: 10/28/1999 16:26:44
> 
> Excerpts from /sys/arch/vax/include/vmparam.h:
> 
> #define MAXTSIZ         (8*1024*1024)           /* max text size */
> #define MAXDSIZ         (24*1024*1024)          /* max data size */
> #define MAXSSIZ         (8*1024*1024)           /* max stack size */
> #define DFLDSIZ         (16*1024*1024)          /* initial data size limit */
> #define DFLSSIZ         (512*1024)              /* initial stack size limit */
> 
> Why are these so much smaller no NetBSD/vax than on other NetBSD ports?
> 
Because increasing them eats an HUGE amount of internal memory in
page tables etc... Example:

If the total addressing space for a process is 48MB, then the kernel
needs to allocate (48MB/VAX_NBPG) * sizeof(struct pte) bytes
_per_process_ virtual memory; i.e. 384k * maxproc. If there are
100 processes it will mean that 38MB will be set aside as virtual
memory in-kernel. This in turn implies that (38MB/VAX_NBPG) *
sizeof(struct pte) == 304k will be allocated from physical memory
before the kernel boots up, and that's quite much on a machine with
little memory.

I have spoken with the "algorithmic department" at my job about this,
and they have come up with some smart ideas to lower the needs.
I will see if those ideas work in the near future.

-- Ragge