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.
-
2Possible duplicate of http://superuser.com/questions/121989/can-i-put-tmp-and-var-log-in-a-ramdisk-on-os-x – Michael Hampton Jul 13 '12 at 18:14
-
Not a duplicate: I am looking for an optimized file system - that question just uses HFS+ – Ramon Jul 13 '12 at 19:28
-
It's unclear what you define as "an optimized file system". – poige Mar 24 '16 at 17:53
3 Answers
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. ;)
- 409
- 5
- 12
-
I didn’t find any existing solution, but maybe we can [write one with FUSE](https://stackoverflow.com/questions/9003351/in-memory-fuse-filesystem)? – Franklin Yu Apr 14 '20 at 05:54
-
> Tmpfs doesn't cut specified amount of RAM from system memory You can specify the size in `mount` – interoception Aug 03 '21 at 16:42
-
@interoception Linux' tmpfs' `size` parameter is the *maximum* size. What they meant is that it doesn't cut out a fixed amount but grows with usage. – Atemu Mar 07 '23 at 11:56
There are couple of FUSE implementations, which should work on Mac:
It seems you can also use hdiutil:
- 6,531
- 11
- 39
- 51
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.
- 211
- 3
- 6
-
Not necessarily a performance question, it could be a privacy question. What's in a temporary fs will disappear after restart. Update: OOPS, I see the OP said it was for performance. My bad; I came here as a result of a search, and I'm doing it for privacy. – q.undertow Jun 09 '23 at 17:07