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

Re: putting "/tmp" to memory help



Hello,

Klistvud a écrit :
> 
> Isn't messing with volatile /tmp somewhat a moot point, given that the  
> Linux memory manager manages virtual memory anyway? I mean, if /tmp is  
> heavily used by your system, it will be cached in memory anyway. With 4  
> GB of RAM (as mentioned by kellyremo), you'll end with probably your  
> entire payload (and not just your /tmp) running from RAM. So what's to  
> be gained with a /tmp in RAM, really?

Save some useless write operations to the disk ? That could be useful is
the disk is busy.

> In addition, there is a  
> possibility that dedicating 2 GB of RAM to /tmp, you could end up  
> forcing your system to start swapping out. Which would instantly defeat  
> any speed improvement(s) you might have gained. Linux memory management  
> is quite competent all-round IMHO,

Tmpfs can be swapped out too, and if, according to you, Linux memory
management is quite competent, why not let it decide what is most worth
writing to disk or keeping in RAM ?

> and it would take an extremely  
> specific/border/particular user case to warrant moving /tmp to a RAM  
> disk.

Tmpfs is not a RAM disk (RAM-based block device), it is a filesystem in
virtual memory.


Reply to: