Re: OOM kills if swappiness set to 0, swap storms otherwise

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

 



Charles,

Can you please try the attached patch against 2.6.16.1
which I use on my desktop since I encountered the same
issues when running GNOME/Firefox etc.  After booting
the patched kernel, leave swappiness unchanged but do
the following:

  echo 1 > /proc/sys/vm/mapped_bias

This should allow mapped memory to stay pretty close
to 80% as implied by the default swappiness value of
60 and prevent the swap storms.

Andrew et al, details on the patch are as follows.

1. Unmapped pages are kept the inactive list as much
as possible.

2. Only partially written pages are marked as
referenced so kswapd can initiate writeback on the
first scan for sequentially written files.

3. The scanner will set PG_reclaim for pages found in
writeback.

4. The scanner will scan the LRU twice.  On the first
pass, the distress logic is disabled while on the
second pass, it is applied as before.  This permits a
full scan of the inactive list before distress
swapping begins.

5. The slab scanner only takes into account the size
of the inactive list and scans the slab at 1/2 the
rate of the inactive list for DEFAULT_SEEKS.  This
prevents spurious pageouts during heavy slab usage
such as when running updatedb.

6. reclaim_mapped is made part of scan_control so it
can be used by shrink_list() in addition to
refill_inactive_zone() to prevent mapped memory
reclamation and staying within the bounds dictated by
swappiness.

Thanks,
Shantanu

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Attachment: 01-mapped-bias.patch
Description: 2495889862-01-mapped-bias.patch


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux