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 I wrote a while back, RAM Disk vs. Disk Cache: When to Use Each
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 in your Startup Items folder. Open ShrinkWrap and make 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 it 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 it 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 Mac 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).
Dan 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 article about using ShrinkWrap for image (RAM) disks.
“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 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 (this 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.”
- Scott L. Barber <firstname.lastname@example.org>
- Pres/CEO, SERKER Worldwide, Inc.
- Providing Hardware/Networking/Telecomm for 13 years
- Visit www.serker.com for more information
Scott L. Barber first posted this to Quadlist, the listserv for users of 68040-based Macs. It is published here with his permission.
Keywords: #ramdisk #shrinkwrap #rambunctious #keyquencer #appdisk
Short link: https://goo.gl/m124N8