[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]

> 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 ?

What's the problem if swap is *never* used under normal conditions?
On current machines, I typically use less than 10% the amount of
physical RAM.

On an older laptop, I had 4 GB RAM, and under normal conditions,
I was using only around 1 GB. Swap was used only in two cases:

1. Because Firefox was taking more than 4 GB after some time, but
in this case, the system was more or less frozen. So, the only thing
I could do was to kill Firefox from a terminal, which was taking me
several minutes... I ended up by using a wrapper script that did:

  ulimit -v 4096000
  exec /usr/bin/firefox "$@"

so that Firefox would crash instead of freezing the system. Now, it
seems that Firefox has improved and no longer take so much memory.

2. Due to bugs in my programs, or something similar. Ditto, I would
have preferred a crash than a frozen system.

Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply to: