From: Vivek Goyal <vgoyal@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: Zhao Shuai <zhaoshuai@freebsd.org>,
axboe@kernel.dk, ctalbott@google.com, rni@google.com,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
containers@lists.linux-foundation.org
Subject: Re: performance drop after using blkcg
Date: Tue, 11 Dec 2012 10:02:34 -0500 [thread overview]
Message-ID: <20121211150234.GC5580@redhat.com> (raw)
In-Reply-To: <20121211144718.GF7084@htj.dyndns.org>
On Tue, Dec 11, 2012 at 06:47:18AM -0800, Tejun Heo wrote:
> Hello,
>
> On Tue, Dec 11, 2012 at 09:43:36AM -0500, Vivek Goyal wrote:
> > I think if one sets slice_idle=0 and group_idle=0 in CFQ, for all practical
> > purposes it should become and IOPS based group scheduling.
>
> No, I don't think it is. You can't achieve isolation without idling
> between group switches. We're measuring slices in terms of iops but
> what cfq actually schedules are still time slices, not IOs.
I think I have not been able to understand your proposal. Can you explain
a bit more.
This is what CFQ does in iops_mode(). It will calculate the number of
requests dispatched from a group and scale that number based on weight
and put the group back on service tree. So if you have not got your
fair share in terms of number of requests dispatched to the device,
you will be put ahead in the queue and given a chance to dispatch
requests first.
Now couple of things.
- There is no idling here. If device is asking for more requests (deep
queue depth) then this group will be removed from service tree and
CFQ will move on to serve other queued group. So if there is a dependent
reader it will lose its share.
If we try to idle here, then we have solved nothing in terms of
performance problems. Device is faster but your workload can't cope
with it so you are artificially slowing down the device.
- But if all the contending workloads/groups are throwing enough IO
traffic on the device and don't get expired, they they should be able
to dispatch number of requests to device in proportion to their weight.
So this is effectively trying to keep track of number of reqeusts
dispatched from the group instead of time slice consumed by group and
then do the scheduling.
cfq_group_served() {
if (iops_mode(cfqd))
charge = cfqq->slice_dispatch;
cfqg->vdisktime += cfq_scale_slice(charge, cfqg);
}
Isn't it effectively IOPS scheduling. One should get IOPS rate in proportion to
their weight (as long as they can throw enough traffic at device to keep
it busy). If not, can you please give more details about your proposal.
Thanks
Vivek
next prev parent reply other threads:[~2012-12-11 15:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAFVn34SxqAJe_4P-WT8MOiG-kmKKD7ge96zoHXQuGqHWPgAt+A@mail.gmail.com>
2012-12-11 7:00 ` performance drop after using blkcg Zhao Shuai
2013-08-29 3:10 ` joeytao
2013-08-29 3:20 ` joeytao
2012-12-11 14:25 ` Vivek Goyal
2012-12-11 14:27 ` Tejun Heo
2012-12-11 14:43 ` Vivek Goyal
2012-12-11 14:47 ` Tejun Heo
2012-12-11 15:02 ` Vivek Goyal [this message]
2012-12-11 15:14 ` Tejun Heo
2012-12-11 15:37 ` Vivek Goyal
2012-12-11 16:01 ` Tejun Heo
2012-12-11 16:18 ` Vivek Goyal
2012-12-11 16:27 ` Tejun Heo
2012-12-12 7:29 ` Zhao Shuai
2012-12-16 4:38 ` Zhu Yanhai
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=20121211150234.GC5580@redhat.com \
--to=vgoyal@redhat.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=containers@lists.linux-foundation.org \
--cc=ctalbott@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rni@google.com \
--cc=tj@kernel.org \
--cc=zhaoshuai@freebsd.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).