Create A Ram Disk To Use As A Scratch Disk

About:

A RAM disk is a block of RAM (primary storage or volatile memory) that a computer’s software is treating as if the memory were a disk drive(secondary storage). It is sometimes referred to as a “virtual RAM drive” or “software RAM drive” to distinguish it from a “hardware RAM drive” that uses separate hardware containing RAM, which is a type of solid-state drive (Wiki). So what does this mean for you? A drive that can get Read and Write speeds in excess of 3000 mb/s.

Preface:

Please keep in mind that once the computer is turned off or losses power all the files that are on the drive will be lost. Also I do not recommend that you use more then half of your systems ram for a Ram Disk for users who use 16 GB of RAM or less. Users who have over 16 GB of RAM allow 8 GB of RAM for the system.

Guide:

Part 1: Configuration

1. Download RamDisk.command found here

2. Right click on RamDisk.command

3. Select Open With:

Screen Shot 2013-04-11 at 1.37.04 PM

4. Select TestEdit:

Screen Shot 2013-04-11 at 1.36.35 PM

5. Locate 3906250 in the document:

Screen Shot 2013-04-14 at 11.20.33 PM

6. Calculate how many Gigabytes of RAM you want to dedicate to the RAM Disk:

[(GB)(1000^3)]/512 = Sector Size

Example 2 GB = 3906250 Sectors

7. Replace 3906250 in the document with the value you calculated

8. Save the document

9. Continue to Part 2

Part 2: Creating The Ram Disk

1. Run RamDisk.command:

Screen Shot 2013-04-11 at 1.43.27 PM

2. You will now see the following drive mounted:

Screen Shot 2013-04-11 at 1.44.29 PM

3. Continue to Part 3

Part 3: Enabling Ram Disk At Boot (Experimental) 

1. Download RamDisk.plist found here

2. Open Terminal:

Screen Shot 2012-11-23 at 7.27.06 PM

3. Type in:

Sudo su

4. Press Enter and enter your Password

5. The following screen should appear:

Screen Shot 2013-01-23 at 8.36.00 PM

6. Type in:

Open /Library/LaunchDaemons

7. Press Enter

8. The following folder should appear:

Screen Shot 2013-01-23 at 8.38.12 PM

9. Copy RamDisk.plist that you downloaded into this folder and then close the folder

10. In Terminal type in:

sudo chown root:wheel /Library/LaunchDaemons/RamDisk.plist

11. In Terminal type in:

Open /var/log/

12.  Copy RamDisk.command that you edited into this folder and then close the folder

13. Restart

14. Continue to Part 4

Part 4: Results

1

3 Responses to Create A Ram Disk To Use As A Scratch Disk

  1. Why can’t you just add RamDisk.command to your list of login items, so that it runs and creates a RAM disc automatically on login ? Works on my 2008 Mac Pro and seems a lot simpler than the plist method or am I missing something ?

    • rampagedev says:

      Think about that one… when you log out and log back in it will create a second and so on… Then crash your system. Your way is not a good idea at all as many users log out and log back in…

  2. Well, I see the point but that’s not how it behaves on my own machine (OS 10.9.4). Whether I log out and back in, or restart I just get the one RAM Drive on my desktop.

Leave a comment