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

Re: [Feedback needed] Setting the right size for /tmp



Hi,

I join too late but ...  (I do not use tmpfs for /tmp)

On Tue, Nov 29, 2011 at 04:13:05PM +0000, Camaleón wrote:
> On Mon, 28 Nov 2011 18:07:43 +0000, Camaleón wrote:
> 
> > I'm running an updated wheezy and today faced with this little
> > problematic.
> 
> (...)
> 
> > Okay, so /tmp is full. Fine. I know how to solve it but I can foresee
> > more situations like this in the future so some questions arise. As the
> > current tmpfs default settings for /tmp seem a bit "unrealistic" (just %
> > 20 of the RAM?) for even doing common tasks:

This is just the default value for RAMTMP=yes in the /etc/default/rcS file.
You could have much bigger than RAM size as long as you have big enough
swap to support it.  You can do so via /etc/fstab. I once had 10GB tmpfs
with 4GB RAM so I could have DVD image on /tmp on tmpfs.  So 20% of RAM
is not good enough reason to reject tmpfs :-)

> > 1/ How many room should be set for a "/tmp" partition? I never had it
> > one so I can't make any good estimation.

This depends on what you run.  DVD data may be as big as 5GB.

> > 2/ Would be better to simply disable tmpfs for "/tmp"? This is how I've
> > been doing all these years.
> > 
> > Any comments are welcome :-)
> 
> Jerome, Bob, Dom... thank you all for your input :-)
> 
> After carefully reading your suggestions I have decided to disable tpmfs 
> for /tmp and use the old method of having /tmp inside a partition.

Good.  As long as you have lots of RAM, most data written to disk stays
on RAM anyway as cached data if it is very short lived data.  So this
does not slow system.

But that may cause concern for disk wareout if you are using SSD.

> @Jerome, why not a dedicated partition to hold /tmp? Because I would have 
> to decide a fixed partition size and to be sincere, I don't think there 
> is any gain for this specific case, this is a small netbook I use mainly 
> for testing purposes so I don't need to be excesive careful with security 
> or privacy options nor "need for speed" :-). I prefer to keep things as 
> easy as possible.
> 
> @Bob, thanks for pointing out that development mailing list thread. Very 
> interesting. By reading it, I see this is also issue for other users and 
> I have to agree that the defaults are a bit (to say at least) 
> conservative. I'm usually fine with Debian defaults and try to keep them 
> as long as  there is no compelling reason for editing them, e.g., when 
> they choke with common tasks, like making MC to crash for the simple fact 
> of exploring a 75 MiB compressed file :-) 
> 
> @Dom, I agree, having "/tmp" on the same "/" directory is also the most 
> suitable deal for me.
> 
> So, in the end I have set "RAMTMP=no" option at "/etc/default/rcS".

But if you are on laptop with SSD and lots of memory, you may optimize
diskware by slowing down on disk cache flushing from memory.

 http://www.debian.org/doc/manuals/debian-reference/ch09.en.html#_optimization_of_solid_state_drive

Anyway, even for mormal usage, use of noatime in mount option seems to
be one of the easiest system optimizer.

I stop using huge tmpfs for tmp since it gains nothing for me.

Regards,

Osamu


Reply to: