LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paul Clements <paul.clements@steeleye.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Randy Dunlap <randy.dunlap@oracle.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] NBD: make nbd default to deadline I/O scheduler
Date: Fri, 08 Feb 2008 16:23:01 -0500 [thread overview]
Message-ID: <47ACC835.4070102@steeleye.com> (raw)
In-Reply-To: <20080208204713.GF23197@kernel.dk>
[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]
Jens Axboe wrote:
> On Fri, Feb 08 2008, Jens Axboe wrote:
>> On Fri, Feb 08 2008, Paul Clements wrote:
>>> Andrew Morton wrote:
>>>> On Fri, 8 Feb 2008 09:33:41 -0800 Randy Dunlap <randy.dunlap@oracle.com>
>>>> wrote:
>>>>
>>>>> On Fri, 08 Feb 2008 11:47:42 -0500 Paul Clements wrote:
>>>>>
>>>>>> There have been numerous reports of problems with nbd and cfq. Deadline
>>>>>> gives better performance for nbd, anyway, so let's use it by default.
>>>> Please define "problems". If it's just "slowness" then we can live with
>>>> that, but I'd hope that Jens is aware and that it's understood.
>>>>
>>>> It it's "hangs" or "oopses" then we panic.
>>> The two problems I have experienced (which may already be fixed):
>>>
>>> 1) nbd hangs with cfq on RHEL 5 (2.6.18) -- this may well have been fixed
>>>
>>> There's a similar debian bug that has been filed as well:
>>>
>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=447638
>>>
>>> 2) nbd performs about 10% better (the last time I tested) with deadline
>>> vs. cfq (the overhead of cfq doesn't provide much advantage to nbd [not
>>> being a real disk], and you end up going through the I/O scheduler on
>>> the nbd server anyway, so it makes sense that deadline is better with nbd)
>>>
>>> There have been posts to nbd-general mailing list about problems with
>>> cfq and nbd also.
>> I'm fine with that, it's one of those things we'll do automatically when
>> we have some sort of disk profile system setup. Devices without seek
>> penalties should not use AS or CFQ.
>>
>> Asking for a non-existing elevator is not an issue, but it may trigger
>> both printks and a switch to another elevator. So if you ask for
>> "deadline" and it's modular, you'll get cfq again if it's the default.
>>
>> Your patch looks bad though, you forget to exit the old elevator. And
>> you don't check the return value of elevator_init().
>>
>> All in all, your patch definitely needs more work before it can be
>> included.
Thanks Jens. This one should be better.
--
Paul
[-- Attachment #2: nbd_default_to_deadline_then_noop.diff --]
[-- Type: text/x-patch, Size: 1218 bytes --]
NBD doesn't work well with CFQ (or AS) schedulers, so let's default to something
else.
The two problems I have experienced with nbd and cfq are:
1) nbd hangs with cfq on RHEL 5 (2.6.18) -- this may well have been fixed
There's a similar debian bug that has been filed as well:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=447638
2) nbd performs about 10% better (the last time I tested) with deadline
vs. cfq (the overhead of cfq doesn't provide much advantage to nbd [not
being a real disk], and you end up going through the I/O scheduler on
the nbd server anyway, so it makes sense that deadline is better with nbd)
There have been posts to nbd-general mailing list about problems with
cfq and nbd also.
Signed-Off-By: Paul Clements <paul.clements@steeleye.com>
--- ./drivers/block/nbd.c.max_nbd_killed 2008-02-07 16:46:24.000000000 -0500
+++ ./drivers/block/nbd.c 2008-02-08 16:13:01.000000000 -0500
@@ -667,6 +667,12 @@ static int __init nbd_init(void)
put_disk(disk);
goto out;
}
+ if (elevator_init(disk->queue, "deadline") != 0) {
+ if (elevator_init(disk->queue, "noop") != 0) {
+ put_disk(disk);
+ goto out;
+ }
+ }
}
if (register_blkdev(NBD_MAJOR, "nbd")) {
next prev parent reply other threads:[~2008-02-08 21:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 16:47 Paul Clements
2008-02-08 17:33 ` Randy Dunlap
2008-02-08 18:11 ` Andrew Morton
2008-02-08 18:41 ` Paul Clements
2008-02-08 20:45 ` Jens Axboe
2008-02-08 20:47 ` Jens Axboe
2008-02-08 21:23 ` Paul Clements [this message]
2008-02-08 22:02 ` Andrew Morton
2008-02-09 13:30 ` Paul Clements
2008-02-12 23:16 ` Andrew Morton
2008-02-18 18:16 ` Jens Axboe
2008-02-18 23:50 ` Andrew Morton
2008-02-19 9:19 ` Jens Axboe
2008-02-19 9:24 ` Jens Axboe
2008-02-19 10:02 ` Andrew Morton
2008-02-19 10:05 ` Jens Axboe
2008-02-08 22:45 ` [Nbd] " Mike Snitzer
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=47ACC835.4070102@steeleye.com \
--to=paul.clements@steeleye.com \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--subject='Re: [PATCH 1/1] NBD: make nbd default to deadline I/O scheduler' \
/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
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).