Exploiting multiprocessors

John Hinsley jhinsley at telinco.co.uk
Mon Sep 10 08:13:45 UTC 2001


Matthew McNaughton wrote:
> 
> On Mon, 10 Sep 2001, John Hinsley wrote:
> 
> > John (currently about to give up the ghost on trying to get Linux to use
> > all its RAM and run on swap...guess that pre-emptive multi-tasking is
> > just too clever for me to beat!)
> 
> If I understand you correctly, you want your machine to act as if it has
> no RAM and only swap? You can't quite do this, but close. Some of the
> kernel obviously has to be memory resident(for instance the code that
> takes care of swapping!), but you can force the kernel to believe your
> machine has exactly as much ram as you say by giving this option on the
> LILO prompt, e.g.:
> 
> LILO: linux mem=1m
> 
> For one megabyte of memory, which is probably as little as you can get
> away with.
> 
> Do I understand your problem? Does this help? You could also try having a
> memory consumer process use the mlock(2) call to suck up all the RAM in
> the machine.

Thanks Matthew, but it wasn't *really* a problem: what I was trying to
do was to replicate a rather simple minded RAM/cache/swap model given in
a textbook (saying, more or less, that once all the RAM is used up the
'puter will use swap). Without really cheating (apportioning a vast
quantity of memory to Squeak, say) I couldn't get less than 2064Kb of
free RAM, and less than 60,000Kb of swap. And swap was being used very
early on, while there was plenty of RAM left. I even had 4 Squeaks
running Jochen's slideshow simultaneously along with Netscape, Gimp and
Star Office at one point, all on top of KDE. Strangely (or maybe not)
Squeak seemed by far the least affected: Gimp and KDE were very
obviously making big cache hits.

Looks like I need a better RAM/cache/swap model!

Cheers

John
> 
> --
> Matthew McNaughton <mcnaught at cs.ualberta.ca>

-- 
Can't cope anymore? Desperate for help?
Join the 12 step program for those who yearn to give up Microsoft:
http://home.earthlink.net/~penguinrox/index.html




More information about the Squeak-dev mailing list