Re: [2.4] heavy-load under swap space shortage

From: Rik van Riel
Date: Mon Mar 15 2004 - 17:47:56 EST


On Mon, 15 Mar 2004, Andrea Arcangeli wrote:

> As I told Andrew, you've also to make sure not to start always from the
> highmemzone, and from the code this seems not the case, so my 2G
> scenario still applies.

Agreed, the scenario applies. However, I don't see how a
global LRU would fix it in eg. the case of an AMD64 NUMA
system...

And once we fix it right for those NUMA systems, we can
use the same code to take care of balancing between zones
on normal PCs, giving us the scalability benefits of the
per-zone lists and locks.

> for (i = 0; zones[i] != NULL; i++) {
> int to_reclaim = max(nr_pages, SWAP_CLUSTER_MAX);

> Either that or you can choose to do some overwork and to shrink from all
> the zones removing this break:
>
> if (ret >= nr_pages)
> break;

That's probably the nicest solution. Though you will want
to cap it at a certain high water mark (2 * pages_high?) so
you don't end up freeing all of highmem on a burst of lowmem
pressure.

> but as far as I can tell, the 50% waste of cache in a 2G box can happen
> in 2.6.4 and it won't happen in 2.4.x.

How about AMD64 NUMA systems ?
What evens out the LRU pressure there in 2.4 ?

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

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