Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use a RAM disk to speed browsing on slower Macs System
I remember when I was young (OS 9 times!), there were some tips about using a RAM disk as a super-speedy hard disk. Any program put in there would benefit from a huge speed increase due to the fact RAM is much quicker at retrieving data than a physical disk is. One of the most-used tips was to put the browser's cache folder, or even the whole browser, in the RAM disk and then surf and benefit from instantaneous cached pages. The problem was RAM was expensive in those days, and those of us who had the chance to get a 64MB RAM module wouldn't dare to spoil it with a RAM disk!

Two things are different now: first, it's OS X times, and second, RAM is cheap and everyone has (at least) 512MB of RAM, it seems. Well, in OS X, you really wouldn't need nor want a RAM disk. Besides, there are almost no utils to create RAM disk anymore in Panther. Who needs a RAM disk? Well, all of us who have plenty of RAM but an antique Mac, do. Like me: i have 640MB of RAM in my old iMac G3 500, running 10.3.3. It would be a great idea to dedicate some of this amount of RAM to better things than system memory.

So I created a RAM disk (with the excellent freeware Disk Velox) and then moved the Safari cache (from ~/users -> Library -> Safari) onto it. Then I created an alias of the new RAM-based cache folder and placed it back in the default Safari folder. So now the Safari cache points directly to the RAM disk. And I started to surf the Internet, and I couldn't believe it! Never had my usual sites had opened so fast! VersionTracker, MacFixIt, MacOSXHints, everything is instantaneous. Really makes a huge difference in browsing experience. So, who needs a DP G5 2,5 when you have a RAM disk :-)?

Some problems remain, though: there is no OS X RAM disk creator with an option to save the RAM to a disk image on shutdown, so everything is lost the next time you restart. It would be great to be able to save the cache between startups. Second problem: it would make sense to open the RAM disk before launching Safari, so the previously-saved cache is ready to be used. I think some little AppleScript would do that, but I have no AS skills. Right now, I enjoy my speedy Safari, but I hope someone can suggest some further enhancements.

