TekRevue

  • Home
  • Mac
  • Windows
  • Mobile
  • Games
  • Home Theater
  • Reviews
  • Editorials
  • Tips
    • Windows
    • Mac
    • Mobile
  • Twitter
  • Facebook
  • Google+
  • Feed

Mac / Tips

How to Create a 4GB/s RAM Disk in Mac OS X

By Jim Tanous on May 21, 2013 at 9:00 AM • @mggjim

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.

How Big Should a RAM Disk Be?

The methods for creating RAM Disks, outlined below, will allow you to create a volume of any size. You’ll want to be careful to leave enough RAM available to run your Mac, however; if you use most or all of your RAM for a RAM Disk, the system will begin paging aggressively to the hard drive and overall system performance will plummet.

Therefore, make sure to choose a good ratio between your needs and your overall system memory. In general, it’s wise to keep your RAM Disk at or below 50 percent of your total physical memory. On a Mac with 16 GB of RAM, for example, don’t make your RAM Disk bigger than 8 GB.

Your choice will also depend on what applications you need to run while the RAM Disk is mounted. If you’re doing heavy Photoshop work, for example, you’ll want to leave more memory available for the app. On the other hand, if you’re just muxing video and audio files you can choose a RAM Disk a bit higher than 50 percent of your total memory.

Play around with the tools and techniques below to determine the best choice for your Mac and your needs. Now, it’s time to create the Disk itself. In OS X, there are two primary methods of creating a RAM Disk: the Terminal or an app.

Creating a RAM Disk via Terminal

Open the Terminal app from Applications > Utilities and enter the following command:

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nomount ram://XXXXX`

Replace the X characters with a number that represents the block size for the total capacity of your RAM Disk. Calculate this number by multiplying your desired size of disk in megabytes by 2048. In our example, we’ll create a 4 GB RAM Disk, which requires a number of 8388608 (4096 * 2048). Input this number in place of the X characters in the command above:

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nomount ram://8388608`

OS X RAM Disk Terminal

You can also change the “Ram Disk” name inside the double quotes to another name you prefer. Once you’ve configured the command, press Return to launch it. After a brief moment, the system will create and mount your RAM Disk. You can now read and write to it as you would with any other drive, as long as you remember that any data stored on the disk will be lost after a reboot or power loss.

Creating a RAM Disk with a Third Party App

For an even easier method, you can use a third party app to create a RAM Disk. There are several apps that perform this function, but we’ll use RAM Disk Creator from programmer Florian Bogner.

Download the app and launch it on your Mac. It will ask you two questions: the desired size of your RAM Disk (in bytes, kilobytes, megabytes, or gigabytes) and the name you’d like to assign the disk. We’ll use an 8 GB disk with the unimaginative name “RAM Disk.”

RAM Disk Creator

Once you’ve made your choices, simply press “Create RAM Disk” and the disk will mount to your desktop.

With both methods, you can get rid of the RAM Disk by ejecting it or rebooting. Again, make sure that all data on the disk is backed up before doing this; the data will be irrevocably lost once you reboot or lose power.

Benchmarks

The speed of RAM Disks will vary based on the performance level of your Mac’s RAM, but will still outperform traditional HDDs and SSDs by a wide margin. Here’s a performance comparison using a 16 GB RAM Disk on a 2011 27-inch 3.4GHz i7 iMac with a 240GB OWC Mercury Pro 6G SSD.

OS X RAM Disk Benchmark

The OWC SSD can achieve 490MB/s writes and 540MB/s reads, numbers that by normal standards are exceptional. When compared to the performance of a RAM Disk, however, the SSD’s performance isn’t worth a second look. The RAM Disk peaks at about 4.2 gigabytes per second in both reads and writes, and averages about 3.5GB/s throughout the transfer sizes. For disk-intensive tasks, this performance can be a game changer.

Conclusion

As you can see, RAM Disks can offer power users an amazing level of performance, but it cannot be stressed enough the dangers of using volatile memory for data storage. As long as you keep good backups and save your work to a standard hard drive frequently, however, many users may find that the benefits of RAM Disks far outweigh the risks.

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Google+ (Opens in new window)

  • Categories: Mac / Tips
  • Tags: #Apple #Flash Storage #Macs #OS X #RAM #RAM Disk #Terminal #Tips

Sign Up for the TekRevue Weekly Digest

Read more in Mac or Tips on TekRevue

  • add fingerprint macbook
    How to Add a Fingerprint to Touch ID on the MacBook Pro

    Filed Under: Mac

  • chrome app mode plex
    How to Run Plex and Other Web Apps in Chrome App Mode

    Filed Under: Tips

  • mail email
    Apple Mail: How to Include Only Selected Text in Email Replies

    Filed Under: Mac

Search

Related Articles

  • xbox games with gold
    The Complete Xbox Games with Gold List and Details
  • parallels desktop 14
    Parallels Desktop 14 Launches With Mojave Support, Performance Gains
  • macos mojave system requirements
    Can Your Mac Run Mojave? macOS Mojave System Requirements

