Re: Is swap really needed when RAM's aplenty

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

 



On 08/19/2010 03:22 PM, 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.
> 

Virtual memory allows us to present a simple, linear address space to
running processes even though the physical memory backing it may be
highly non-contiguous (or not even present).

Unfortunately someone still has to manage the pool of available physical
memory pages ("page frames") and it is possible for this space to become
fragmented over time as repeated allocation/deallocation cycles create
"holes" in the available memory.

The kernel implements the buddy algorithm in the page allocator to try
to minimize external fragmentation but some workloads can still lead to
a lot of pages on the low-order free lists and no larger blocks to
satisfy bigger requests.

Forcing everything out to swap and then pulling it back in is one crude
way of forcing a level of de-fragmentation. There was some discussion on
linux-mm.org of implementing novel de-fragmentation and fragmentation
avoidance techniques a while back but I'm not sure where those
initiatives are at the moment.

Regards,
Bryn.
-- 
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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux