Re: why swap at all?

From: Helge Hafting
Date: Wed May 26 2004 - 08:39:11 EST


Buddy Lumpkin wrote:

Couple that with the fact that there are many pte's pointing at the same
physical page (shared page) in many cases where many processes

are running
on the system. Because all of the references to that page must be removed
before the page can be evicted, there are some absolute limitations in the
rate that pages can be evicted from memory as the number of processes
running on the system and the total amount of memory increases.






This is still many orders of magnitude faster than filling the page
from disk, and you typically don't reclaim much of mapped memory anyway.



This discussion went broke-minded again. Your still picturing that single
IDE hard drive in your workstation and im talking about big iron, large
databases, etc.. where the total amount of aggregate disk I/O is completely
limited by the rate you can evict pages from the pagecache.


The eviction speed should not be a limitation, unless the machine is
ill-configured. Some pages aren't dirty, and can be dropped instantly.
That is way faster than any storage solution.

Other pages have to be written out (to swap, or to some file because
it is a pending write.) This is not a problem, because io out
is as fast as io in. If you have big iron with a superfast array - sure,
your io comes in at tremendous speed. But swap and other writes
go out at the same tremendous speed too. So no problem.

Now if you have a big-iron machine with filesystems on a fast array
and swap on a single slow disk then you're in trouble. But that
is a bad setup, not a kernel problem.

Helge Hafting
-
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/