SCSI Port versus SCSI Miniport versus other options

I’m sorry to have been “away” through many of the SCSI Port versus Miniport
discussions. But I would like to try to provide some insight on this topic,
because we’ve done a very substantial amount of work in this space.

It seems to me that there’s lots of misconceptions, bad information, and
lack of information. I’d like to address some of the major ones. I’ll try
not to make this a mail message that’s long enough to be an article in
The NT Insider :slight_smile:

Performance: The performance delta between a custom SCSI Port driver and a
SCSI Miniport driver is nowhere near as large as people seem to think. Any
gain comes from two vectors: (a) The ability to custom tailor the custom
port driver code to the device, and (b) The ability to take advantage of
parallelization in an SMP system.

By actual measurement (this is not a guess), the gain from (a) is not likely
to exceed 5%. The MS Scsi Port Driver may not be the nicest driver in
history, but neither it is grossly inefficient.

The performance gains you get from (b) is much harder to quantify. However,
any significant performance gain in this category requires (at least) lots
of I/O and an extremely fast device that can handle many I/O requests in
progress simultaneously. More performance gains are evident in drivers that
are more CPU intensive (duh).

Port Drivers: A proper Win2K SCSI Port Driver is VERY hard to get right.
We’ve written, and assisted with the development of, several SCSI Port
Drivers that are currently in use in commercial products. We’ve had a port
driver “kit” available to select clients for about a year. We actively try
to DISCOURAGE our clients from writing full scsi port drivers, and advise
writing one only when it’s really warranted. Getting a full port driver
through WHQL can be trying (but yes, as of this minute, it CAN be done).
Before you write a full scsi port driver, consider issues such as: Will it
pass the HCTs? How will it behave for your customers during an upgrade
(service pack or to a new version of the O/S)? Will it run on XP? Will it
run on .Net Server (Whistler)?

Alternatives: For those of you who are writing full port drivers so that you
can benefit from parallelization, note that there’s an entirely new
architecture in XP and .Net Server that allows you to write a de-serialized,
more powerful, miniport style driver. This architecture is called StorPort,
and was designed by MS with high performance raid systems in mind. You can
write StorPort drivers using the XP DDK. Sadly, however, there’s no
documentation yet!

I’m not saying that you should never write a full scsi port driver. I *am*
saying that I can tell you by experience that there’s no huge performance
gain inherent in moving to a full port driver. And considering the costs
and effort involved, you really have to think through the entire process
before you settle on writing a full scsi port driver.

Sorry this comes so late to the discussion, but if I saw one more email that
said “if you want it to be fast, you’ll write a full port driver” I was
gonna scream.

Peter
OSR


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Actually there is documentation, here:
http://www.microsoft.com/hwdev/storage/ or directly here:
http://www.microsoft.com/hwdev/storage/download/storport_06a.ZIP

On the other hand I agree with Peter that writing a full scsiport driver is
the last alternative one should consider, and that storport appears to
address the major disadvantages to scsiport, making the decision to not
implement a scsiport driver essentially a no-brainer.

-----Original Message-----

Alternatives: For those of you who are writing full port drivers so that you
can benefit from parallelization, note that there’s an entirely new
architecture in XP and .Net Server that allows you to write a de-serialized,
more powerful, miniport style driver. This architecture is called StorPort,
and was designed by MS with high performance raid systems in mind. You can
write StorPort drivers using the XP DDK. Sadly, however, there’s no
documentation yet!


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi,

It looks like people who compare performance of SCSI port and SCSI miniport
drivers make one big mistake pretty often. They compare good-written SCSI
port and bad-written SCSI miniport drivers. I’m talking mostly about
software-only solutions like mapping the disk media to the network with the
help ot TDI. I’ve told already that writing virtual disk drivers it’s a
national sport now. That’s why people who do not know any other ways of
completing requests in SCSI miniport driver except of calling timer
callback from SCSIPORT context shout on every corner “write SCSI port”. We
did some performance tests comparing SCSI port, timer callback based SCSI
miniport and correctly written SCSI miniport driver (when IRP to complete
the previous request was initiated by the driver itself by calling
SRB_IO_CONTROL. So the total overhead was just one more call to
IoCallDriver() & some more additional stuff to support that call.). Finally
SCSI port was the best (not surprisingly), SCSI miniport that used timer
callback was loosing 10-40% to it depending of how heavy was I/O load, and
SCSI miniport w/o timer callback was working just like SCSI port… BTW
SCSI miniport will work on all platforms staring from Win9x/Me (maybe with
some minor modifications) and till WinXP. I’m happy I was confused myself
some time ago so I wrote SCSI port. Now I think I’ll just dump it…

