[RFC] [PATCH -mm 0/2] memcg: per cgroup dirty_ratio - Kernel

This is a discussion on [RFC] [PATCH -mm 0/2] memcg: per cgroup dirty_ratio - Kernel ; On Mon, 10 Nov 2008 21:58:28 +0100 Andrea Righi wrote: > The current granularity of 5% of dirtyable memory for dirty pages writeback is > too coarse for large memory machines and this will get worse as > memory-size/disk-speed ratio ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 23 of 23

Thread: [RFC] [PATCH -mm 0/2] memcg: per cgroup dirty_ratio

  1. Re: [PATCH -mm] mm: fine-grained dirty_ratio_pcm and dirty_background_ratio_pcm (v2)

    On Mon, 10 Nov 2008 21:58:28 +0100
    Andrea Righi wrote:

    > The current granularity of 5% of dirtyable memory for dirty pages writeback is
    > too coarse for large memory machines and this will get worse as
    > memory-size/disk-speed ratio continues to increase.
    >
    > These large writebacks can be unpleasant for desktop or latency-sensitive
    > environments, where the time to complete each writeback can be perceived as a
    > lack of responsiveness by the whole system.
    >
    > Following there's a similar solution as discussed in [1], but a little
    > bit simplified in order to provide the same functionality (in particular
    > to avoid backward compatibility problems) and reduce the amount of code
    > needed to implement an in-kernel parser to handle percentages with
    > decimals digits.
    >
    > The kernel provides the following parameters:
    > - dirty_ratio, dirty_background_ratio in percentage (1 ... 100)
    > - dirty_ratio_pcm, dirty_background_ratio_pcm in units of percent mille (1 ... 100,000)


    hm, so how long until dirty_ratio_pcm becomes too coarse...

    What happened to the idea of specifying these in units of kilobytes?
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH -mm] mm: fine-grained dirty_ratio_pcm and dirty_background_ratio_pcm (v2)

    On 2008-11-10 22:12, Andrew Morton wrote:
    > On Mon, 10 Nov 2008 21:58:28 +0100
    > Andrea Righi wrote:
    >
    >> The current granularity of 5% of dirtyable memory for dirty pages writeback is
    >> too coarse for large memory machines and this will get worse as
    >> memory-size/disk-speed ratio continues to increase.
    >>
    >> These large writebacks can be unpleasant for desktop or latency-sensitive
    >> environments, where the time to complete each writeback can be perceived as a
    >> lack of responsiveness by the whole system.
    >>
    >> Following there's a similar solution as discussed in [1], but a little
    >> bit simplified in order to provide the same functionality (in particular
    >> to avoid backward compatibility problems) and reduce the amount of code
    >> needed to implement an in-kernel parser to handle percentages with
    >> decimals digits.
    >>
    >> The kernel provides the following parameters:
    >> - dirty_ratio, dirty_background_ratio in percentage (1 ... 100)
    >> - dirty_ratio_pcm, dirty_background_ratio_pcm in units of percent mille (1 ... 100,000)

    >
    > hm, so how long until dirty_ratio_pcm becomes too coarse...
    >
    > What happened to the idea of specifying these in units of kilobytes?


    The conclusion was that with units in KB requires much more complexity
    to keep in sync the old dirty_ratio (and dirty_background_ratio)
    interface with the new one.

    The KB limit is a static value, the other depends on the dirtyable
    memory. If we want to preserve the same behaviour we should do the
    following:

    - when dirty_ratio changes to x:
    dirty_amount_in_bytes = x * dirtyable_memory / 100.

    - when dirty_amount_in_bytes changes to x:
    dirty_ratio = x / dirtyable_memory * 100

    But anytime the dirtyable memory changes (as well as the total memory in
    the system) we should update both values accordingly to preserve the
    coherency between them.

    I wonder if setting also PERCENT_PCM (that is 1% expressed in
    fine-grained units) as a parameter could be a better long-term solution.
    And also use another name for it, because in this case this would be not
    a milli-percent value anymore.

    -Andrea
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [PATCH -mm] mm: fine-grained dirty_ratio_pcm and dirty_background_ratio_pcm (v2)

    On Mon, 10 Nov 2008 23:03:13 +0100
    Andrea Righi wrote:

    > On 2008-11-10 22:12, Andrew Morton wrote:
    > > On Mon, 10 Nov 2008 21:58:28 +0100
    > > Andrea Righi wrote:
    > >
    > >> The current granularity of 5% of dirtyable memory for dirty pages writeback is
    > >> too coarse for large memory machines and this will get worse as
    > >> memory-size/disk-speed ratio continues to increase.
    > >>
    > >> These large writebacks can be unpleasant for desktop or latency-sensitive
    > >> environments, where the time to complete each writeback can be perceived as a
    > >> lack of responsiveness by the whole system.
    > >>
    > >> Following there's a similar solution as discussed in [1], but a little
    > >> bit simplified in order to provide the same functionality (in particular
    > >> to avoid backward compatibility problems) and reduce the amount of code
    > >> needed to implement an in-kernel parser to handle percentages with
    > >> decimals digits.
    > >>
    > >> The kernel provides the following parameters:
    > >> - dirty_ratio, dirty_background_ratio in percentage (1 ... 100)
    > >> - dirty_ratio_pcm, dirty_background_ratio_pcm in units of percent mille (1 ... 100,000)

    > >
    > > hm, so how long until dirty_ratio_pcm becomes too coarse...
    > >
    > > What happened to the idea of specifying these in units of kilobytes?

    >
    > The conclusion was that with units in KB requires much more complexity
    > to keep in sync the old dirty_ratio (and dirty_background_ratio)
    > interface with the new one.
    >
    > The KB limit is a static value, the other depends on the dirtyable
    > memory. If we want to preserve the same behaviour we should do the
    > following:
    >
    > - when dirty_ratio changes to x:
    > dirty_amount_in_bytes = x * dirtyable_memory / 100.
    >
    > - when dirty_amount_in_bytes changes to x:
    > dirty_ratio = x / dirtyable_memory * 100
    >
    > But anytime the dirtyable memory changes (as well as the total memory in
    > the system) we should update both values accordingly to preserve the
    > coherency between them.


    OK.

    > I wonder if setting also PERCENT_PCM (that is 1% expressed in
    > fine-grained units) as a parameter could be a better long-term solution.
    > And also use another name for it, because in this case this would be not
    > a milli-percent value anymore.


    How about we forget the percentage thing and create
    /proc/sys/vm/dirty_ratio_millionths? That will give us a few more years
    of moores_law(memory size)/mores_law(disk speed) too..
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2