Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I tried out variations on this on my daily driver setups. The design choices here were likely threefold:

Store tmpfs in memory: volatile but limited to free ram or swap, and that writes to disk

Store tmpfs on dedicated volume: Since we're going to write onto disk anyway, make it a lightweight special purpose file system that's commited to disk

On disk tmpfs but cleaned up periodically: additional settings to clean up - how often, what should stay, tie file lifetime to machine reboot? The answers to these questions vary more between applications than between filesystems, therefore it's more flexible to leave clean up to userspace.

In the end my main concern turned out to be that I lost files that I didn't want to lose, either to reboot cleanup, on timer cleanup, etc. I opted to clean up my temp files manually as needed.



A tmpfs itself is basically a ramdisk by definition. I assume you mean /tmp when you say tmpfs?


Yes. I'm not careful lately.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: