From: Hong Zhiguo <honkiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org,
Hong Zhiguo <zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
Subject: Test of [PATCH] blk-throttle: simplify logic by token bucket algorithm
Date: Tue, 15 Apr 2014 15:23:06 +0800 [thread overview]
Message-ID: <1397546586-6776-1-git-send-email-zhiguohong@tencent.com> (raw)
In-Reply-To: <1397546303-6709-1-git-send-email-zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
Hi, Vivek,
I tested the PATCH again for some basic hierarchical setup as I did
before.
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
"[-]" means unlimit configured
"(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:
205kB/s (I did same test without the token-bucket patch, The
result is also 205kB/s)
dd within group 2:
(drop cache then: dd if=10M-file-2 of=/dev/null)
Result:
205kB/s
Test B: 4 processes in 3 levels of hierarchy, group 1 unlimited
===============================================================
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 [-]
| `-- 2 [100k]
| `-- 3 [50k]
`-- 4 [50k]
start 4 dd processes from 4 bash sessions
(dd if=10M-file-x of=/dev/null)
Result:
|-- 1 (171M)
| `-- 2 (51.9k)
| `-- 3 (51.2k)
`-- 4 (51.3k)
Test C: 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]
write 10M-file-1 to 20M, others still 10M, so 4 dd processes
take similar time.
start 4 dd processes from 4 bash sessions
(dd if=10M-file-x of=/dev/null)
Result:
|-- 1 (104k)
| `-- 2 (52.8k)
| `-- 3 (51.1k)
`-- 4 (51.4k)
next prev parent reply other threads:[~2014-04-15 7:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 7:18 [PATCH 0/2] blk-throttle: simplify logic by token bucket algorithm Hong Zhiguo
[not found] ` <1397546303-6709-1-git-send-email-zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
2014-04-15 7:18 ` [PATCH 1/2] " Hong Zhiguo
2014-04-15 7:18 ` [PATCH 2/2] blk-throttle: trim tokens generated for an idle tree Hong Zhiguo
2014-04-15 7:23 ` Hong Zhiguo [this message]
[not found] ` <1397546586-6776-1-git-send-email-zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
2014-04-15 20:14 ` Test of [PATCH] blk-throttle: simplify logic by token bucket algorithm Vivek Goyal
[not found] ` <20140415201448.GC13033-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-04-18 2:41 ` Hong zhi guo
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=1397546586-6776-1-git-send-email-zhiguohong@tencent.com \
--to=honkiko-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org \
/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).