Situatie
A RAM disk is a virtual drive built entirely from your Mac’s memory instead of your SSD. Since RAM is dramatically faster than even the fastest NVMe storage, this trick can meaningfully speed up apps that constantly read/write temporary files — think Photoshop’s scratch disk, Premiere Pro’s media cache, or DaVinci Resolve’s render cache. It’s especially useful on Macs with 16GB+ of RAM where you can spare a few gigabytes without impacting overall performance.
Solutie
- Open Terminal (Spotlight → “Terminal”).
- Decide how large you want the RAM disk to be, then convert that to 512-byte blocks, since that’s the unit
hdiutilexpects. The formula is:size_in_GB * 1024 * 1024 * 2. For example, a 4GB disk =4*1024*1024*2 = 8388608. - Run the following command, replacing the number with your calculated block count:
diskutil erasevolume HFS+ "RAMDisk"hdiutil attach -nomount ram://8388608“ - Within a few seconds, a new volume called “RAMDisk” will mount and appear both in Finder’s sidebar and on your Desktop, exactly like an external drive.
- Open your editing app’s preferences and point the scratch/cache disk setting to this new volume (in Photoshop: Preferences → Scratch Disks; in Premiere: Preferences → Media Cache).
- Work as usual — you should notice snappier scrubbing, faster cache writes, and reduced lag on large files.
- Important caveat: everything on a RAM disk is wiped the moment you restart or shut down, and it also disappears if the Mac sleeps deeply or crashes. Never use it to store final exports or anything you can’t afford to lose — treat it strictly as disposable, temporary scratch space.
- If you want to automate this so the RAM disk is recreated every time you log in, you can save the command as a small shell script and add it to your Login Items via Automator, or as a Launch Agent for more advanced users.
This trick works particularly well on machines with unified memory (Apple Silicon), since RAM bandwidth there is exceptionally high, but it’s equally valid on Intel Macs with enough free memory.
Leave A Comment?