[robg adds: I tested this, but didn't see any change on my reasonably fast machine. I'll try to test it later today on our G3/500, where I expect there will be a more notable increase in speed. Disk Velox is a really simple-to-use RAM disk creator, though -- just enter a name and size, click a button, and you're done. Quite nice...]
    •    
  • Currently 3.10 / 5
  You rated: 3 / 5 (10 votes cast)
 
[29,315 views]  

Use a RAM disk to speed browsing on slower Macs | 14 comments | Create New Account
Click here to return to the 'Use a RAM disk to speed browsing on slower Macs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use a RAM disk to speed browsing on slower Macs
Authored by: ibroughton on Aug 30, '04 11:03:37AM

I haven't noticed any speed increase either, and also I thought that the cache file was in ~/users -> Library -> Caches ->Safari? When I followed the instructions for ~/users -> Library -> Safari I got loads of error saying Safari couldn't find my bookmarks (and yes I had created the alias as described)

---
The server is up but the site is down and I don't know which direction you are trying to go



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: Pedro Estarque on Aug 30, '04 11:03:52AM

Maybe its the driver in disk velox ( I know its still beta ) but my testing here with xbench and FWB DriveTest had shown little advantage over regular HD. Xbench's score on a 512 disk was 120



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: mistersquid on Aug 30, '04 12:03:12PM

I'm not sure what Alberto Cutolo's "Disk Velox" is actually doing. I opened the application and mounted a "RAM" disk set to be be 1000 MB (1 GB) big and it did so without a complaint, despite the fact that I only have 896 MB of physical RAM. I haven't yet tried to copy a file in excess of the 896 MB to that 1 GB RAM disk, but I'm thinking that "Disk Velox" does not really distinguish between physical and virtual/disk RAM.



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: Pedro Estarque on Aug 30, '04 12:10:08PM

Also it doesn't seem to release memory after disk is ejected



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: metiure on Aug 30, '04 12:51:48PM

I think there is some confusion with the folder to cache. and my bad english doesn't help either.
The folder to be cached in RAM is ~/Library/Caches/Safari. Not the 'Safari' folder which contains Safari bookmarks.

Another point is that it is hard to make an alias of the cached folder, can say why. Here is how i install the whole stuff, with the previously reported results:

1.create the Ram disk. i usually create a 32 Mb one.
2.move the original cached safari folder to the ram disk (it may help to point out that this doesn't work when i create a folder directly in the ram disk, and point to it with an alias)
3.remove original folder
4.create an alias of the Ram disk cache folder, and copy the alias to the original folder.
5.at this point, I note that the copied alias won't point anymore to the ram disk cache folder, don't know why (may be because it's a copy of an alias?). so i'll have to reselect the Ram disk cache folder and reassign the alias to it (with Get Info)
6.now you can launch Safari, and it should to the trick.

This way i always get the same results. Note however that i abandoned this hints because of the time it takes. i'll get back to it when we have an app with a save image option.

Vic



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: allanmarcus on Aug 30, '04 01:53:41PM

I remember when I was young. Apple had just come out with the original Apple I. Man, I am old.

Once thing to remember is that unless "pinned", the RAM disk will just get swapped with all the other memory. Once the RAM disk is fulled loaded into member, there wont be any disk activity associated with the RAM disc. However, if there are many other demands on RAM at the time the RAM disc is being used, well, you will lose all your speed gains.



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: blackos on Aug 30, '04 03:51:43PM

You're worried about speed on an older mac? I am running 10.3.5 on a G3 266 Beige (thanks XpostFacto) ; it's fast enough for what I need, but it's always good to see attempts at tweaking performance :)



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: guybrush on Aug 30, '04 04:34:40PM

didnt notice any speedups.. :(



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: droemel on Aug 30, '04 05:35:28PM

I know that the utility "BootCD" uses a RamDisk on the bootable CD. Maybe that ones works better (or is scriptable). Link is: www.charlessoft.com



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: Zeitkind on Aug 30, '04 06:50:05PM

Tried this with mozilla 1.8nightly and 1GHz G4/1GB RAM - definitly speeds up browsing for me (50MB for RAM-disk). A startup-item for this might be fine :)



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: PeteC88 on Aug 30, '04 09:44:27PM

There is an app currently that will give you a RAMdisk in Panther:

http://www.donelleschi.com/ramdiskcreator/


I'm using it as I type with Netscape 7.02.. browsing fairly smokes!

It's fairly similar to ramBunctious in that the RAMdisk only stays active while the app is running. Only bad points are that it's not a saveable RAMdisk, if you quit the app it's not possible to drag-eject the RAMdisk unless you go to the Terminal, and it's still in beta. But it works great!



[ Reply to This | # ]
Use a RAM disk to speed browsing on slower Macs
Authored by: johnsawyercjs on Aug 31, '04 02:32:50AM

I tried this hint, using RAM Disk Creator, and Safari didn't use the cache folder on the RAM disk, nor did it create a new one on the hard drive. I also tried RAM Disk Creator with Camino, but unfortunately Camino deletes the alias of the Cache folder every time I launched Camino, and replaces it with a new Cache folder on the hard drive. Maybe a problem with RAM Disk Creator?



[ Reply to This | # ]
From an anonymous commenter...
Authored by: robg on Sep 04, '04 09:16:23AM
This was sent to me via email; I make no promises about it, and I haven't tested it...

-rob.

---------------

I have a ram disk set up to run seti@home. While I just move the files manually, I'm sure a script could be written to safely move them on reboot. You can create your own ram disk using the hdid unix command ... Check out the man page! // single line for ram disk creation...
hdid -nomount ram://<sectors>
// ram disk creation script...
#!/bin/sh
NUMSECTORS=10240
mydev=`hdid -nomount ram://$NUMSECTORS`
newfs_hfs $mydev
mkdir /RamDisk
mount -t hfs $mydev /RamDisk
// you can even add it to your start up items like so... File Name 'RamDisk'
#!/bin/sh

##
# Start RamDisk daemon
##

. /etc/rc.common

ConsoleMessage "Starting RamDisk"

NUMSECTORS=30720
mydev=`hdid -nomount ram://$NUMSECTORS`
newfs_hfs $mydev
mkdir /RamDisk
mount -t hfs $mydev /RamDisk
// and the plist to go along with the start up file... File Name 'StartupParameters.plist'
{
  Description     = "RamDisk daemon";
  Provides        = ("RamDisk");
  Requires        = ("Multiuser Login Prompt");
  OrderPreference = "Last";
  Messages =
  {
    start = "Starting RamDisk";
    stop  = "Stopping RamDisk";
  };
}


[ Reply to This | # ]
Use a RAM disk to hold a user
Authored by: josephaw on Sep 10, '04 06:07:10PM

Hey, I was playing with the ram disk and it worked fine.
Then I said, hey, let me create a user and put it's home directory on the RamDrive. It worked!
Maybe someone can use this procedure to create a faster startup OSX cd using Boot CD. Maybe create a file vault user and dd copy it from the cd to the ram disk and then log into that.
My second trial was to move that user from the temporary ramdisk to my flash memory drive. It worked again. Sort of like home on an iPod, but using my 256MB flash drive. I moved my bookmarks to it for mozilla.
This is nice, when these drive hold GB's of space, I'll put my whole user on it and take it from home to work. And as soon as apple activate home on the iPod, maybe this will work automatically too.
Keep up the great site.
Joe Ward
P.S. One thing I just notice, little no no disk activity, it's quiet.



[ Reply to This | # ]