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

Re: deleting content of /tmp



> >mount /tmp onto tmpfs and run tmpreaper. No problems, just watch your swap
> >space, limit its (/tmp) size and instead of separate partition for /tmp
> >use
> >bigger swap area.

On 24.03.07 19:33, Jorge Peixoto de Morais Neto wrote:
> What is the performance impact of mounting /tmp in tmpfs? Some thoughts:
> 1) Maybe it will make the system faster, because files in tmp will be faster
> to access.
> 2) Then again, maybe the disk cache is enough for this, so there will be no
> impact on performance.

there's no disk cache for tmpfs. The files stay in memory unless they are
swapped out. There's no need to write data to disk unless you are short on
memory, in which case they are swapped out. and I'd say swapping is more
efficient than caching. There's no need for journalling, syncing each 5 or
more seconds, and the structure is much more efficient since the files are
not aligned onto filesystem block size.

> 3) Or, the system will be slower, because too much memory will be used for
> tmpfs and when some application needs memory the kernel will have to move a
> part of tmpfs to swap before it can serve the application.

If you have many programs that fill up /tmp space for no reason, maybe. But
I'm not sure because of reasons above - those data would be written to disk.
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I feel like I'm diagonally parked in a parallel universe. 



Reply to: