From: Jens Axboe <axboe@kernel.dk>
To: Jan Kara <jack@suse.cz>, LKML <linux-kernel@vger.kernel.org>
Cc: Jeff Moyer <jmoyer@redhat.com>
Subject: Re: CFQ timer precision
Date: Mon, 16 Nov 2015 09:16:02 -0700 [thread overview]
Message-ID: <564A0142.2090605@kernel.dk> (raw)
In-Reply-To: <20151116151159.GE3443@quack.suse.cz>
On 11/16/2015 08:11 AM, Jan Kara wrote:
> Hello,
>
> lately I was looking into a big performance hit we take when blkio
> controller is enabled and jbd2 thread ends up in a different cgroup than
> user process. E.g. dbench4 throughput drops from ~140 MB/s to ~20 MB/s.
> However artificial dbench4 is, this kind of drop will likely be clearly
> visible in real life workloads as well. With unified cgroup hierarchy
> the above cgroup split between jbd2 and user processes is unavoidable
> once you enable blkio controller so IMO we should accomodate that better.
>
> I have couple of CFQ idling improvements / fixes which I'll post later this
> week once I'll complete some round of benchmarking. They improve the
> throughput to ~40 MB/s which helps but clearly there's still a big room for
> improvement. The reason for the performance drop is essentially in idling
> we do to avoid starvation of CFQ queues. Now when idling in this context,
> current default of 8 ms idle window is far to large - we start the timer
> after the final request is completed and thus we effectively give the
> process 8 ms of CPU time to submit the next IO request. Which I think is
> usually far too much. The problem is that more fine grained idling is
> actually problematic because e.g. SUSE distro kernels have HZ=250 and thus
> 1 jiffy is 4 ms. Hence my proposal: Do you think it would be OK to convert
> CFQ to use highres timers and do all the accounting in microseconds?
> Then we could tune the idle time to be say 1ms or even autotune it based on
> process' think time both of which I expect would get us much closer to
> original throughput (4 ms idle window gets us to ~70 MB/s with my patches,
> disabling idling gets us to original throughput as expected).
Converting to a non-jiffies timer base should be quite fine. We didn't
have hrtimers when CFQ was written :-)
--
Jens Axboe
next prev parent reply other threads:[~2015-11-16 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 15:11 CFQ timer precision Jan Kara
2015-11-16 16:16 ` Jens Axboe [this message]
2015-11-16 17:23 ` Jeff Moyer
2015-11-19 14:55 ` Jan Kara
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=564A0142.2090605@kernel.dk \
--to=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.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