Thanks for the clear introduction to the LRU implementation.
I'm not a kernel hacker, but still curious enough to look under the hood of my machine sometimes (especially in those moments when I'm convinced that a reasonable software cannot be so slow to complete the task in question...)
To look into memory management there is /proc/kpageflags, displayed in human readable format by the page-types tool (recently moved from Documentation/vm to tools in the kernel tree).
If I guess correctly the size of the active list can be shown using
"page-types -b active"
I further guess the size of the inactive list can be shown using
"page-types -b lru,~active,~unevictable"
(the article simplified from the fact that there are really 3 list nowadays, unevictable being the 3rd one. It's well described under Documentation/vm/unevictable-lru.txt)
However, when running these commands on 2 machines in this moment I get:
- active 168 MB, inactive 259 MB on a 512 MB system
- active 1366 MB, inactive 971 MB on a 4 GB system
So either my guesses about the options to use are incorrect or there is no such limitation as inactive > active.
Posted May 3, 2012 20:56 UTC (Thu) by geuder (subscriber, #62854)
[Link]
Commenting myself:
> It's well described under Documentation/vm/unevictable-lru.txt)
Well, the advanced concept is well described in the kernel documentation. But it did never really make sense to me until I got the basics explained today in the article.
Better active/inactive list balancing
Posted May 4, 2012 8:40 UTC (Fri) by hnaz (subscriber, #67104)
[Link]