lkml.org 
[lkml]   [2004]   [May]   [26]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 26 May 2004 21:57:20 +1000
FromNick Piggin <>
SubjectRe: why swap at all?
Buddy Lumpkin wrote:
>>>That's true, but it's not a magical property of swap space
>>>- extra physical
>>>RAM would do more or less the same thing.
>>>
> 
> 
>>Well it is a magical property of swap space, because extra RAM
>>doesn't allow you to replace unused memory with often used memory.
> 
> 
>>The theory holds true no matter how much RAM you have. Swap can
>>improve performance. It can be trivially demonstrated.
> 
> 
> I bet you have demonstrated this. It strikes me of an observation that could
> be made in a lab environment. But your failing to realize that:
> 
> 1) you will fill physical memory with pages eventually or your not doing
> work.
> 
> 2) pages do not just silently move to the swap device. They move as a result
> of a memory shortfall
> 
> 3) once physical memory is full, file system I/O will only benefit from
> reads that incur a minor fault. All other file system operations are bound
> by the rate you can reclaim pages from physical memory.
> 

No, typically we can reclaim memory very quickly and the operations
are bound by the speed of the block device.

> 4) non-filesystem backed pages are still effected the same way, nothing has
> changed. When you run your next filesystem related operation, those pages
> will be faulted into physical memory, and something will be evicted to it's
> backing store (remember, memory is full).
> 

I haven't failed to realise 1, 2 or 4 and I don't know what you are
arguing about. All I said was basically "no matter how much ram you
have, swap can increase performance by allowing unused anonymous
memory to be paged out, thereby increasing your maximum effective RAM".
-
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 14:03    [from the cache]
©2003-2008