Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu <at> jp.fujitsu.com>
Subject: [RFC][PATCH 0/5] memcg softlimit (Another one) v4
Newsgroups: gmane.linux.kernel
Date: Thursday 12th March 2009 00:52:47 UTC (over 7 years ago)
Hi, this is a patch for implemnt softlimit to memcg.

I did some clean up and bug fixes. 

Anyway I have to look into details of "LRU scan algorithm" after this.

How this works:

 (1) Set softlimit threshold to memcg.
     #echo 400M > /cgroups/my_group/memory.softlimit_in_bytes.

 (2) Define priority as victim.
     #echo 3 > /cgroups/my_group/memory.softlimit_priority.
     0 is the lowest, 8 is the highest.
     If "8", softlimit feature ignore this group.
     default value is "8".

 (3) Add some memory pressure and make kswapd() work.
     kswapd will reclaim memory from victims paying regard to priority.

Simple test on my 2cpu 86-64 box with 1.6Gbytes of memory (...vmware)

  While a process malloc 800MB of memory and touch it and sleep in a group,
  run kernel make -j 16 under a victim cgroup with softlimit=300M,
priority=3.

  Without softlimit => 400MB of malloc'ed memory are swapped out.
  With softlimit    =>  80MB of malloc'ed memory are swapped out. 

I think 80MB of swap is from direct memory reclaim path. And this
seems not to be terrible result.

I'll do more test on other hosts. Any comments are welcome.

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email:  email@kvack.org 
 
CD: 3ms