Aucbvax.5151 fa.unix-wizards utzoo!decvax!ucbvax!unix-wizards Thu Nov 12 22:40:26 1981 Memory Limits on 11/70's >From CSVAX.william@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= -. 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. ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.