A RAM Disk AlternativeScott
L. Barber first posted this to
Quadlist.
It is reprinted with his permission. Someone I'd love to give credit to, but
don't know who they were when they suggested it to me, gave
me a wonderful idea for the RAM disk/disk cache solutions in
an article (RAM
Disk or Disk Cache?) I wrote a
while back. Instead of repartitioning your hard drive
(see Hard
Drive Partitioning), and instead
of dedicating all that memory to a RAM disk for your browser
disk cache, the following works very well. Create a ShrinkWrap disk image of 10 MB or
so, and alias it to your desktop as well as your Startup
Items folder. Open ShrinkWrap, and check the "Keep mounted
images in RAM" option active. This will be fast, just like a
real RAM disk, but with several advantages: - A mounted disk image is cacheable,
unlike a RAM disk.
- The mounted image can be destroyed if
it becomes corrupt, without damaging the hard
drive.
- The mounted image can be left on the
boot volume, where data access is fastest during cache
writes.
- The mounted image can be wiped at any
time, reformatted, resized, reused.
- A second image can be mounted for
Photoshop use the same way, without resorting to a RAM
disk.
- Almost no painful OS problems occur
with this method, and RAM is recovered simply by throwing
the image in the trash, in low memory situations. A
custom AppleScript could be made that automounts the
image, then launches the application you desire, waits,
and when the application quits, unmounts the image. This
involves little to no OS hardware intervention and should
not produce the kinds of crash results normally dealt
with on RAM disks and Photoshop VM.
Disk Copy Images can also be used this
way, though you should not use compression formats with the
images. Another alternative is ramBunctious, which creates a
RAM disk that can be mirrored to the hard drive. Partitioning the hard drive for a cache
partition, as recommended in Hard
Drive Partitioning, is not
necessary -- but is still recommended if you're going to
partition the hard drive anyway (a hard partition is still
going to be a little bit faster than this image routine, but
is much more intrusive to implement on the fly for most
users). Your disk cache should be left at the
most comfortable maximum you can afford, since the disk
image is cacheable -- RAM disks are not. There are cases where a disk cache and
RAM disk can fight each other and act slower combined. This
is not the case with mounted disk images; they should not be
looked at as RAM disks in the Apple OS sense. They will work
like really fast tiny hard drives (and thus have the
benefits of disk cache without the cache-related problems of
a RAM disk). FeedbackDan Buettner writes, "Using a
ShrinkWrap image as an alternative to a RAM disk is a fast
and effective solution, but there's one that's even better
-- using a shareware application like AppDisk to create the
RAM disk. "I experimented with a ShrinkWrap image
for a while, but found that it didn't work quite as well as
I had hoped it would: the memory was not always freed when I
dragged the image to the Trash. Plus, resizing the image was
a little tedious (not bad, but not as convenient as resizing
AppDisk). "AppDisk allows you to change partition
size by simply changing the memory allocated to the
application, it will save the contents of your RAM disk at
specified intervals and/or when quitting, and the memory is
always freed up by quitting the app. It also seems to be a
more stable solution even than ShrinkWrap images. "Check out http://members.aol.com/mavsftwre/
for more info." Fenton Jones writes, "Hello. I was
just reading your column MOTJ with the article about using
ShrinkWrap for image (RAM) disks (by Scott L.
Barber). "I use a similar method. I use the
shareware program Rambunctious to do pretty much the same
thing. It also allows you to have multiple RAM disks stored
on the hard drive, which can then be loaded into
RAM. "I have a combo KeyQuencer macro and
AppleScript that work together to launch a small RAM disk to
use as the Netscape cache. I keep a virgin copy of the
Netscape's cache folder in the same folder as the
AppleScript. As soon as the RAM disk is loaded, it copies
this empty cache folder onto it. Netscape is set to use it
via its preferences (has to be done while the RAM disk is
loaded). "After this happens KeyQuencer launches
Netscape. The only drawback to the arrangement is that I
must use the KeyQuencer macro to initiate the whole
scenario. Launching Netscape manually, or by clicking a URL
when it's not running, will force Netscape to create and use
its default cache folder, in its Netscape Preferences
folder. "After I'm done browsing, I quit Netscape
first, then Rambunctious. This trashes the cache folder. I
could configure Rambunctious to save it on the hard drive,
but this way I always start each session with a fresh
cache. "I use URL Manager's History function to
save 1000 recent web sites, so I can always find my way back
to something that way. "Rambunctious is a wonderful program. I
also use it with FileMaker for tremendous speed gains. It
has more options than others, allowing you to set a RAM disk
that reads from RAM, but writes through to the hard disk.
This still gives you increased speed while preserving decent
safety, necessary for databases. "The reason I go to so much trouble is my
little Performa 475 is maxed out with 36 MB of RAM; I can't
afford to leave a RAM disk running when I'm not using it,
and I'm too slow without it." Related articles- Scott
L. Barber
<serker@serker.com>
- Pres/CEO, SERKER Worldwide,
Inc.
- Providing
Hardware/Networking/Telecomm for 13 years
- Visit www.serker.com
for more information
Quadlist,
the listserv for users of 68040-based Macs. FAQ at
<http://lowendmac.net/quadlist> Recent on Macintosh Online Technical Journal
<back to Macintosh
Online Technical Journal,
Quadlist
FAQ, or The
S-Files>-
 MacPromote
Xchange-
-
 Member of the Mac
Web Network
Macintosh
Online Technical Journal begun 1 December
1997. This page and the entire site copyright ©1997, 1998, 1999
by Dan
Knight. All rights reserved. LINK POLICY: This site allows and encourages links
to any public page, so long as the linked page does not appear within
a frame that prevents bookmarking the linked page. Apple, the Apple logo, and Macintosh are
registered trademarks of Apple Computer, Inc. Additional company and
product names may be trademarks or registered trademarks of the
individual companies and are respectfully acknowledged.
|