Re: kswapd at 96% CPU on my 16Mb system

From: Rik van Riel (riel@conectiva.com.br)
Date: Fri Jun 16 2000 - 14:49:51 EST


On Fri, 16 Jun 2000, Kees Bakker wrote:
> >>>>> "Rik" == Rik van Riel <riel@conectiva.com.br> writes:
>
> Rik> On Thu, 15 Jun 2000, Kees Bakker wrote:
> >> With test1-ac17 I still have very bad performance, because
> >> kswapd eats almost all of the CPU cycles. The bare test1 was a
> >> little better, but not much.
> >>
> >> With ALT-scroll-lock I was able to see that it spends most of
> >> its time in wake_up and friends.
>
> Rik> In wake_up .. interesting.
>
> Let me be more precise. Here is a excerpt from the logging:

[snip]

> Here is output of vmstat:
>
> procs memory swap io system cpu
> r b w swpd free buff cache si so bi bo in cs us sy id
> 0 0 1 0 4752 52 5772 0 0 8 3 122 12 2 94 5

> And output of cat /proc/meminfo:
> total: used: free: shared: buffers: cached:
> Mem: 14254080 9355264 4898816 0 49152 5906432
> Swap: 33026048 0 33026048
> MemTotal: 13920 kB
> MemFree: 4784 kB

Ahh, I see the problem. The function do_try_to_free_pages()
continues to free pages long after we have reached enough
free memory.

The problem is that if that happens, shrink_mmap() will loop
for a long long time but at the same time refuse to free
pages because zone->free_pages > zone->pages_high.

In effect, shrink_mmap() enters something quite close to an
infinite loop ...

regards,

Rik

--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies http://www.conectiva.com/ http://www.surriel.com/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:12 EST