Easily create a RAM disk for disk-intensive applications

Rafagon

Genius
Gold
Dec 7, 2011
7,566
1,254
113
45
Miami, Florida
#1
Until yesterday, I never knew how easy it is to create a RAM disk on OS X. You don't even need a separate app.

Here is an excerpt from an article for those who may be unfamiliar with the concept of a RAM disk, followed by a link to the entire article:

Article by Jim Tanous at TekRevue

RAM Disks, as the name indicates, are logical storage volumes created using a computer’s memory (RAM) instead of a traditional hard drive or solid state drive. The benefits are easy to understand: RAM operates at speeds far beyond current hard drive technology. But there’s also a major negative: data stored in RAM is not persistent, meaning that it is erased when the RAM loses power due to a reboot, shutdown, or power loss.

Despite this drawback, there are still several situations that can greatly benefit from the speed of a RAM Disk, including using it as a Photoshop scratch area, manipulating large video files, or testing complicated databases. If you’ve got good backups of your data and you’re willing to risk losing the contents of a RAM Disk in the event of a power failure, setting one up is easy and fun. Here’s how.
http://www.tekrevue.com/tip/how-to-create-a-4gbs-ram-disk-in-mac-os-x/

I've gone ahead and calculated the valuex of XXXXX you need to use in the command line mentioned in the article for various sizes of RAM disks:

Screen Shot 2014-04-08 at 3.29.06 PM.png


Note that the Terminal app in OS X stores a history of recently used commands, and the history does not get erased even after a reboot. So once you enter the command once, you can access it again the following day by using the Up arrow right after you enter the Terminal... unless you're a heavy user of the Terminal app and you've entered hundreds of commands since.

The RAM disk is definitely not a new concept. I remember I used to work with a RAM disk ages ago on my Atari 130XE - a computer which came with 128 KB of RAM, but was only able to address 64 KB of RAM at a time due to the limits of the MOS 6502 processor it came with. You could use the extra 64 KB of RAM to create a RAM disk, or access the extra RAM via bank switching.
 
Last edited: