Re: Swap

From: J.A. Magallon (jamagallon@able.es)
Date: Sun Nov 18 2001 - 17:54:12 EST


On 20011118 Charles Marslett wrote:
>"J.A. Magallon" wrote:
>> On 20011118 James A Sutherland wrote:
>> >On Sunday 18 November 2001 9:12 pm, war wrote:
>> >> It is amazing that I could run all of that stuff, because:
>> >>
>> >> When I have swap on, and if I run all of those programs, 200-400MB of
>> >> swap is used.
>> >
>> >Yep. There's a reason for that: the kernel is *ALWAYS* able to swap pages out
>> >to disk - even without "swap space". Disabling swapspace simply forces the
>> >kernel to swap out more code, since it cannot swap out any data.
>>
>> Sure ??? Where ?? What disk space uses it to swap pages to ?
>
>The code is "swapped" to the original file it was loaded from. You just
>free up the pages for someone else to use until you get a page fault in that
>task, then reload it from the original executable. That may have something
>to do with the fact that he gets better performance without a swap file allocated,
>since code swaps never write, only read (half as much disk I/O). I could see

Yup, I missed mmapped pages. You can drop them and reread, yes.

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.15-pre6-beo #1 SMP Sun Nov 18 10:25:01 CET 2001 i686
-
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/



This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:18 EST