From: Andrea Righi <righi.andrea@gmail.com>
To: Paolo Valente <paolo.valente@linaro.org>
Cc: Josef Bacik <josef@toxicpanda.com>, Tejun Heo <tj@kernel.org>,
Li Zefan <lizefan@huawei.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Jens Axboe <axboe@kernel.dk>, Vivek Goyal <vgoyal@redhat.com>,
Dennis Zhou <dennis@kernel.org>,
cgroups@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/3] cgroup: fsio throttle controller
Date: Fri, 18 Jan 2019 20:02:27 +0100 [thread overview]
Message-ID: <20190118190227.GC1535@xps-13> (raw)
In-Reply-To: <F576C256-A032-4E62-99EA-F60162B6E069@linaro.org>
On Fri, Jan 18, 2019 at 06:07:45PM +0100, Paolo Valente wrote:
>
>
> > Il giorno 18 gen 2019, alle ore 17:35, Josef Bacik <josef@toxicpanda.com> ha scritto:
> >
> > On Fri, Jan 18, 2019 at 11:31:24AM +0100, Andrea Righi wrote:
> >> This is a redesign of my old cgroup-io-throttle controller:
> >> https://lwn.net/Articles/330531/
> >>
> >> I'm resuming this old patch to point out a problem that I think is still
> >> not solved completely.
> >>
> >> = Problem =
> >>
> >> The io.max controller works really well at limiting synchronous I/O
> >> (READs), but a lot of I/O requests are initiated outside the context of
> >> the process that is ultimately responsible for its creation (e.g.,
> >> WRITEs).
> >>
> >> Throttling at the block layer in some cases is too late and we may end
> >> up slowing down processes that are not responsible for the I/O that
> >> is being processed at that level.
> >
> > How so? The writeback threads are per-cgroup and have the cgroup stuff set
> > properly. So if you dirty a bunch of pages, they are associated with your
> > cgroup, and then writeback happens and it's done in the writeback thread
> > associated with your cgroup and then that is throttled. Then you are throttled
> > at balance_dirty_pages() because the writeout is taking longer.
> >
>
> IIUC, Andrea described this problem: certain processes in a certain group dirty a
> lot of pages, causing write back to start. Then some other blameless
> process in the same group experiences very high latency, in spite of
> the fact that it has to do little I/O.
>
> Does your blk_cgroup_congested() stuff solves this issue?
>
> Or simply I didn't get what Andrea meant at all :)
>
> Thanks,
> Paolo
Yes, there is also this problem: provide fairness among processes
running inside the same cgroup.
This is a tough one, because once the I/O limit is reached whoever
process comes next gets punished, even if it hasn't done any I/O before.
Well, my proposal doesn't solve this problem. To solve this one in the
"throttling" scenario, we should probably save some information about
the previously generated I/O activity and apply a delay proportional to
that (like a dynamic weight for each process inside each cgroup).
AFAICS the io.max controller doesn't solve this problem either.
-Andrea
next prev parent reply other threads:[~2019-01-18 19:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 10:31 [RFC PATCH 0/3] cgroup: fsio throttle controller Andrea Righi
2019-01-18 10:31 ` [RFC PATCH 1/3] fsio-throttle: documentation Andrea Righi
2019-01-18 10:31 ` [RFC PATCH 2/3] fsio-throttle: controller infrastructure Andrea Righi
2019-01-18 10:31 ` [RFC PATCH 3/3] fsio-throttle: instrumentation Andrea Righi
2019-01-18 11:04 ` [RFC PATCH 0/3] cgroup: fsio throttle controller Paolo Valente
2019-01-18 11:10 ` Andrea Righi
2019-01-18 11:11 ` Paolo Valente
2019-01-18 16:35 ` Josef Bacik
2019-01-18 17:07 ` Paolo Valente
2019-01-18 17:12 ` Josef Bacik
2019-01-18 19:02 ` Andrea Righi [this message]
2019-01-18 18:44 ` Andrea Righi
2019-01-18 19:46 ` Josef Bacik
2019-01-19 10:08 ` Andrea Righi
2019-01-21 21:47 ` Vivek Goyal
2019-01-28 17:41 ` Andrea Righi
2019-01-28 19:26 ` Vivek Goyal
2019-01-29 18:39 ` Andrea Righi
2019-01-29 18:50 ` Josef Bacik
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=20190118190227.GC1535@xps-13 \
--to=righi.andrea@gmail.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=dennis@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=paolo.valente@linaro.org \
--cc=tj@kernel.org \
--cc=vgoyal@redhat.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).