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

Re: TMPDIR - Do we also need a drive backed TPMDIR ? [and 1 more messages]



Philip Hands writes ("Re: TMPDIR - Do we also need a drive backed TPMDIR ?"):
> It's configurable.
> See TMPFS_SIZE in /etc/defaults/tmpfs

A sensible question to ask is whether the default is right.

I recently installed stretch on a new laptop with a large SSD and 16G
of RAM.  I set it up with 27G of swap (because I hate running out of
swap).  I have a bunch of per-user /run directories at 1.6G each.

I don't seem to be using tmpfs for /tmp by default.  My /tmp seems to
be on /.  I wonder if that's just because I'm not using systemd, or
whether it's because I did the partitioning by hand.

I'm tempted to change to RAMTMP=yes in /etc/default/tmpfs.  The
default size of that tmpfs (20%VM = 8.6G) would arguably be rather
small compared to the amount of underlying storage available.

> And it'll cheerfully use swap, so just make sure you have enough swap
> for your use case, and set the limit to suit your needs.

I wonder if the performance will be acceptable if one starts to use
tmpfs for large objects which require swapping.  On spinning rust the
default IO scheduler (cfq) is very poor for interactive workloads.


Vincent Lefevre writes ("Re: TMPDIR - Do we also need a drive backed TPMDIR ?"):
> On 2016-07-21 18:19:43 +0530, Ritesh Raj Sarraf wrote:
> > Swap will come into effect when the kernel needs more memory.
> 
> Anyway, even if it had worked, swap should not be a solution for the
> limited /tmp size. The reason is that enabling swap can make the whole
> system freeze for several dozens of minutes when a program misbehaves.
> A misbehaving program should crash, not freeze the whole system.

Uhhh.  You run your systems with no swap at all ?

That's your prerogative, of course.  But it's far from a default (or
recommended) configuration.  I think that if you configure your system
without swap, it is up to you do whatever else is necessary to make it
work.  That might involve making /tmp not be on a tmpfs (if it is the
default for some reason).

Ian.


Reply to: