Thread (65 messages) 65 messages, 13 authors, 2012-12-19

Re: kswapd craziness in 3.7

From: Zlatko Calusic <hidden>
Date: 2012-12-08 21:22:15
Also in: lkml

On 08.12.2012 13:06, Zlatko Calusic wrote:
On 06.12.2012 20:31, Linus Torvalds wrote:
quoted
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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help