[RFC] [PATCH 0/2] memcg: per cgroup dirty limit

David Rientjes rientjes at google.com
Mon Feb 22 13:15:49 PST 2010


On Mon, 22 Feb 2010, Vivek Goyal wrote:

> dirty_ratio is easy to configure. One system wide default value works for
> all the newly created cgroups. For dirty_bytes, you shall have to
> configure each and individual cgroup with a specific value depneding on
> what is the upper limit of memory for that cgroup.
> 

Agreed, it makes sense for each memcg to have a dirty_ratio that defaults 
to whatever vm_dirty_ratio does, and export that constant via 
linux/writeback.h.  dirty_bytes would then use the same semantics as 
globally so that if it is set to 0, the finer-granuality is disabled by 
default and we use memcg->dirty_ratio instead.

> Secondly, memory cgroup kind of partitions global memory resource per
> cgroup. So if as long as we have global dirty ratio knobs, it makes sense
> to have per cgroup dirty ratio knob also. 
> 

It has a good default, too: whatever ratio of memory that was allowed to 
be dirty before the memcg limit was set is still allowed by default.


More information about the Containers mailing list