lkml.org 
[lkml]   [2001]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Swap vs No Swap.
> How can having swap speed ANYTHING up?

simple: under memory load, it's more efficient to scavenge
idle pages so they can be used for some "hotter" purpose.
there usually are *some* pages in any process which are
only used at startup, or very rarely used. if there's no
memory pressure, sure, leave them there. if there is some
other use for the memory, even caching files, then it's more
efficient to swap those pages (assuming they're dirty).

swap is a sound way of making more efficient use of limited ram.

> RAM = 1000MB/s.
> DISK = 10MB/s

well, modern disks are 40 MB/s, and a typical non-rambus PC
has only around 600 MB/s dram bandwidth, depending on how you
measure it, etc.

> Ram is generally 1000x faster than a hard disk.

no, more like 20x; it can be up to around 80x (1.6 GB/s pc800
and a fairly pathetic 20 MB/s disk). the *latency* ratio can
be much higher (10 ms vs 200 ns).

> No swap = fastest possible solution.

false in general. the only case where this is true is where
you either have just the right amount of ram (unlikely, unless
you can tune your apps rather carefully), or you have too much (your case).

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

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.125 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site