linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hong zhi guo <honkiko@gmail.com>
To: Vivek Goyal <vgoyal@redhat.com>, Tejun Heo <tj@kernel.org>
Cc: cgroups@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org,
	Hong Zhiguo <zhiguohong@tencent.com>
Subject: Re: [PATCH v4 2/2] blk-throttle: trim tokens generated for an idle tree
Date: Mon, 28 Oct 2013 13:08:18 +0800	[thread overview]
Message-ID: <CAA7+ByUH7BeEOcuZF-cs8BMZMBOG+S9MF7ZryTRymy7ZPUxOKA@mail.gmail.com> (raw)
In-Reply-To: <20131022210232.GB2884@redhat.com>

Hi, Vivek,

I tested the PATCH v4 for some basic hierarchical setup as I did
before. And I get the similar result.

Preparation
============
1) mount subsys blkio with "__DEVEL__sane_behavior"
2) Create 3 levels of directories under the blkio mount point:
    mkdir 1
    mkdir 1/2
    mkdir 1/2/3
    mkdir 4
3) start 4 bash sessions, write their PIDs into:
    1/cgroup.procs
    1/2/cgroup.procs
    1/2/3/cgroup.procs
    4/cgroup.procs
4) prepare 4 10MB files on sdb(ext4 fs)

Note: in below hierarchy graph:
    "[50k]" means configured value for read_bps_device is 50kB/s
    "(50k)" means bandwidth reported by dd is 50kB/s

Test A: 1 process throttled by ancestor group
=============================================
Hierarchy set-up:
    (echo "8:16 204800" > 1/blkio.throttle.read_bps_device)
    |-- 1 [200k]
    |    `-- 2 [-]
    |         `-- 3 [-]
    `-- 4 [-]

dd within group 3:
    (drop cache then: dd if=10M-file-3 of=/dev/null)
Result:
    206kB/s (I did same test without the token-bucket patch, The
result is 205kB/s)

dd within group 2:
    (drop cache then: dd if=10M-file-2 of=/dev/null)
Result:
    206kB/s


Test B: 4 processes in 3 levels of hierarchy
=============================================
Hierarchy set-up:
    echo "8:16 204800" > 1/blkio.throttle.read_bps_device
    echo "8:16 102400" > 1/2/blkio.throttle.read_bps_device
    echo "8:16 51200"  > 1/2/3/blkio.throttle.read_bps_device
    echo "8:16 51200"  > 4/blkio.throttle.read_bps_device
    |-- 1 [200k]
    |    `-- 2 [100k]
    |         `-- 3 [50k]
    `-- 4 [50k]

start 4 dd processes from 4 bash sessions
    (dd if=10M-file-x of=/dev/null)
Result:
    |-- 1 (104k)
    |    `-- 2 (52.1k)
    |         `-- 3 (51.3k)
    `-- 4 (51.4k)


On Wed, Oct 23, 2013 at 5:02 AM, Vivek Goyal <vgoyal@redhat.com> wrote:
> Hi Hong,
>
> This approach looks good in general. Only downside I can think of
> updation of nr_requests throughout the hierarchy. So deeper the
> hierarchy, higher the overhead.
>
> I am not sure if that's a concern or not. I will have a closer look
> a the patches tomorrow and do some testing too.
>
> Thanks
> Vivek


-- 
best regards
Hong Zhiguo

      parent reply	other threads:[~2013-10-28  5:08 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1381574794-7639-1-git-send-email-zhiguohong@tencent.com>
2013-10-14  9:09 ` [PATCH v2] blk-throttle: simplify logic by token bucket algorithm Hong Zhiguo
2013-10-14 13:36   ` Tejun Heo
2013-10-14 13:47     ` Hong zhi guo
2013-10-14 13:53     ` Hong zhi guo
2013-10-14 13:59       ` Tejun Heo
2013-10-15 12:35         ` Hong zhi guo
2013-10-15 16:19           ` Jens Axboe
2013-10-15 13:03     ` Vivek Goyal
2013-10-15 17:32   ` Vivek Goyal
2013-10-16  6:09     ` Hong zhi guo
2013-10-16 14:14       ` Vivek Goyal
2013-10-16 15:47         ` Hong zhi guo
2013-10-16 15:53         ` Tejun Heo
2013-10-16 16:22           ` Vivek Goyal
2013-10-17 12:17 ` [PATCH v3] " Hong Zhiguo
2013-10-18 15:55   ` Vivek Goyal
2013-10-20 12:08     ` Hong zhi guo
2013-10-20 12:11     ` [PATCH v4 0/2] " Hong Zhiguo
2013-10-20 12:11       ` [PATCH v4 1/2] " Hong Zhiguo
2014-04-10 10:07         ` Hong zhi guo
2014-04-10 13:32           ` Vivek Goyal
2013-10-20 12:11       ` [PATCH v4 2/2] blk-throttle: trim tokens generated for an idle tree Hong Zhiguo
2013-10-22 21:02         ` Vivek Goyal
2013-10-23  3:30           ` Hong zhi guo
2013-10-28  5:08           ` Hong zhi guo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA7+ByUH7BeEOcuZF-cs8BMZMBOG+S9MF7ZryTRymy7ZPUxOKA@mail.gmail.com \
    --to=honkiko@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=vgoyal@redhat.com \
    --cc=zhiguohong@tencent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).