From: spcberto@psyche.spc.uchicago.edu (Robert Osterlund)
Newsgroups: comp.os.ms-windows.setup
Subject: Re: Going from 4MB to 8MB RAM
Summary: Swapping to RAM disk *CAN* make sense
Keywords: swap, RAM disk
Date: 15 Oct 92 16:48:36 GMT
Organization: University of Chicago, SSPPCC

In article <1992Oct14.025721.27199@usage.csd.unsw.OZ.AU> troy@cbme.unsw.EDU.AU (Troy Rollo) writes:
>From article <1992Oct14.023509.26745@usage.csd.unsw.OZ.AU>, by zwh@newt.phys.unsw.edu.au (Zheng Weihong):
>> For follwing three cases, can anyone tell me which one has
>> better windows performance:
>> 1) turn off  Swapper
>
>The only effect this will have is to cause you to run out of memory if
>real memory gets low, and will actually slow things down in that case.
>
>> 2) put swapfile in ramdrive
>
>Pointless. It would take up as much memory as would be in the swap file.
>
>> 3) copy windows system file into ramdrive, and run windows in
>> ramdrive.
>
>Pointless. IF there is enough memory to hold the application in the
>ram drive, there is enough to hold it in memory. If there's not enough
>to hold it in memory, you should let Windows figure out what needs
>memory the most.
>
>A ram drive with Windows simply isn't going to be of any benefit.
>If you are looking at ways of speeding things up, the only thing related
>to any of your questions that might help is to create a permanent
>swap file. IF possible, this should be on a separate drive to data
>and Windows. The ideal swap file would be one which took up a fast
>20MB drive on its own.
>--
>__________________________________________________________________________
>troy@cbme.unsw.EDU.AU	Overworked, overcommited and always multitasking.

I think there *IS* a configuration where putting the swap file in a RAM
drive might make sense.  It is on a machine (like mine at home) which is
limited to 4 MB (or some other small amount) on the motherboard and where
memory expansion is only possible with a slower add-on card.

I added an Intel Classic Memory Board with 2 MB to my machine recently.
Initially, I configured the extra 2 MB as extended memory.  Unfortunately,
my disk cache and RAM drive insisted on loading in at the bottom of (fast)
memory.  Windows seems to make use of memory from the top down, and it 
utilized the slow 2 MB first, making everything in Windows slow down
dramatically.

Using QEMM386, I was able to force my disk cache (and RAM drive) into the
slower memory before loading Windows.  With the slow 2 MB already taken,
Windows loaded into fast memory.  After extensive testing showed
that running the disk cache from expanded memory rather than extended
memory was faster (an unexpected result), I now configure the expansion
2 MB as expanded memory and run the disk cache and RAM disk exclusively
therein.  (And I ditched QEMM386.  HIMEM.SYS was faster!)

(A puzzle:  My tests showed that running the disk cache in fast extended
main-board memory was actually slightly slower than running it in slower
expanded add-on board memory.  Is this a tribute to Intel?  Oh, I use
Norton's NCACHE with write-delay enabled.  Is NCACHE just faster when
running from expanded than extended?)

Now to my main point:

What if I don't care to use a disk cache?  Or what if I add additional
memory beyond what I would need for the cache and a normal-sized RAM
disk?  Here is where I think it makes some sense to put the swap file
in an oversized RAM disk.  The programs actually running (or recently
used) are in fast main memory.  The swapped code and data are in the
RAM disk in slower expansion memory.  I submit that swapping into and
out of the RAM disk is much faster than swapping to physical disk.

Am I missing something here?  If I decide I can't afford a new system and
instead just add RAM to my memory expansion card as my needs grow, I
just might make use of this RAM drive/swap file trick.
 
Bob Osterlund
berto@clio.spc.uchicago.edu
SSPPCC--University of Chicago