Hi,<br><br><div class="gmail_quote">On Tue, Jul 21, 2009 at 3:40 PM, Clemens Eisserer <span dir="ltr">&lt;<a href="mailto:linuxhippy@gmail.com">linuxhippy@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
&gt; Now, OrigDataSize staying constant suggests than all further writes seem to<br>
&gt; be going<br>
&gt; to backing swap device. This happens when either ComprDataSize reaches<br>
&gt; MemLimit<br>
&gt; or when incompressible pages are found.<br>
<br>
</div><br>This time I set memlimit to 350mb without backing swap and the same<br>
load as before, and experienced the same - very high disk activity<br>
(like swapping) when memory was starting to get tight.<br>
Could it be this time, because compcache reports only 350mb swap space<br>
to be on the safe side and now the kernel notices its low on swap and<br>
does something strange?<br>
</blockquote><div><br>In this case, ramzswap is almost full (OrigDataSize nearly equal to DiskSize).<br>So, the system is low on memory and is nearly out of swap. Under this condition,<br>kernel discards filesystem caches out of memory -- even if these are being actively<br>
used since it has no other alternative now. This causes your active working set<br>to ping-pong between disk and memory which may cause unusually high<br>disk activity (&quot;disk thrashing&quot;).<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
My personal wish would be, all pages would stay in memory, until<br>
there&#39;s no space left, and the least recently used pages are stored in<br>
the backing swap.<br>
Because compressible or not, a disk read is a disk read, which I would<br>
like to avoid using it as a memory compressor. However I am not a<br>
memory management expert ;)<br>
<br>
</blockquote><div><br>Sending out LRU (or some similar scheme) pages to disk under extreme memory<br>pressure would be a big plus and is expected to solve above problem if done<br>properly. But this is somewhat difficult to do and will take some time.<br>
<br><br>Nitin<br><br></div></div>