Monday, March 2, 2009

Ram Disks

Today I had the inspiration to look up how to enable RAM disks on my laptop. A RAM disk is essentially a partitioned section of a system's main memory which has been set aside for file storage. There are basically two reasons for wanting to do this. First, RAM has extremely fast read/write times. Anything stored in a RAM disk will be accessible by the computer at a significantly faster speed than storing data on say a hard disk. The other reason to store data on a RAM disk is because of the volatile nature of system memory. Except in some rare circumstances, all data stored in RAM is purged as soon as it loses power. When working with highly sensitive data like passwords or when working with cryptography storing data on a RAM disk is a rather appealing idea.

I found two nice and free graphical utilities for setting up RAM disks on OS X. First is called MakeRamDisk. This automatically creates a 64MB RAM disk when it is launched. To change this automatic setting or to make a disk of a different size, holding the option key while launched the app will open an options dialog. The other one I found is called Esperance DV. This gets installed as a prefPane in System Preferences. When I went to install this however I had to do so manually as I got an error when the system tried to install it automatically.

Installing prefPanes manually is relatively easy. An individual user's prefPanes are stored in "~/Library/PreferencePanes/" and prefPanes available to all users are stored in "/Library/PreferencePanes/". Once I got that installed and I relaunched System Preferences it was good to go. The Esperance DV preference pane gives a nice graphical menu with some options like setting the disk's name, size, and enabling auto creation upon system startup. Additionally there is a feature to save the RAM disk to a dmg and to move some system caches onto the RAM disk for speed.

I also found an article about creating a RAM disk from Terminal which I tried out, but the graphical are just more convenient in my humble opinion. Here is a link to that article.

No comments:

Post a Comment