Regards,
Anton Kolomyeytsev

CoolDev.Com - Toolkits for Network & Storage Kernel Software Developers
“KoolSockets” & “KoolStorage” - TDI Client, Kernel Sockets, SCSI
port/miniport
http://www.CoolDev.Com xxxxx@CoolDev.Com
xxxxx@CoolDev.Com

On 07/10/01, ““Peter Viscarola” ” wrote:
> I’m sorry to have been “away” through many of the SCSI Port versus Miniport
> discussions. But I would like to try to provide some insight on this topic,
> because we’ve done a very substantial amount of work in this space.
>
> It seems to me that there’s lots of misconceptions, bad information, and
> lack of information. I’d like to address some of the major ones. I’ll try
> not to make this a mail message that’s long enough to be an article in
> The NT Insider :slight_smile:
>
> Performance: The performance delta between a custom SCSI Port driver and a
> SCSI Miniport driver is nowhere near as large as people seem to think. Any
> gain comes from two vectors: (a) The ability to custom tailor the custom
> port driver code to the device, and (b) The ability to take advantage of
> parallelization in an SMP system.
>
> By actual measurement (this is not a guess), the gain from (a) is not likely
> to exceed 5%. The MS Scsi Port Driver may not be the nicest driver in
> history, but neither it is grossly inefficient.
>
> The performance gains you get from (b) is much harder to quantify. However,
> any significant performance gain in this category requires (at least) lots
> of I/O and an extremely fast device that can handle many I/O requests in
> progress simultaneously. More performance gains are evident in drivers that
> are more CPU intensive (duh).
>
> Port Drivers: A proper Win2K SCSI Port Driver is VERY hard to get right.
> We’ve written, and assisted with the development of, several SCSI Port
> Drivers that are currently in use in commercial products. We’ve had a port
> driver “kit” available to select clients for about a year. We actively try
> to DISCOURAGE our clients from writing full scsi port drivers, and advise
> writing one only when it’s really warranted. Getting a full port driver
> through WHQL can be trying (but yes, as of this minute, it CAN be done).
> Before you write a full scsi port driver, consider issues such as: Will it
> pass the HCTs? How will it behave for your customers during an upgrade
> (service pack or to a new version of the O/S)? Will it run on XP? Will it
> run on .Net Server (Whistler)?
>
> Alternatives: For those of you who are writing full port drivers so that you
> can benefit from parallelization, note that there’s an entirely new
> architecture in XP and .Net Server that allows you to write a de-serialized,
> more powerful, miniport style driver. This architecture is called StorPort,
> and was designed by MS with high performance raid systems in mind. You can
> write StorPort drivers using the XP DDK. Sadly, however, there’s no
> documentation yet!
>
> I’m not saying that you should never write a full scsi port driver. I am
> saying that I can tell you by experience that there’s no huge performance
> gain inherent in moving to a full port driver. And considering the costs
> and effort involved, you really have to think through the entire process
> before you settle on writing a full scsi port driver.
>
> Sorry this comes so late to the discussion, but if I saw one more email that
> said “if you want it to be fast, you’ll write a full port driver” I was
> gonna scream.
>
> Peter
> OSR
>
>
>
>
> —
> You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Peter,

StorePort was included in the last DDK drop for XP, and Jamey Kirby pointed
me to a white paper on it last month.

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com

-----Original Message-----
From: Peter Viscarola [mailto:xxxxx@osr.com]
Sent: Tuesday, July 10, 2001 6:47 AM
To: NT Developers Interest List
Subject: [ntdev] SCSI Port versus SCSI Miniport versus other options


Alternatives: For those of you who are writing full port drivers so that you
can benefit from parallelization, note that there’s an entirely new
architecture in XP and .Net Server that allows you to write a de-serialized,
more powerful, miniport style driver. This architecture is called StorPort,
and was designed by MS with high performance raid systems in mind. You can
write StorPort drivers using the XP DDK. Sadly, however, there’s no
documentation yet!

Peter
OSR


You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks for the thorough article. I agree with you almost completely.
There is one exception; those who wish to defer request completion
outside of SCSI port. For example, someone may have a virtual SCSI
device (let’s say iSCSI). iSCSI will require communication utilizing
TCP/IP. If you were to send the request to the network interface and it
required a completion routine to handle post processing, it is
impossible to complete the SRB from the completion handler. This is
because the Microsoft SCSI port driver maintains a “context”. The
typical solution for this is to use a SCSI port timer callback. This, as
we all know, is very slow.

