Re: Is swap really needed when RAM's aplenty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick O'Callaghan <pocallaghan@xxxxxxxxx> wrote:
>Sent: Aug 19, 2010 7:33 AM
>To: users@xxxxxxxxxxxxxxxxxxxxxxx
>Subject: Re: Is swap really needed when RAM's aplenty
>
>On Thu, 2010-08-19 at 09:22 -0500, Michael Hennebry wrote:
>> On Thu, 19 Aug 2010, Gregory Hosler wrote:
>> 
>> > If the memory gets fragged and the kernel wants to defrag, e.g. for a memory
>> > request from an application, in order to defrag any "dirty" data portions (those
>> > pages that have been written to), the kernel *requires* there to be swap.
>> > Otherwise there is no place to write the dirty pages out, in order to read them
>> > in elsewhere.
>> 
>> I didn't realize that memory could get fragged.
>> I'd thought that one reason for virtual memory
>> was allowing pages to be renumbered at will,
>> the kernel's will, of course.
>
>I thought so too, but see: http://lwn.net/Articles/211505/

Interesting.  However, modern 'kernels' just about require some sort of swap, be it in physical memory (yes, Virginia this can and has been done) or on your favorite hard/soft drive (swap on a floppy...)

Leave out swap and sooner or later the system will lock up.  However, the old 2x memory rule does not need to be followed (I've got 4 GB of memory, do I really need a 10 GB swap, no.)  However, you should supply a sufficient swap, say 512 MB or so for a desktop, and up to 4GB for a server (maximum size of a 64 bit application) for this purpose, not just 'memory clean up'.  If you routinely run 1GB applications on your desktop, then up the swap space size to allow for this (some programs are very stubborn about wanting to load into one contiguous chunk of memory) and run your programs at will.  Better yet is dynamic swap systems that grow as needed and reset when space is no longer required (Macs use this, I was wondering why I was loosing disk space, a reboot solved that.)

James McKenzie

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux