[linux-mm-cc] Questions about MemLimit

Nitin Gupta ngupta at vflare.org
Tue Jul 21 07:32:05 EDT 2009


Hi,

On Tue, Jul 21, 2009 at 3:40 PM, Clemens Eisserer <linuxhippy at gmail.com>wrote:

> > Now, OrigDataSize staying constant suggests than all further writes seem
> to
> > be going
> > to backing swap device. This happens when either ComprDataSize reaches
> > MemLimit
> > or when incompressible pages are found.
>
>
> This time I set memlimit to 350mb without backing swap and the same
> load as before, and experienced the same - very high disk activity
> (like swapping) when memory was starting to get tight.
> Could it be this time, because compcache reports only 350mb swap space
> to be on the safe side and now the kernel notices its low on swap and
> does something strange?
>

In this case, ramzswap is almost full (OrigDataSize nearly equal to
DiskSize).
So, the system is low on memory and is nearly out of swap. Under this
condition,
kernel discards filesystem caches out of memory -- even if these are being
actively
used since it has no other alternative now. This causes your active working
set
to ping-pong between disk and memory which may cause unusually high
disk activity ("disk thrashing").



>
> My personal wish would be, all pages would stay in memory, until
> there's no space left, and the least recently used pages are stored in
> the backing swap.
> Because compressible or not, a disk read is a disk read, which I would
> like to avoid using it as a memory compressor. However I am not a
> memory management expert ;)
>
>
Sending out LRU (or some similar scheme) pages to disk under extreme memory
pressure would be a big plus and is expected to solve above problem if done
properly. But this is somewhat difficult to do and will take some time.


Nitin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/linux-mm-cc/attachments/20090721/60df6442/attachment.htm 


More information about the linux-mm-cc mailing list