
{"id":18588,"date":"2010-12-02T22:28:48","date_gmt":"2010-12-02T16:58:48","guid":{"rendered":"http:\/\/www.froisa.com\/?p=4025"},"modified":"2010-12-02T22:28:48","modified_gmt":"2010-12-02T16:58:48","slug":"unevictable","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/12\/02\/unevictable\/","title":{"rendered":"What is an Unevictable LRU Infrastructure ?"},"content":{"rendered":"<p><u>RELATED TO Unevictable<\/u><\/p>\n<pre>\nThe Unevictable LRU infrastructure addresses the following classes of\nunevictable pages:\n\n+ page owned by ram disks or ramfs\n+ page mapped into SHM_LOCKed shared memory regions\n+ page mapped into VM_LOCKED [mlock()ed] vmas\n<\/pre>\n<pre>\nLeast  Recently Used  (LRU): discards  the least  recently  used items first. This  algorithm requires\nkeeping  track of what was  used when, which  is expensive if  one wants  to make  sure the  algorithm\nalways discards the least recently used item. General implementations of this technique require  to keep\n\"age bits\" for  cache-lines and  track the \"Least  Recently   Used\"  cache-line   based  on  age-bits.\nIn  such implementation, every time a cache-line  is used, the age of all other cache-lines changes.  LRU\nis actually  a family of  caching algorithms with members including:  2Q by Theodore Johnson and  Dennis\nShasha and LRU\/K by Pat O'Neil, Betty O'Neil and Gerhard Weikum.\n\n\nHugetlb pages are also  unevictable. Hugepages are already implemented in a way  that these pages don't\nreside on the LRU and  hence are not iterated over during  the vmscan.  So there is no  need to move\naround these pages  across different  LRU's. We just  account these  pages as unevictable for correct\nstatistics.\n\nThe Unevictable LRU  adds an additional LRU list  to track unevictable pages and to hide these pages from\nvmscan.  This mechanism is based on a patch  by Larry  Woodman of Red  Hat to address  several\nscalability problems with page reclaim in  Linux.  The problems have been observed at  customer sites  on\nlarge  memory x86_64  systems.  For  example, a non-numal x86_64 platform with 128GB  of main memory will\nhave over 32 million 4k  pages in a  single zone.  When  a large fraction  of these pages are not\nevictable for  any reason [see below], vmscan will spend a lot of time scanning the LRU lists looking for\nthe small fraction of pages that  are evictable.  This can  result in a  situation where all cpus are 4\nspending 100% of their time  in vmscan for hours  or days on end, with the system completely\nunresponsive.\n<\/pre>\n<p><u>TYPICAL COMMANDLINE RELATED EXPOSURE<\/u><br \/>\n[bash]<br \/>\n$sudo cat \/proc\/meminfo  | grep -A 5 -B 5 Unevictable<br \/>\nInactive:        1591548 kB<br \/>\nActive(anon):     595404 kB<br \/>\nInactive(anon):   502680 kB<br \/>\nActive(file):    1009628 kB<br \/>\nInactive(file):  1088868 kB<br \/>\nUnevictable:      130612 kB<br \/>\nMlocked:              80 kB<br \/>\nSwapTotal:       8075260 kB<br \/>\nSwapFree:        8074736 kB<br \/>\nDirty:               260 kB<br \/>\nWriteback:             0 kB<br \/>\n$<\/p>\n<p>[\/bash]<\/p>\n<p>LINKS<br \/>\n<a href=\"https:\/\/www.kernel.org\/doc\/Documentation\/vm\/unevictable-lru.txt\">https:\/\/www.kernel.org\/doc\/Documentation\/vm\/unevictable-lru.txt<\/a><br \/>\n<a href=\"https:\/\/serverfault.com\/questions\/886483\/how-to-determine-which-processes-have-unevictable-memory\">https:\/\/serverfault.com\/questions\/886483\/how-to-determine-which-processes-have-unevictable-memory<\/a><br \/>\n<a href=\"https:\/\/stackoverflow.com\/questions\/4343249\/unevictable-page\">https:\/\/stackoverflow.com\/questions\/4343249\/unevictable-page<\/a><br \/>\n<a href=\"https:\/\/stackoverflow.com\/questions\/1072643\/how-can-i-make-grep-print-the-lines-below-and-above-each-matching-line\">https:\/\/stackoverflow.com\/questions\/1072643\/how-can-i-make-grep-print-the-lines-below-and-above-each-matching-line<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>RELATED TO Unevictable The Unevictable LRU infrastructure addresses the following classes of unevictable pages: + page owned by ram disks or ramfs + page mapped into SHM_LOCKed shared memory regions + page mapped into VM_LOCKED [mlock()ed] vmas Least Recently Used (LRU): discards the least recently used items first. This algorithm requires keeping track of what &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/12\/02\/unevictable\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;What is an Unevictable LRU Infrastructure ?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[1094,1108],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18588"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=18588"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18588\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=18588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=18588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=18588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}