Connect with TekRevue

  • TekRevue on Twitter
  • TekRevue on Facebook
  • TekRevue on Google+
  • Cheats
  • Deals
  • Distractions
  • Editorials
  • Gadgets
  • Games
  • Giveaway
  • Hardware
  • Home Theater
  • More in Mac
  • Mobile
  • News
  • Podcast
  • Reviews
  • Sponsor
  • Tips
  • Windows
  • add fingerprint macbook
    How to Add a Fingerprint to Touch ID on the MacBook Pro
  • mail email
    Apple Mail: How to Include Only Selected Text in Email Replies
  • parallels desktop 14
    Parallels Desktop 14 Launches With Mojave Support, Performance Gains
  • photos for mac
    Photos for Mac: Add Images to an Album With a Keyboard Shortcut
  • remote desktop gpu glitch
    Disable Microsoft Remote Desktop Hardware Acceleration to Fix Graphical Glitches
  • microsoft remote desktop mac always trust certificate
    Microsoft Remote Desktop for Mac: Always Trust Certificate
  • mac photos
    How to Quickly Edit Multiple Images in Photos for Mac
  • date and time mac
    How to Add an Automatically Updating Date and Time Stamp in Word for Mac
  • microsoft word for mac
    How to Change the Default Font in Microsoft Word for Mac
  • mac printer
    Here Are Two Ways to Print Multiple Files at Once in macOS
  • macos mojave wallpaper day night
    Download the macOS Mojave Wallpaper Day & Night Versions
  • macos mojave system requirements
    Can Your Mac Run Mojave? macOS Mojave System Requirements
  • Samsung 64bit Smartphone
    64-bit Mode: How to Prevent 32-bit Apps From Running on Your Mac
  • app is not optimized for your mac
    32-bit Apps: What to Do If an App ‘is Not Optimized for Your Mac’
  • mac offsite backup
    How and Why to Set Up an Offsite Backup for Your Mac
  • safari bookmarks
    How to Configure Safari to Load Multiple Websites on Startup
  • mac ds_store network files
    Stop Your Mac From Creating .DS_Store Files on Shared Network Drives
  • safari suggestions mac
    How to Turn Off Safari Suggestions in macOS
  • macbook dictionary
    How to Get a List of Spelling Suggestions on the Mac
  • mac app store high sierra banner
    How to Hide the High Sierra Upgrade Banner in the Mac App Store

Tips

  • Apps
  • Gaming
  • Mac
  • Mobile
  • Online
  • Windows
  • plex display scaling windows
    How to Adjust Plex Media Player Display Scaling in Windows
  • photoshop load as layers
    How to Open Multiple Images as Layers in a Single Photoshop Document
  • iphone youtube dark theme
    How to Use the New Dark Theme in YouTube for iOS
  • typing keyboard
    How to Paste Text Only By Default in Microsoft Word
  • slow steam browser windows
    Here’s One Potential Fix for a Slow Steam Browser in Windows
  • How to Manually Dim the Xbox One Screen
  • xbox one store games
    How to Browse Games by Genre in the Xbox One Store
  • classic solitaire windows xp
    How to Play Classic Windows XP Solitaire in Windows 10
  • mail email
    Apple Mail: How to Include Only Selected Text in Email Replies
  • photos for mac
    Photos for Mac: Add Images to an Album With a Keyboard Shortcut
  • remote desktop gpu glitch
    Disable Microsoft Remote Desktop Hardware Acceleration to Fix Graphical Glitches
  • microsoft remote desktop mac always trust certificate
    Microsoft Remote Desktop for Mac: Always Trust Certificate
  • change iphone search engine
    How to Change the Default iPhone Search Engine for Safari
  • iphone sleep timer
    Drifting Off: How to Use the Built-In iPhone Sleep Timer
  • iphone airplane mode wifi
    Save Battery Life in the Air: How to Use Wi-Fi With Airplane Mode Enabled on Your iPhone
  • mail email
    Apple Mail: How to Include Only Selected Text in Email Replies
  • chrome app mode plex
    How to Run Plex and Other Web Apps in Chrome App Mode
  • google docs macbook
    How to See What’s Taking up All of Your Google Storage Space
  • google docs macbook
    How to Clear Formatting in Google Docs
  • block notification firefox
    How to Block Website Notifications in Firefox
  • color explosion laptop
    How to Enable Title Bar Color for Desktop Apps in Windows 10
  • windows 10 lock screen surface studio
    How to Disable the Windows 10 Lock Screen
  • disable sticky keys prompt windows 10
    Windows 10: Disable the Sticky Keys Warning & Beep
  • slow steam browser windows
    Here’s One Potential Fix for a Slow Steam Browser in Windows
Company
  • About TekRevue
  • Get in Touch
  • Sponsorships

Sign Up for the TekRevue Weekly Digest

© TekRevue LLC. All Rights Reserved.

  • TekRevue User Agreement
  • TekRevue Privacy Policy

Built by Blazer Six