[Bugme-new] [Bug 11437] New: Burst swap-in in case of lots of free RAM

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Wed Aug 27 14:17:54 PDT 2008


http://bugzilla.kernel.org/show_bug.cgi?id=11437

           Summary: Burst swap-in in case of lots of free RAM
           Product: Memory Management
           Version: 2.5
     KernelVersion: 2.6.26
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Page Allocator
        AssignedTo: akpm at osdl.org
        ReportedBy: development--bugzilla.kernel.org at medium.net


Consider a system with following setup:
* 3 GiB RAM
* 3 GiB swap

The 3 GiB RAM are nearly used by lots of running processes,
The 3 GiB swap are nearly free.

Now a memory hog process is started. The virtual memory of all the processes is
going to be swapped out. The memory hog process finishes (for example because
the memory hog process is too hungry and gets an "out of memory" error).

Then, the state is the following:
* 3 GiB RAM is nearly free
* 3 GiB swap is nearly full

The normal Linux swap-in strategy is to swap in page by page (which usually
means 4KB-page by 4KB-page). This takes a very long time for 3 GiB to be
transferred into RAM. Thus, in reality, the system is not unusably during the
execution of the memory hog process, but also about 2..3 minutes afterwards.
And even then, switching to an application which was not swapped-in yet
(re-)creates other delays. Thus, the accumulated swap-in time may well be in
order of 4 minutes.

This can be optimized: Just read all the swap pages linearly in the same order
as they are laid out on disk. Then, the system may become completely usable in
about 30 seconds.


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the Bugme-new mailing list