lkml.org 
[lkml]   [2004]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: why swap at all?
John Bradford wrote:
> Hi,
>
> Quote from Michael Brennan <mbrennan@ezrs.com>:
>
>>Hi!
>>I've recently started to follow this list.
>>I read the swap discussion here, and I was wondering about what Nick
>>Pigging said about grepping the kernel tree.
>>
>>Nick Piggin wrote:
>> > For example, I have 57MB swapped right now. It allows me to instantly
>> > grep the kernel tree. If I turned swap off, each grep would probably
>> > take 30 seconds.
>>
>>Are the pages swapped to disk as a result of the grep run?
>

The pages are gradually swapped to disk as I use the system.
>
> I'm not really sure what the above was intended to demonstrate, but I assume
> that it was that having swap allowed the first grep to fill physical RAM with
> cache at the expense of swapping other processes, which were using physical
> RAM to disk.
>

Well, at the "expense" of paging out unused memory. I don't see
any swapin.

> However, if 57 Mb of swap allows this, 57 Mb of extra physical RAM should also
> also allow the grep to be cached, without having to swap out anything.
>

Well yes, but if I had another 57MB of physical memory then I would
still turn on swap so that other 57MB of unused memory isn't wasted.
-
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    [W:0.086 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site