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

Re: Idea: mount /tmp to tmpfs depending on free space and RAM

On 16/06/2012 03:43, Serge wrote:
> 2012/6/15 Jean-Christophe Dubacq wrote:
>>>> This is often seen as not a good move to have a user-writable directory
>>>> on the system partition(s), since this provides for easy DOS
>>> DoS like what? /tmp on disk have a 5% safety limit available for system,
>>> user can "DoS" only his own processes, and he can do that anyway. But
>>> /tmp on tmpfs is even worse move, since it does not have 5% safety.
>> 1) With 2TB disks, I certainly do not use 5% any more
> How is that? Isn't it a default value for 2TB disks any more? Or you mean
> that you manually reduced it to e.g. 1%?

Yes. That's the thing I do on most partitions (large ones).

>> 2) Mysql, apache, postfix, all kind of vital systems, do not run as
>> root. And if /tmp is full (and mounted on /), / is full (and so is
>> /var). All kind of mayhem may happen there (I have seen it).
> You talk about mysql/apache/postfix, so I assume you mean a server.
> And since it's about users filling /tmp I assume it's a multiuser server
> (or rather at-least-one-user server). Then putting /tmp on tmpfs is a bad
> idea there, because doing that will force users to use /var/tmp for large
> files and will (not "can", but "will", since /var/tmp is not cleaned)
> eventually fill /var partition, which is exactly what you need to prevent.

Strangely enough, most users do not seem to know about /var/tmp. So,
when they put large files, they tend to do that in (IMO better) other
 * $HOME/Desktop
 * $HOME
 * $HOME/Downloads
 * $HOME/theplaceIamworking

which is better in terms of system management (except that it is also on
NFS, and they suffer terrible pain because of that).

Jean-Christophe Dubacq

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: