How to Make a RAM Disk Easily with TmpDisk for Mac OS X
If you want to quickly make a RAM disk for use on your Mac, you could create one manually through the command line, or you can make it even easier by downloading TmpDisk for Mac OS X.
The open source application uses a menu bar item to quickly make ram disks from anywhere and of any size, the only restraint is that the Mac have the physical memory to be able to accommodate the disks creation.
Throw the app into your /Applications/ folder and launch it to see the little disk icon in your menubar, click on that and choose “New TmpDisk”, specify a size, and a RAM disk is created instantly on the Mac desktop, ready for use.
TmpDisk supports being run from the command line with arguments to automatically generate a RAM disk upon launching of the app with the open command, for example:
open -a /Applications/TmpDisk.app --args -name=RammyDisk -size=128
That will create a 128mb RAM disk called “RammyDisk”.
Of course, if you’re in the command line, using the traditional diskutil approach may be preferred by some Mac users.
RAM disks are temporary – hence the apps name – so you won’t want to place anything intended to be permanent there, but for cache files, photo and video editing, and anything else that you want absolute maximum speeds from, they can’t be beaten. Just remember to copy your files out of the temporary disk before you reboot or eject the drive so you don’t lose anything.
[…] OS X Daily. Maca Dobravel Orificio Portatil Mala Massagem Divã AluminioMais info»R$ […]
I use vmware fusion and windows XP virtualized.
I would like to try to create a 4 Gb ram disk and to move the xp hd on ram disk.
Cheers
Pippox0
If your “hard drive” is a SSD, then whether you are storing data in one kind of chip-based memory (RAM) or another (SSD)is likely to bring only minimal benefits.
RAMdisks were useful 30 years ago when hard drives were slown and operating systems could only address 256 or 512 KB of RAM. If you had 1MB system you could turn the rest into a speedy RAMdisk.
Today, I really don’t see the point.
If you have an SSD, then it’s actually very useful to create RAM disk for temp files, for downloading code, unzipping it, compiling and toying around with stuff, so you avoid writing stuff to your SSD that you won’t necessarily keep. This extends the life of your SSD.
I use ramdisks to avoid heavily taxing my hard drives, and network. it permits distributed processes over a network to write to their own ram, instead of across the network, through a single computer, onto a hard drive, back through the computer and network, and back to the remote machine.
writing and erasing billions of tiny files per hour? seems like a job for a ramdisk.
How’s the performance compared to normal RAM ?
You mean a normal disk?
I’ve been using Esperance DV but this seems much sleeker… although Esperance has good backup features.
Size is limited to 2.2GB due to the diskutil being 32 bit.
Use the raid command to make one larger than 2.2GB. The size is in blocks, divide by 256 to get the MB size.
3.5GB
diskutil erasevolume HFS+ “r1” `hdiutil attach -nomount ram://3959731`
diskutil erasevolume HFS+ “r2” `hdiutil attach -nomount ram://3959731`
diskutil createRAID stripe RaidRamDisk HFS+ /Volumes/r1 /Volumes/r2
That’s not true.
$ which diskutil
/usr/sbin/diskutil
$ file /usr/sbin/diskutil
/usr/sbin/diskutil: Mach-O universal binary with 3 architectures
/usr/sbin/diskutil (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/sbin/diskutil (for architecture i386): Mach-O executable i386
/usr/sbin/diskutil (for architecture ppc7400): Mach-O executable ppc
$
I create and use 10 GB RAM disks all the time.
Actually it IS true for everyone. 2.2GB is the size limit.
Like Mario, I have been creating RAM disks with (much) bigger sizes than 2.2GB without a problem so you are obviously wrong in stating that this is true for “everyone”.
What version of OS X are you using?
Its the same for ALL versions of OSX.
Sorry Zedd, why do you keep saying something is impossible for “all and everything” as you can clearly create a ramdisk of greater size than 2.2GB.
Heck, for fun I just created a 10TB (yes, 10 Terra Bytes) Ram Disk, without any problem.
~$ diskutil erasevolume HFS+ BIGDISK `hdiutil attach -nomount ram://20480000000`
Started erase on disk4
Unmounting disk
Erasing
Initialized /dev/rdisk4 as a 10 TB HFS Plus volume
Mounting disk
Finished erase on disk4 BIGDISK
~$ df -h /Volumes/BIGDISK/
Filesystem Size Used Avail Capacity Mounted on
/dev/disk4 9.5Ti 993Mi 9.5Ti 1% /Volumes/BIGDISK
Now filling it would of course be a bit problematic as I don’t have that much ram, nor space on my swap drive, but at least it shows it is possible to create such big ram disks!
@Zedd – the 2.2GB limit (or 2.1GB actually) was removed with Snow Leopard (10.6). So it is only true for OSx versions <10.6
It would be handy to be able to put safari’s cache/temporary files up there.
Or launch disk utility and File/New/Disk Image
That makes no sense. A disk image is just a file on the hard drive that holds other files, like a folder setup as a virtual disk. A RAM disk is like a folder that sits in your RAM, RAM is even faster than an SSD. There is no comparison.
I think this is a GUI to the command line tool anyway, but it’s definitely faster than calculating byte counts. A+