Back in June I asked about RAM disks larger than 2 GB. OS X versions prior to Snow Leopard do unfortunately have some limit in place so the post of eyoungren inspired me to try to create multiple ones and merging them afterwards. I've also wanted something that can be automated.
I wrote a little script (or rather copy and pasted something together) that will just do that:
Code:
do shell script "diskutil erasevolume HFS+ 'r1' `hdiutil attach -nomount ram://3663872`"
do shell script "diskutil erasevolume HFS+ 'r2' `hdiutil attach -nomount ram://3663872`"
do shell script "diskutil erasevolume HFS+ 'r3' `hdiutil attach -nomount ram://3663872`"
do shell script "diskutil erasevolume HFS+ 'r4' `hdiutil attach -nomount ram://3663872`"
do shell script "diskutil erasevolume HFS+ 'r5' `hdiutil attach -nomount ram://3663872`"
do shell script "diskutil createRAID concat 'RamDisk' HFS+ /Volumes/r1 /Volumes/r2 /Volumes/r3 /Volumes/r4 /Volumes/r5" user name "USER" password "PW" with administrator privileges
This will create a RAM disk that has approximately 8GB in size. Below you'll find a speed test of said merged RAM Disk:
View attachment 2027134
If one wants to automate the process just paste the code into Script Editor and create an .app file. Next, just go to System Preferences and add the .app file to your startup items.
Since I have 16GB of RAM installed in my G5, I think an 8 GB RAM Disk is very appropriate. My G5 hardly ever uses more than 4GB of RAM with regular use and I want to make use of most of the available memory. Use cases of RAM disks are many but for me it is primarily having a really fast drive and also having a drive for files I do not need anymore after my session (avoid clutter in the first place).