linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][-mm][0/2] page reclaim throttle take4
@ 2008-03-30  8:12 KOSAKI Motohiro
  2008-03-30  8:12 ` Balbir Singh
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: KOSAKI Motohiro @ 2008-03-30  8:12 UTC (permalink / raw)
  To: Andrew Morton, linux-mm, Balbir Singh, Rik van Riel,
	David Rientjes, Nick Piggin, KAMEZAWA Hiroyuki, Peter Zijlstra
  Cc: kosaki.motohiro

[-- Attachment #1: Type: text/plain, Size: 2820 bytes --]


changelog
========================================
  v3 -> v4:
     o fixed recursive shrink_zone problem.
     o add last_checked variable in shrink_zone for 
       prevent corner case regression.

  v2 -> v3:
     o use wake_up() instead wake_up_all()
     o max reclaimers can be changed Kconfig option and sysctl.
     o some cleanups

  v1 -> v2:
     o make per zone throttle 


background
=====================================
current VM implementation doesn't has limit of # of parallel reclaim.
when heavy workload, it bring to 2 bad things
  - heavy lock contention
  - unnecessary swap out

The end of last year, KAMEZA Hiroyuki proposed the patch of page 
reclaim throttle and explain it improve reclaim time.
	http://marc.info/?l=linux-mm&m=119667465917215&w=2

but unfortunately it works only memcgroup reclaim.
Today, I implement it again for support global reclaim and mesure it.


benefit
=====================================
<<1. fix the bug of incorrect OOM killer>>

if do following commanc, sometimes OOM killer happened.
(OOM happend about 10%)

 $ ./hackbench 125 process 1000

because following bad scenario happend.

   1. memory shortage happend.
   2. many task call shrink_zone at the same time.
   3. all page are isolated from LRU at the same time.
   4. the last task can't isolate any page from LRU.
   5. it cause reclaim failure.
   6. it cause OOM killer.

my patch is directly solution for that problem.


<<2. performance improvement>>
I mesure various parameter of hackbench.

result number mean seconds (i.e. smaller is better)


    num_group    2.6.25-rc5-mm1      previous        current
                                     proposal        proposal
   ------------------------------------------------------------
      80              26.22            25.34          25.61 
      85              27.31            27.03          27.28 
      90              29.23            28.64          28.81 
      95              30.73            32.70          30.17 
     100              32.02            32.77          32.38 
     105              33.97            39.70          31.99 
     110              35.37            50.03          33.04 
     115              36.96            48.64          36.02 
     120              74.05            45.68          37.33 
     125              41.07(*)         64.13          38.88 
     130              86.92            56.30          51.64 
     135             234.62            74.31          57.09 
     140             291.95           117.74          83.76 
     145             425.35           131.99          92.01 
     150             766.92           160.63         128.27

(*) sometimes OOM happend, please don't think this is nice result.

my patch get performance improvement at any parameter.
(attached graph image)

[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 3358 bytes --]

[-- Attachment #3: image002.png --]
[-- Type: image/png, Size: 3088 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-04-14  8:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-30  8:12 [PATCH][-mm][0/2] page reclaim throttle take4 KOSAKI Motohiro
2008-03-30  8:12 ` Balbir Singh
2008-03-30  8:23   ` KOSAKI Motohiro
2008-03-30  9:32     ` KOSAKI Motohiro
2008-03-31  2:57       ` KOSAKI Motohiro
2008-03-30  8:15 ` [PATCH][-mm][1/2] core of page reclaim throttle KOSAKI Motohiro
2008-03-30 11:00   ` KOSAKI Motohiro
2008-04-12 19:30   ` Peter Zijlstra
2008-04-14  8:20     ` KOSAKI Motohiro
2008-03-30  8:19 ` [PATCH][-mm][2/2] introduce sysctl i/f of max task of throttle KOSAKI Motohiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox