[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving /tmp to tmpfs makes it useless



On Mon, May 28, 2012 at 08:26:52AM -0400, Weldon Goree wrote:
> at some point). Much better developers than me seem to have formed
> this opinion too (cf browsers' behavior while it waits for you to tell
> it what to do with an unknown content-type: it's a disk-based pipe to
> whatever program you pick to open it, except now it's a memory-based
> pipe, and I think /tmp on tmpfs is breaking those developers'
> expectations).

As for Iceweasel, there is a bug in Mozilla's database that addresses
exactly this problem. In the overwhelming number of cases of people
downloading large files via their web browser, these files are going to
end up somewhere in their homes, anyway, so the initial downloaded
fragments should be stored there. Although I haven't paid attention to
that bug as of late, I do remember seeing some activity going on there,
and I think the Mozilla developers have been finally convinced to adopt
a different strategy.

> I'd be more comfortable with tmpfs if it could be quota'd with
> standard quota tools.

If this part goes to your home, it's automatically quota'ed.

> > Having /var/run on a tmpfs may be a good idea, though.
> Gah! I want *somewhere* I can park stuff on disk. Why are people so
> against that?

Nobody is against that, only that you insist on using /tmp for it, which
is imho not a good assumption to make.

> we going to do? Right now on my Squeeze laptop I have /lib/init/rw,
> /dev/shm, and /tmp. Do we really need more things that look like
> on-disk directories but aren't? (Then again I'm still grumpy about
> sysfs.) Though actually /var/run makes more sense than /tmp, since
> it's pretty much just for pids and sockets.

Without doing much (that I can remember) to my box, I see this on
Testing:

$ mount|grep tmpfs
udev on /dev type devtmpfs (rw,relatime,size=4018332k,nr_inodes=205757,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=804880k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=307200k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,relatime,size=1609760k)
$ 

Enjoy!

> dropping arbitrarily large files into it (I'm looking at you,
> Iceweasel...) and as long as there's *some* section of actual disk
> somewhere that's 1777. 

As I said, there was /usr/tmp, but I think it was shot down. But I
suggest /srv/tmp or something like that.



Kind regards,
--Toni++


Reply to: