From: Vladislav Bolkhovitin <vst@vlnb.net>
To: Bryan Henderson <hbryan@us.ibm.com>
Cc: Steve Byan <smb@egenera.com>, linux-scsi@vger.kernel.org
Subject: Re: SCSI target and IO-throttling
Date: Tue, 07 Mar 2006 20:56:11 +0300 [thread overview]
Message-ID: <440DC93B.8000000@vlnb.net> (raw)
In-Reply-To: <OF4F9C2429.293D1C5C-ON88257129.00683373-88257129.0069D5D8@us.ibm.com>
Bryan Henderson wrote:
>>On Mar 2, 2006, at 11:21 AM, Vladislav Bolkhovitin wrote:
>>
>>
>>>Could anyone advice how a SCSI target device can IO-throttle its
>>>initiators, i.e. prevent them from queuing too many commands, please?
>>>
>>>I suppose, the best way for doing this is to inform the initiators
>>>about the maximum queue depth X of the target device, so any of the
>>>initiators will not send more than X commands. But I have not found
>>>anything similar to that on INQUIRY or MODE SENSE pages. Have I
>>>missed something? Just returning QUEUE FULL status doesn't look to
>>>be correct, because it can lead to out of order commands execution.
>>
>>Returning QUEUE FULL status is correct, unless the initiator does not
>>have any pending commands on the LUN, in which case you should return
>>BUSY. Yes, this can lead to out-of-order execution. That's why tapes
>>have traditionally not used SCSI command queuing.
>
>
> I'm confused, Vladislav appears to be asking about flow control such as
> is built into ISCSI, wherein the ISCSI target tells the intitiator how
> many tasks it's willing to work on at once and the initiator stops sending
> new ones when it has hit that limit and waits for one of the previous ones
> to finish. And the target can continuously change that number.
Yes, exactly.
> With the more primitive transports, I believe this is a manual
> configuration step -- the target has a fixed maximum queue depth and you
> tell the driver via some configuration parameter what it is.
We currently mostly deal with Fibre Channel, which seems to be a kind of
"more primitive transport" without explicit flow control. Actually, I'm
very surprised and can't believe that so advanced and expensive
technology doesn't have such basic thing as a good flow control.
Although, precisely speaking, such flow control is located on level
above transport (this is true for iSCSI as well), therefore this is SCSI
flaw, not FC.
> As I understand it, any system in which QUEUE FULL (that's another name
> for SCSI's Task Set Full, isn't it?) errors happen is one that is not
> properly configured. I saw a broken ISCSI system that had QUEUE FULLs
> happening, and it was a performance disaster.
It is what we observe, too much QUEUE FULLs degrade performance
considerably.
>>>Apparently, hardware SCSI targets don't suffer from queuing
>>>overflow and don't return all the time QUEUE FULL status, so the
>>>must be a way to do the throttling more elegantly.
>>
>>No, they just have big queues.
>
> Big queues are another serious performance problem, when it means a target
> accepts work faster than it can do it. I've seen that cause initiators to
> send suboptimal requests (if the target appears to be working at infinite
> speed, the initiator sends small chunks of work as soon as each is ready,
> whereas if the initiator can tell that the target is choked, the initiator
> combines and sorts work while it waits, into a stream the target can
> handle more efficiently). When systems substitute an oversized queue in a
> target for initiator-target flow control, the initiator ends up having to
> compensate with artificial schemes to withhold work from a willing target
> (e.g. Linux "queue plugging").
This is one point why I don't like having a overbig queue on the target.
Another one is initiator side timeouts when the queue so big that it
could not been done on time. I described it in the previous email.
Thanks,
Vlad
next prev parent reply other threads:[~2006-03-07 17:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-02 16:21 SCSI target and IO-throttling Vladislav Bolkhovitin
2006-03-03 18:07 ` Steve Byan
2006-03-03 18:47 ` Stefan Richter
2006-03-03 20:24 ` Steve Byan
2006-03-06 19:15 ` Bryan Henderson
2006-03-06 19:55 ` Steve Byan
2006-03-07 23:32 ` Bryan Henderson
2006-03-08 15:35 ` Vladislav Bolkhovitin
2006-03-08 15:56 ` Steve Byan
2006-03-08 17:49 ` Vladislav Bolkhovitin
2006-03-08 18:09 ` Steve Byan
2006-03-09 18:37 ` Vladislav Bolkhovitin
2006-03-09 19:32 ` Steve Byan
2006-03-10 18:46 ` Vladislav Bolkhovitin
2006-03-10 19:47 ` Steve Byan
2006-03-13 17:35 ` Vladislav Bolkhovitin
2006-03-14 20:54 ` Douglas Gilbert
2006-03-15 17:15 ` Vladislav Bolkhovitin
2006-03-10 13:26 ` Steve Byan
2006-03-07 17:56 ` Vladislav Bolkhovitin [this message]
2006-03-07 18:38 ` Steve Byan
2006-03-07 17:53 ` Vladislav Bolkhovitin
2006-03-07 18:19 ` Steve Byan
2006-03-07 18:46 ` Vladislav Bolkhovitin
2006-03-07 19:00 ` Steve Byan
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=440DC93B.8000000@vlnb.net \
--to=vst@vlnb.net \
--cc=hbryan@us.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=smb@egenera.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.