Author: NetworkAdminKB.com
Created: 2009-07-01
Modified: 2009-07-14
In this article is will be discussing what considerations, choices, and settings you may need to address to improve your SAN performance on your existing hardware. Things like adding memory or CPU, or upgrading your HBA, etc. will not be discussed as they are assumed to be the easy solutions and you have addressed them already.
Storport versus SCSIport Driver Considerations
Under Windows there are two types of drivers that can be used for Fiber Channel HBAs, the legacy SCSI Miniport (SCSIport) and the newer Stor Miniport driver (Storport). Storport is designed for improved handling of disk storage and so it has no enhancements to improve working with tape storage. Windows 2003 64bit (x64) does not support SCSIport drivers.
Depending on your backup software it may be recommended to use the SCSIport driver when it is an option for use with your tape devices over Fiber Channel. When using the SCSIport version of the driver you may wish to disable the tape devices (libraries and tape drives) from within the Windows 2003 Device Manager, do not disable the HBA. This may be desirable because backup applications that use SCSI pass through will not be affected by disabling the tape device(s). This is also the normal recommendation for applications that use SCSI pass though to communicate with tape devices. This type of configuration will also prevent all other applications that use the OS tape device driver from accessing the tape device(s), thus preventing software conflicts.
The Storport driver has a major design change in that it does not support SCSI pass through if the tape device is disabled. If the tape devices are disabled from within the Windows 2003 Device Manager, the OS will not pass the device serial number back to the calling application. The lack of a device serial number will prevent the backup software from uniquely identifying the device and so the tape device will not be available for use.
Microsoft designed the Storport driver with modern disk storage I/O requirements in mind and to address the shortcomings of SCSIport. For example, to address SCSIport's half-duplex limitation, Storport supports synchronous I/O functioning (i.e., full duplex). Thus, Storport can issue and complete I/O requests simultaneously.
To improve on SCSIport's performance under high IRQ levels, Storport adds a new parallel routine that can handle more IRQ processing overhead (such as building scatter/gather lists for I/O requests) before sending the command to the Target device. Storport also reduces buffer processing overhead by providing driver developers with flexible options for buffer management.
To resolve SCSIport's 254 outstanding I/O request limit per adapter, Storport imposes no per-adapter limit. Instead, Storport limits the number of outstanding I/O requests per LUN to 254. This improvement provides flexibility and better performance for high-performance storage systems, such as Fiber Channel SANs.
Storport provides better I/O queue management than SCSIport (which really can't control I/O queuing at all) by implementing I/O queue control functions (e.g., pause, resume, busy, ready) on a device, adapter, and LUN basis. Storport also offers new features like enhanced error handling, Fiber Channel link handling and channel management, better Windows clustering support, and deferred procedure call (DPC) support for extended processing capability. With all of these improvements Microsoft claims that Storport is 30 percent to 50 percent more efficient than SCSIport and can handle more I/Os per second at a lower CPU utilization.
Recommendation
In general use a SCSIport driver for Tape and a Storport driver for Disk. However, only testing will determine which will provide the best Tape performance. SCSIport should never be used for accessing Disk via a Fiber Channel HBA.
Which ever driver you decide on, it is important to use the most current version of Storport.sys or SCSIport.sys from Microsoft, along with the most current and matching (SCSIport / Storport) HBA driver.
HBA Driver Configuration Options
Regardless of which HBA manufacture and which driver type (SCSIport / Storport) you use there are a few configuration options that can be implemented to improve the performance of an HBA.
MaximumSGList
A Scatter/Gather List (SG List) is used to perform large SCSI I/O data transfers. Windows 2003 supports up to 256 scatter/gather segments of 4096 bytes each, allowing transfers up to 1048576 bytes (1MB or 1024KB).
The MaximumSGList setting is used to configure the Maximum Transfer Size allowed over the HBA.
MaximumSGList = (Maximum Transfer Size) / 4K + 1
Or
Maximum Transfer Size = (MaximumSGList –1) * 4K
Where Maximum Transfer Size (MTS) is the largest size the HBA Driver will accept for transferring to the target device.
Note: this is not the Maximum Block Size, as block size is a physical media (Disk or Tape) implementation and is not implemented in protocols. The amount of data transferred will be written in one or more blocks to the physical media once the transfer is complete. Block size is controlled by the application or format of the media, not the HBA driver.
The maximum value allowed for MaximumSGList is 255 or 0xFF.
The 0xFF value is a special indicator used by Windows to indicate that the Maximum Transfer Size should be set to 1MB. Thus, internally Windows will increase the value provided to 0x101 (257), allowing support for the full 1MB (1024KB) transfer. Any value above 255 (0xFF) enables 64K transfers.
For many HBAs the default value for MaximumSGList is 33 (decimal) or 65 (decimal). If the default value is set to 33 then the default value of the MTS is 128KB. If the default value is set to 65 then the default value of the MTS is 256KB.
NumberOfRequests
NumberOfRequests is the maximum number of outstanding (aka: concurrent) I/O requests to the target LUN or Tape device allowed by the driver, not the HBA itself. There may still be HBA settings that limit how many outstanding I/O requests that can be sent to the Target device.
On most HBAs drivers the default value of NumberOfRequests is 16 or 32 (decimal), and the maximum value is 150 (decimal). Settings above 150 may cause issues due to the large amount of non-paged pool memory that will be required on the server.
Recommended Settings
Under testing I found the following values work well when a Storport driver is used to communicate with a LUN presented from a storage array. No testing with Tape and SCSIport has been performed.
MaximumSGList = 65 decimal (which make MTS = 256KB)
NumberOfRequests = 125 decimal
These values are located in the Device registry key of every HBA Device Driver.
HKLM\System\CurrentControlSet\Services\DeviceDriver\Parameters\Device\
Where DeviceDriver is the registry key name for the HBA device driver. If these entries do not exist the default values are used. You can manually create them if they do not exist. Both MaximumSGList and NumberOfRequests should be DWORD values.
Other Resources:
MSDN Storport Driver
MSDN SCSI Port Driver
MSDN SCSI Miniport Drivers
MSDN Storport Miniport Drivers