Live data from Hacker News

Tmpfs considered harmful

rwmj.wordpress.com

1–10 of 85 posts

Re: Tmpfs considered harmful

#2
9 times out of 10, tmpfs is explicitly not for use mounted as /tmp. The only obvious exception I can think of are cluster nodes where the workload is specialized and the node has no local storage whatsoever.

I guess it only takes one silly person to connect "tmp" in the name to "/tmp", and the rest is history.

Re: Tmpfs considered harmful

#4
Minor disagreement about the following: "Everyone must worry about whether their files need to survive a reboot"

I believe there was never such expectation of /tmp. On many systems it's being wiped periodically or even when the user's last session ends. The example app(s) that use /tmp for drafts need(s) to be fixed.

Re: Tmpfs considered harmful

#5
post #4

Minor disagreement about the following: "Everyone must worry about whether their files need to survive a reboot" I believe there was never such expectation of /tmp. On many systems it's being wiped periodically or even when the user's last session ends. The example app(s) that use /tmp for drafts need(s) to be fixed.

Totally agree, /tmp should be wiped at the end of each session.

Re: Tmpfs considered harmful

#6
post #4

Minor disagreement about the following: "Everyone must worry about whether their files need to survive a reboot" I believe there was never such expectation of /tmp. On many systems it's being wiped periodically or even when the user's last session ends. The example app(s) that use /tmp for drafts need(s) to be fixed.

Surely thats what /var/tmp is intended for.

Re: Tmpfs considered harmful

#7
"Everyone must now be careful never to store a file in /tmp that might grow large"

If you're going to trash my /tmp with gigantic files please don't. Really

"it’s better to fix the filesystem to make it faster"

Yes, let's spend adding more complexity to the file system to work out every /tmp abuser out there. But his original point was avoiding adding complexity in the first place

So basically, he contradicts himself.

Mounting tmp as a memory backed fs is great (to which there may be better options than tmpfs), avoids (potentially) spinning up disks covered in rust for minor tasks.

Re: Tmpfs considered harmful

#8
Linkbait headline. Thought it was going to be about a gotcha with tmpfs in general, but it's only about one specific use of tmps in one specific -not even release- version of one linux distribution.

I get that the guy want's attention for this life-and-death issue, but linkbaiting is just mean :(

Re: Tmpfs considered harmful

#9
post #4

Minor disagreement about the following: "Everyone must worry about whether their files need to survive a reboot" I believe there was never such expectation of /tmp. On many systems it's being wiped periodically or even when the user's last session ends. The example app(s) that use /tmp for drafts need(s) to be fixed.

This is exactly what I use it for on my desktop. I have any app that I don't want to maintain longterm history for it's internal files (ex: Firefox browser cache) pointed to /tmp (mounted as tmpfs). As an added bonus if you're running your OS on an SSD (which you should be) you don't have it thrashed by constant writes/deletes.

The memory size issue is basically a non-issue at this point (pair of desktop 16 GB DIMMS are ~$80 and laptop isn't that much more).

Re: Tmpfs considered harmful

#10

It makes sense in certain cases to use tmpfs for /tmp. However, I'm not sure this is on desktop machines, which (generally) have lower RAM than servers thrashing their /tmp directories.

Even in that case, using tmpfs on /tmp sounds like band aid. If there are applications that suffer performance because stuff it puts in /tmp , then change those applications - possibly by using an application specific tmpfs , or a new system wide tmpfs that doesn't overload something as ubiquitous /tmp
Post reply on HN