What is in this article?:
- What's the Difference Between USB UASP And BOT
- Performance Estimates and Results
- Software Elements
- UASP Enables Multiple Command Queuing and Out-of-Order Processing
- Additional Details of UAS and UASP
USB 3.0 offers approximately 10:1 performance improvement over USB 2.0, but realizing the full potential of that gain for mass storage devices poses additional challenges. The mainstay of mass storage standards for USB 2.0 and 1.1 has been the Bulk Only Transport (BOT) device class specification for USB, and it has served the personal computer industry well with its simplicity and modest efficiency. It has proven to be simple and inexpensive to implement in microprocessor-based systems, including personal computers, and hence suitable for inexpensive flash-based mass storage devices.
In Bulk Only Transport, standard USB Bulk transactions are used for each stage of a mass storage transfer - command, data, and status. In fact, early versions of the BOT standard referred to it as "BBB," short for Bulk/Bulk/Bulk, which was an enhancement over the older Control/Bulk/Interrupt (CBI) standard that was used (and still is) mainly for full-speed USB floppy disk drives.
Higher performance mass storage devices tend to use the SCSI standards (Small Computer System Interface), which allow devices to support performance-enhancing modes of operation such as multiple outstanding requests and out-of-order request completions. Multiple outstanding requests mean that the system doesn't need to wait for each request to be completed before the next request can be sent to the device. The device simply stores the requests in its own buffer, sends a completion back to the host as each request is completed, and starts working on the next request in the buffer as soon as the previous one is completed. This allows the device to be more fully utilized if the USB link can keep up with the additional bus traffic, as USB 3.0 finally can.
But the original BOT standard had no provision for supporting multiple outstanding requests. A new USB standard was needed, and with USB 3.0 there has been a new industry initiative to provide an improved mass storage class specification. The new class standard is known as UAS (USB Attached SCSI) and UASP (UAS Protocol). The UAS standard is developed and maintained by the T10 Technical Committee in the ANSI organization (American National Standards Institute), under the auspices of the INCITS (International Committee on Information Technology Standards) within ANSI. The T10 Committee also maintains the SCSI standards. The UASP standard is developed and maintained by the USB Implementers Forum (USB-IF). The UAS and UASP standards work closely together, and most of the key companies in the industry are active members in both the T10 and USB-IF standards organizations.
A further performance benefit supported by SCSI is out-of-order processing of requests. This allows the mass storage device to schedule request execution in the most optimum way relative to the current state and workload of the device. For example, if the device uses a rotating magnetic or optical platter, it may be more efficient for the device to process requests involving accesses to the same track or nearby tracks first, to limit the number of times the head needs to move between tracks, as well as the distance that the head needs to travel each time. A rotating-platter device may also take into account the location of data on a track, and schedule requests in the order that takes best advantage of how far the platter needs to rotate before the requested sector reaches the head.
Multiple outstanding requests can be accommodated in USB 2.0 as well as USB 3.0, and the UASP standard has been designed to be usable in this way for USB 2.0 as well as USB 3.0. Out-of-order processing has been defined in UAS and UASP to be usable for both USB 2.0 and USB 3.0 also. USB protocol enhancements in USB 3.0 compared to USB 2.0 allow USB3 .0 to implement the UAS and UASP standards even more efficiently, beyond the raw data rate improvement in USB 3.0.
The main USB protocol improvements in USB 3.0 include IN-ACK packets instead of separate ACK and IN packets, and ERDY packets. In addition, the concept of "streams" was implemented in USB 3.0 and in the new xHCI standard (eXtensible Host Controller Interface), allowing a request and its subsequent completion to be grouped together according to their "stream" number. In USB 2.0, implementations of UAS and UASP achieve the association between commands and their completions by using the "Read Ready IU" and "Write Ready IU" ("IU" means Information Unit) within a bulk transfer, rather than being able to specify stream numbers directly in the packet headers.
A "stream" in USB 3.0 is an abstraction representing a subdivision of a "pipe." A "pipe," in turn, is an abstraction denoting a communication pathway between the host and a particular endpoint in a device. The "pipe" abstraction is used in USB 2.0 as well as USB 3.0, but "streams" are new in USB 3.0.