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

Re: TMPDIR - Do we also need a drive backed TPMDIR ?



On Mon, 2016-07-25 at 14:27 +0530, Ritesh Raj Sarraf wrote:
> Hello All,
> 
> On Thu, 2016-07-21 at 20:41 +0530, Ritesh Raj Sarraf wrote:
> > On Thu, 2016-07-21 at 13:38 +0100, Ian Jackson wrote:
> > > 
> > > You are using `survives reboots' as a proxy for `on disk'; and using
> > > `on disk' as a proxy for `has enough space for large amounts of data'.
> > 
> > Yes. :-)
> > 
> > > 
> > > I don't think this is a good approach.
> > > 
> > > It's true that /tmp has traditionally been smaller than /var/tmp,
> > > partly as an accident of partition and filesystem layout.
> > > 
> > > As a practical matter, there are big performance gains to be had from
> > > not requiring across-reboot (and, particularly, across-crash)
> > > persistence.
> > > 
> > > Perhaps the right answer is instead that we should simply configure
> > > more swap by default ?  (IIRC tmpfs data can be swapped.)
> > 
> > Yes. But that's not the default in our setups. Perhaps next step is to file a
> > wishlist bug report.
> > 
> > 
> 
> Lots of folks on the list mentioned about swap. I wasn't very clear on how
> that'd work. So I reached out to the tmpfs maintainer.

It is a shame that you didn't read more carefully what he said.

> From what  Hugh explained
> (email attached), the size allocated to tmpfs (or rather /tmp on tmpfs) does not
> change. It is a fixed size (kernel default to 50% of RAM).

That is a *limit* on the size allocated to it.

> The benefit of tmpfs over ramfs (previous implementation) is that
> tmpfs can be resized live.
[...]

He said ramdisk, not ramfs.  A ramdisk has a fixed size.  A ramfs has a
variable size, like tmpfs, but its files are never swapped.  It's
intended for processors without an MMU.

Ben.

-- 

Ben Hutchings
Knowledge is power.  France is bacon.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: