lkml.org 
[lkml]   [2012]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kswapd craziness in 3.7
On 08.12.2012 13:06, Zlatko Calusic wrote:
> On 06.12.2012 20:31, Linus Torvalds wrote:
>> Ok, people seem to be reporting success.
>>
>> I've applied Johannes' last patch with the new tested-by tags.
>>
>
> I've been testing this patch since it was applied, and it certainly
> fixes the kswapd craziness issue, good work Johannes!
>
> But, it's still not perfect yet, because I see that the system keeps
> lots of memory unused (free), where it previously used it all for the
> page cache (there's enough fs activity to warrant it).
>
> I'm now testing the last piece of Johannes' changes (still not in git
> tree), and can report results in 24-48 hours.
>
> Regards,

Or sooner... in short: nothing's changed!

On a 4GB RAM system, where applications use close to 2GB, kswapd likes
to keep around 1GB free (unused), leaving only 1GB for page/buffer
cache. If I force bigger page cache by reading a big file and thus use
the unused 1GB of RAM, kswapd will soon (in a matter of minutes) evict
those (or other) pages out and once again keep unused memory close to 1GB.

I guess it's not a showstopper, but it still counts as a very bad memory
management, wasting lots of RAM.

As an additional data point, if memory pressure is slightly higher (say
backup kicks in, keeping page cache mostly full) kswapd gets in D
(uninterruptible sleep) state (function: congestion_wait) and load
average goes up by 1. It recovers only when it successfully throws out
half of page cache again.

Hope it helps.
--
Zlatko


\
 
 \ /
  Last update: 2012-12-08 22:41    [W:0.218 / U:2.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site