lkml.org 
[lkml]   [2009]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC] respect the referenced bit of KVM guest pages?
    Wu Fengguang wrote:
    > On Fri, Aug 07, 2009 at 11:17:22AM +0800, KOSAKI Motohiro wrote:
    >>> Andrea Arcangeli wrote:
    >>>
    >>>> Likely we need a cut-off point, if we detect it takes more than X
    >>>> seconds to scan the whole active list, we start ignoring young bits,
    >>> We could just make this depend on the calculated inactive_ratio,
    >>> which depends on the size of the list.
    >>>
    >>> For small systems, it may make sense to make every accessed bit
    >>> count, because the working set will often approach the size of
    >>> memory.
    >>>
    >>> On very large systems, the working set may also approach the
    >>> size of memory, but the inactive list only contains a small
    >>> percentage of the pages, so there is enough space for everything.
    >>>
    >>> Say, if the inactive_ratio is 3 or less, make the accessed bit
    >>> on the active lists count.
    >> Sound reasonable.
    >
    > Yes, such kind of global measurements would be much better.
    >
    >> How do we confirm the idea correctness?
    >
    > In general the active list tends to grow large on under-scanned LRU.
    > I guess Rik is pretty familiar with typical inactive_ratio values of
    > the large memory systems and may even have some real numbers :)
    >
    >> Wu, your X focus switching benchmark is sufficient test?
    >
    > It is a major test case for memory tight desktop. Jeff presents
    > another interesting one for KVM, hehe.
    >
    > Anyway I collected the active/inactive list sizes, and the numbers
    > show that the inactive_ratio is roughly 1 when the LRU is scanned
    > actively and may go very high when it is under-scanned.

    inactive_ratio is based on the zone (or cgroup) size.

    For zones it is a fixed value, which is available in
    /proc/zoneinfo

    --
    All rights reversed.


    \
     
     \ /
      Last update: 2009-08-12 16:35    [W:2.531 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site