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

Re: Moving /tmp to tmpfs makes it useless

Le vendredi 25 mai 2012 à 16:01 +0300, Uoti Urpala a écrit : 
> There is one significant difference though. When you read data back to
> memory from swap, the kernel does not remember that it already exists on
> disk; when the data is evicted from memory again, it is unnecessarily
> rewritten to disk rather than just dropped. Thus, if you do multiple
> read iterations through a large set of data (which does not fit in
> memory) on tmpfs, each iteration does disk read AND write rather than
> just read.

I don’t know enough of the kernel innards, but it sounds to me that if a
previously swapped page hasn’t been modified, it should be kept on swap
*and* memory as long as possible. 

If it does not, it sounds like a bug, but it would indeed lead to the
behavior you describe for this specific usage pattern.

 .''`.      Josselin Mouette
: :' :
`. `'

Reply to: