Skip to content

Instantly share code, notes, and snippets.

@nickva
Created April 1, 2016 17:46
Show Gist options
  • Save nickva/0a01d2b7bbfd6e71ee57ab0b95b08d39 to your computer and use it in GitHub Desktop.
Save nickva/0a01d2b7bbfd6e71ee57ab0b95b08d39 to your computer and use it in GitHub Desktop.
Use a ramdisk on OS X to speed up local dev cluster
Download ramdisk.sh:
https://gist.github.com/nickva/74f12b6163e578c3afb0649370f59dc5
$ chmod a+x ./ramdisk.sh
$ ./ramdisk.sh create 4000 # create a 4GB disk mounted to /Volumes/ramdisk
Create ramdisk...
Disk ID is : /dev/disk2
Started erase on disk2
Unmounting disk
Erasing
Initialized /dev/rdisk2 as a 4 GB case-insensitive HFS Plus volume
Mounting disk
Finished erase on disk2 ramdisk
$ ln -s /Volumes/ramdisk ./dev/lib
$ ./dev/run ...
...
Ctrl+C
$ ./ramdisk.sh delete /dev/disk2 # <- MAKE SURE MATCHES /dev DISK FROM `create` command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment