Re: How to throttle all the IO going to disk with cgroup V2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 24, 2018 at 01:52:02PM -0400, Vivek Goyal wrote:
> Hi Tejun,
> 
> Andy was looking at blkio throttling capability to throttle all the IO
> going to a disk. He wanted to use it to throttle all IO going to a data
> device of thin pool when thin pool is about to be full. Hoping this will
> give him extra time to respond and thin pool does not get full.
> 
> This requries hierarchical control enabled in blkio. In the past we had
> that sane_behavior flag to enable this on cgroup V1 and that allowed
> one to put upper limit in root cgroup and that controlled all IO going to
> disk.
> 
> Now sane_behavior flag is gone and V2 does not allow configure limits
> for root cgroup. So looks like we lost that capability now. Am I missing
> something. Is there a way to still enable it.

I guess we changed the behavior with this commit.

commit aa6ec29bee8692ce232132f1a1ea2a1f9196610e
Author: Tejun Heo <tj@xxxxxxxxxx>
Date:   Wed Jul 9 10:08:08 2014 -0400

    cgroup: remove sane_behavior support on non-default hierarchies

    sane_behavior has been used as a development vehicle for the default
    unified hierarchy.  Now that the default hierarchy is in place, the
    flag became redundant and confusing as its usage is allowed on all
    hierarchies.  There are gonna be either the default hierarchy or
    legacy ones.  Let's make that clear by removing sane_behavior support
    on non-default hierarchies.

    This patch replaces cgroup_sane_behavior() with cgroup_on_dfl().  The
    comment on top of CGRP_ROOT_SANE_BEHAVIOR is moved to on top of
    cgroup_on_dfl() with sane_behavior specific part dropped.

    On the default and legacy hierarchies w/o sane_behavior, this
    shouldn't cause any behavior differences.

I acked this patch as well. Did not realize that it will disallow
throttling root cgroup.

So we effectively dropped that third mode where sane_behavior could be
used on legacy hierarchy and get hierarchical throttling(Including
throttling root cgroup).

Is there any chance that throttling whole device could be supported. Or this
is a use case we don't want to support going forward.

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux