Memory Limits on 11/70's

utzoo!decvax!ucbvax!unix-wizards utzoo!decvax!ucbvax!unix-wizards
Thu Nov 12 22:40:26 AEST 1981


>From CSVAX.william at Berkeley Thu Nov 12 21:59:46 1981
Standard V7 and 2.8bsd both have this problem of not booting with greater
then 2.0MB of memory. It prints out a MEM= -<something big>. You fix it
by changing maxmem from an int to unsigned, and all of the ints in mfree and
malloc to unsigneds. I can't remember exactly, but there may have been some
idiotic lines like:
	foo = -bar;
	bletch = foo + bar2;
which should be changed to respect unsigned integers....

If you're lazy and just want the system to boot, insert a 
	if( maxmem >= 32767L) break;
in the memory sizing part of machdep.c.
This, at least, is in 2.8bsd. { BTW, watch out for other int/unsigned bugs in
std V7 }

Oh, and the printf format for the mem message should be changed....

We found that immense numbers of buffers did not improve performance here.
At one time we had a system with 256 1k buffers which had no better performance
(and some said it had WORSE performance) then one with 70 1k buffers.

There are some clever things to use the memory for. You can speed up pipes by
4-5 times by seperating pipe buffers out of the user buffer pool and never
write them to disc. You can stick the root file system in core and head off
read/write accesses in bread/bwrite to complete them immediatly (this requires
building the filesystem BEFORE you boot). You can use the space for ipc buffer-
ing and network buffers. And, if you have overlayed processes of 400kb size
you will be quite happy to have all the space for normal reasons..

Note you will still have swaps though, even with lots free memory. They will be
swapins of sticky text. You can defeat this if you dare by changing the 
definition of sticky to be "stuck in memory". 

So there are many many ways of using all that memory. Since it's cheap, it is
one of the most inexpensive ways of throttling performance.

	Bill Jolitz.



More information about the Comp.unix.wizards mailing list