Re: Memory Paging and fork copy-on-write semantics

From: Rik van Riel (riel@conectiva.com.br)
Date: Thu Oct 25 2001 - 08:10:25 EST


On Thu, 25 Oct 2001, Steven Butler wrote:

> I have been making use of copy-on-write semantics of linux fork to
> duplicate a process around 100+ times to generate client load against a
> server. The copy-on-write allows me to run many more processes without
> swap thrashing than I'd otherwise be able to. The client code is in
> perl, so the process sizes are in the MBs. Using this technique I only
> need about 2 MB per user, with around 5.5 MB shared.

        [snip COW undone on swapout, leading to thrashing]

> Is this expected and reasonable behaviour?

Absolutely not, this is not supposed to happen.

> Is it possible for pages to remain shared, even when they are swapped
> to disk?

I think this already happens in the -ac kernels, probably
in -linus too (though I'm not 100% sure).

> Does that already happen anyway, meaning my analysis of the situation
> is off base?

Possible, but it's also possible you ran into a real bug,
it would be interesting to debug this further...

I wouldn't rule out a bug with the remove-from-swapcache
logic on swapin, either.

regards,

Rik

-- 
DMCA, SSSCA, W3C?  Who cares?  http://thefreeworld.net/

http://www.surriel.com/ http://distro.conectiva.com/

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



This archive was generated by hypermail 2b29 : Wed Oct 31 2001 - 21:00:26 EST