The solution is to write a SCSI port driver. Yes, writing a SCSI port
driver for Windows 2000 is very complex. This is why I put a plug on the
list for the product we have developed. I apologies to you and the list
for doing this. I was only trying to provide useful information.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Viscarola
Sent: Tuesday, July 10, 2001 6:47 AM
To: NT Developers Interest List
Subject: [ntdev] SCSI Port versus SCSI Miniport versus other options

I’m sorry to have been “away” through many of the SCSI Port
versus Miniport discussions. But I would like to try to
provide some insight on this topic, because we’ve done a very
substantial amount of work in this space.

It seems to me that there’s lots of misconceptions, bad
information, and lack of information. I’d like to address
some of the major ones. I’ll try not to make this a mail
message that’s long enough to be an article in The NT Insider :slight_smile:

Performance: The performance delta between a custom SCSI Port
driver and a SCSI Miniport driver is nowhere near as large as
people seem to think. Any gain comes from two vectors: (a)
The ability to custom tailor the custom port driver code to
the device, and (b) The ability to take advantage of
parallelization in an SMP system.

By actual measurement (this is not a guess), the gain from
(a) is not likely to exceed 5%. The MS Scsi Port Driver may
not be the nicest driver in history, but neither it is
grossly inefficient.

The performance gains you get from (b) is much harder to
quantify. However, any significant performance gain in this
category requires (at least) lots of I/O and an extremely
fast device that can handle many I/O requests in progress
simultaneously. More performance gains are evident in
drivers that are more CPU intensive (duh).

Port Drivers: A proper Win2K SCSI Port Driver is VERY hard to
get right. We’ve written, and assisted with the development
of, several SCSI Port Drivers that are currently in use in
commercial products. We’ve had a port driver “kit” available
to select clients for about a year. We actively try to
DISCOURAGE our clients from writing full scsi port drivers,
and advise writing one only when it’s really warranted.
Getting a full port driver through WHQL can be trying (but
yes, as of this minute, it CAN be done). Before you write a
full scsi port driver, consider issues such as: Will it pass
the HCTs? How will it behave for your customers during an
upgrade (service pack or to a new version of the O/S)? Will
it run on XP? Will it run on .Net Server (Whistler)?

Alternatives: For those of you who are writing full port
drivers so that you can benefit from parallelization, note
that there’s an entirely new architecture in XP and .Net
Server that allows you to write a de-serialized, more
powerful, miniport style driver. This architecture is called
StorPort, and was designed by MS with high performance raid
systems in mind. You can write StorPort drivers using the XP
DDK. Sadly, however, there’s no documentation yet!

I’m not saying that you should never write a full scsi port
driver. I *am* saying that I can tell you by experience that
there’s no huge performance gain inherent in moving to a full
port driver. And considering the costs and effort involved,
you really have to think through the entire process before
you settle on writing a full scsi port driver.

Sorry this comes so late to the discussion, but if I saw one
more email that said “if you want it to be fast, you’ll write
a full port driver” I was gonna scream.

Peter
OSR


You are currently subscribed to ntdev as:
xxxxx@storagecraft.com To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Going way back Peter V wrote …

Port Drivers: A proper Win2K SCSI Port Driver is VERY hard to get right.
We’ve written, and assisted with the development of, several SCSI Port
Drivers that are currently in use in commercial products. We’ve had a
port
driver “kit” available to select clients for about a year.
We actively try to DISCOURAGE our clients from writing full scsi port
drivers, and advise writing one only when it’s really warranted. Getting
a full
port driver through WHQL can be trying (but yes, as of this minute, it
CAN be done).

I need to give an estimate of the time it will take to get a driver through
WHQL certification. As I have never done WHQL cert I have no idea how long
it normally takes.

Does anyone have an idea how long it GENERALLY takes to get a full SCSI Port
driver through WHQL cert? This is assuming I’ve run all the tests and have
all that in order. Just the process.

Thanks!

Tom Swanson
XIOtech Corporation


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

“Swanson, Tom” wrote in message
news:xxxxx@ntdev…
>
> Does anyone have an idea how long it GENERALLY takes to get a full SCSI
Port
> driver through WHQL cert? This is assuming I’ve run all the tests and
have
> all that in order. Just the process.
>

Hi Tom,

Assuming you can run all the tests, you’d probably submit your hardware
device as a “disk subsystem” or something, right? And that’d take about a
month or so to get through the process, typically.

Peter


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com