mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Jens Axboe <axboe@suse.de>
Cc: Andrew Morton <akpm@osdl.org>, Andrea Arcangeli <andrea@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: Time sliced CFQ io scheduler
Date: Wed, 08 Dec 2004 18:29:05 +1100	[thread overview]
Message-ID: <1102490945.8095.77.camel@npiggin-nld.site> (raw)
In-Reply-To: <20041208072052.GC19522@suse.de>

On Wed, 2004-12-08 at 08:20 +0100, Jens Axboe wrote:
> On Wed, Dec 08 2004, Nick Piggin wrote:
> > On Wed, 2004-12-08 at 07:58 +0100, Jens Axboe wrote:
> > > On Wed, Dec 08 2004, Nick Piggin wrote:
> > > > On Tue, 2004-12-07 at 18:25 -0800, Andrew Morton wrote:
> > 
> > > > I think we could detect when a disk asks for more than, say, 4
> > > > concurrent requests, and in that case turn off read anticipation
> > > > and all the anti-starvation for TCQ by default (with the option
> > > > to force it back on).
> > > 
> > > CFQ only allows a certain depth a the hardware level, you can control
> > > that. I don't think you should drop the AS behaviour in that case, you
> > > should look at when the last request comes in and what type it is.
> > > 
> > > With time sliced cfq I'm seeing some silly SCSI disk behaviour as well,
> > > it gets harder to get good read bandwidth as the disk is trying pretty
> > > hard to starve me. Maybe killing write back caching would help, I'll
> > > have to try.
> > > 
> > 
> > I "fixed" this in AS. It gets (or got, last time we checked, many months
> > ago) pretty good read latency even with a big write and a very large
> > tag depth.
> > 
> > What were the main things I had to do... hmm, I think the main one was
> > to not start on a new batch until all requests from a previous batch
> > are reported to have completed. So eg. you get all reads completing
> > before you start issuing any more writes. The write->read side of things
> > isn't so clear cut with your "smart" write caches on the IO systems, but
> > no doubt that helps a bit.
> 
> I can see the read/write batching being helpful there, at least to
> prevent writes starving reads if you let the queue drain completely
> before starting a new batch.
> 
> CFQ does something similar, just not batched together. But it does let
> the depth build up a little and drain out. In fact I think I'm missing
> a little fix there thinking about it, that could be why the read
> latencies hurt on write intensive loads (the dispatch queue is drained,
> the hardware queue is not fully).
> 

OK, you should look into that, because I found it was quite effective.
Maybe you have a little bug or oversight somewhere if you read latencies
are really bad. Note that AS read latencies at 256 tags aren't so good
as at 2 tags... but I think they're an order of magnitude better than
with deadline on the hardware we were testing.

> > Of course, after you do all that your database performance has well and
> > truly gone down the shitter. It is also hampered by the more fundamental
> > issue that read anticipating can block up the pipe for IO that is cached
> > on the controller/disks and would get satisfied immediately.
> 
> I think we need to end up with something that sets the machine profile
> for the interesting disks. Some things you can check for at runtime
> (like the writes being extremely fast is a good indicator of write
> caching), but it is just not possible to cover it all. Plus, you end up
> with 30-40% of the code being convoluted stuff added to detect it.
> 

Ideally maybe we would have a userspace program that is run to detect
various disk parameters and ask the user / config file what sort of
workloads we want to do, and spits out a recommended IO scheduler and
/sys configuration to accompany it.

That at least could be made quite sophisticated than a kernel solution,
and could gather quite a lot of "static" disk properties.

Of course there will be also some things that need to be done in
kernel...



  reply	other threads:[~2004-12-08  7:33 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-02 13:04 Jens Axboe
2004-12-02 13:48 ` Jens Axboe
2004-12-02 19:48   ` Andrew Morton
2004-12-02 19:52     ` Jens Axboe
2004-12-02 20:19       ` Andrew Morton
2004-12-02 20:19         ` Jens Axboe
2004-12-02 20:34           ` Andrew Morton
2004-12-02 20:37             ` Jens Axboe
2004-12-07 23:11               ` Nick Piggin
2004-12-02 22:18         ` Prakash K. Cheemplavam
2004-12-03  7:01           ` Jens Axboe
2004-12-03  9:12             ` Prakash K. Cheemplavam
2004-12-03  9:18               ` Jens Axboe
2004-12-03  9:35                 ` Prakash K. Cheemplavam
2004-12-03  9:43                   ` Jens Axboe
2004-12-03  9:26               ` Andrew Morton
2004-12-03  9:34                 ` Prakash K. Cheemplavam
2004-12-03  9:39                 ` Jens Axboe
2004-12-03  9:54                   ` Prakash K. Cheemplavam
     [not found]                   ` <41B03722.5090001@gmx.de>
2004-12-03 10:31                     ` Jens Axboe
2004-12-03 10:38                       ` Jens Axboe
2004-12-03 10:45                         ` Prakash K. Cheemplavam
2004-12-03 10:48                           ` Jens Axboe
2004-12-03 11:27                             ` Prakash K. Cheemplavam
2004-12-03 11:29                               ` Jens Axboe
2004-12-03 11:52                                 ` Prakash K. Cheemplavam
2004-12-08  0:37       ` Andrea Arcangeli
2004-12-08  0:54         ` Nick Piggin
2004-12-08  1:37           ` Andrea Arcangeli
2004-12-08  1:47             ` Nick Piggin
2004-12-08  2:09               ` Andrea Arcangeli
2004-12-08  2:11                 ` Andrew Morton
2004-12-08  2:22                   ` Andrea Arcangeli
2004-12-08  6:52               ` Jens Axboe
2004-12-08  2:00             ` Andrew Morton
2004-12-08  2:08               ` Andrew Morton
2004-12-08  6:55                 ` Jens Axboe
2004-12-08  2:20               ` Andrea Arcangeli
2004-12-08  2:25                 ` Andrew Morton
2004-12-08  2:33                   ` Andrea Arcangeli
2004-12-08  2:33                   ` Nick Piggin
2004-12-08  2:51                     ` Andrea Arcangeli
2004-12-08  3:02                       ` Nick Piggin
2004-12-08  6:58                     ` Jens Axboe
2004-12-08  7:14                       ` Nick Piggin
2004-12-08  7:20                         ` Jens Axboe
2004-12-08  7:29                           ` Nick Piggin [this message]
2004-12-08  7:32                             ` Jens Axboe
2004-12-08  7:30                           ` Andrew Morton
2004-12-08  7:36                             ` Jens Axboe
2004-12-08 13:48                         ` Jens Axboe
2004-12-08  6:55               ` Jens Axboe
2004-12-08  7:08                 ` Nick Piggin
2004-12-08  7:11                   ` Jens Axboe
2004-12-08  7:19                     ` Nick Piggin
2004-12-08  7:26                       ` Jens Axboe
2004-12-08  9:35                         ` Jens Axboe
2004-12-08 10:08                           ` Jens Axboe
2004-12-08 12:47                           ` Jens Axboe
2004-12-08 10:52                 ` Helge Hafting
2004-12-08 10:49                   ` Jens Axboe
2004-12-08  6:49           ` Jens Axboe
2004-12-02 14:28 ` Giuliano Pochini
2004-12-02 14:41   ` Jens Axboe
2004-12-04 13:05     ` Giuliano Pochini
2004-12-03 20:52 Chuck Ebbert

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=1102490945.8095.77.camel@npiggin-nld.site \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=axboe@suse.de \
    --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

all inboxes | Powered by JetHome®