Is there an implementation of tmpfs for Mac OS X?
That is: a file system designed specifically for ramdisks? I know I could use any old file system but I want something specialized for performance.
Solution 1:
Short answer: no, there's no Tmpfs for Mac OS X. Tinkering with RAM-disks in Mac OS X is just naively mimicking what you get with Linux Tmpfs if you consider Linux' version as archetype — simply due to Tmpfs doesn't cut specified amount of RAM from system memory, allowing to swappage out its least-recently-used pages to swap.
Long answer is the same. ;)
Solution 2:
Once you have a ram disk device, you can put any fs on it you like. HFS+ is going to be at least within an order of magnitude as good as any other fs. Since you're on a Mac, it's the most natural FS to put on your ram disk.
But as stated in the other (duplicate) question's answer: unix is pretty darn good at caching files with memory it's not using for other things. Taking space away from your OS and dedicating it to a ramdisk is usually not a good plan.
If you want to lower your i/o wait times and you have a very specific need, perhaps add an SSD to your system and use that.
Without knowing the details of your performance needs, it's very hard to answer your question with specifics.
Solution 3:
There are couple of FUSE implementations, which should work on Mac:
- https://github.com/bbengfort/memfs
- https://github.com/thegreyd/FuseFilesystem
It seems you can also use hdiutil
:
- https://github.com/coruus/osx-tmpfs
- https://gist.github.com/koshigoe/822455