On Wed, 16 Jan 2002, Mike Leone wrote:

> > Using swap is not a bad thing. It means that the system is intelligent
> > enough to move to disk any processes that don't need to be in memory.
> > Thrashing is of course another thing entirely.
>
>
> Using swap means you don't have enough real physical memory to do what
> you're trying to do, and so your system has to use disk space as if it were
> memory. And since disk space is ... what, 100x? 1000x? slower than real RAM,
> I'd say having to use swap any more than occasionally would be a bad thing,
> since it would vastly slow you down.
>

That's not exactly correct. I did mention that thrashing, the continuous
swapping in/out of memory/disk, is different. For normal usage it is
fine, and even desirable if physical memory can be reclaimed for other
usages.

For example, if you have five processes running. They each take up 25%
of RAM. If two of the processes are not active then the memory they are
using is essentially wasted. So they are swapped to disk and physical
RAM is freed for other purposes. Now, if all five processes are vying
for memory the system will thrash and there's really no easy way to deal
with it, short of killing processes or doing creative things with which
process gets to run.

Yes, disk space is an order of magnitude slower than RAM. It is also an
order of magnitude cheaper. Linux is intelligent enough to use the
resources to their best advantage.

Part of the fuss in the past few months on the Linux kernel lists deal
exactly with this subject. There are two competing virtual memory
schemes, and each has pros and cons.

> A little is OK.
>
>
>
>


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to