Read priority caching system and method

Expected access times (EATs) of write request to a disk drive are essentially a measure of the predicted service time for the write request. Write Requests generated by a caching storage controller to a disk drive are essentially maintenance functions used to clear the cache. The disk drive modifies the EATs of write commands with a penalty such that read requests requiring disk access are preferentially satisfied. The penalty may be constant or may be established based on one or more factors, and may even be negative if necessary to clear a cache full of writes requiring destaging to disk.

FIELD OF THE INVENTION

The present invention relates generally to data storage disk drives.

BACKGROUND OF THE INVENTION

Many current storage subsystems have a caching controller backed up by many separate disk drives. Write requests arriving at a storage subsystem are generally cached and completion status is returned immediately. Read requests are serviced first from the storage subsystem cache and only in the event of a cache miss does the request filter down to one or more of the disk drives being managed. Performance of the storage subsystem depends on the completion of read data requests and acceptance of write data requests in the shortest time possible. Modifying the queuing behavior of the disk drives contained in such a storage subsystem can improve its performance.

Most disk drive queue sorting algorithms attempt to maximize throughput by sorting all commands in their queue for the shortest seek times with the least latency using what is called a “Shortest Access Time First” (SATF) algorithm. As recognized by the present invention, however, write requests submitted to the disk drives are intrinsically different from read requests in that acceptance of write requests have already been satisfied using the storage subsystem cache and most write commands to the disk drives are actually maintenance requests generated internally by the storage subsystem to free up cache resource. Read requests, on the other hand, are time critical in that they are storage subsystem cache misses and system performance depends on satisfying these requests in the shortest time possible.

Nevertheless, while write requests are not as important to storage subsystem performance as read requests, good throughput for write requests is still desirable to maintain the storage subsystem's ability to accept new write requests. Having made the above critical observation, the solution herein is provided.

SUMMARY OF THE INVENTION

A disk drive for servicing read requests and write requests uses logic that includes determining, for at least some write requests, an expected access time (EAT), and adding a penalty period to at least some EATs of write requests to render modified EATs. The logic also includes satisfying read and write requests in a sequence based on their possibly modified EATs.

If desired, a single predetermined penalty period may be used for all write requests. Alternatively, a first penalty period may be used for a first write request and a second penalty period may be used for a second write request. The penalty period for a write request may be established based on: cache free space, type of write request, length of the write request, length of a current work queue, and/or performance of a disk drive. In any case, in the preferred embodiment the logic may determine EATs for read requests, with modified EATs of one or more write requests being less than an EAT of a read request such that the write request is satisfied before the read request.

In another aspect, a disk drive used in a data storage subsystem includes at least one storage disk, and at least one data cache. A disk drive satisfies read requests and write requests using its cache when possible and otherwise satisfies the requests using the disk. The disk drive includes means for determining expected access times (EATs) at least for requests requiring disk access, and means for modifying EATs of write requests.

In still another aspect, a computer program storage device contains instructions that are executable by a digital processor. The instructions include provision for delaying satisfaction of write requests based at least in part on a penalty.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Referring initially toFIG. 1, a system is shown, generally designated10, for satisfying read requests and write requests generated by software applications12(only a single application12shown for clarity). The system10includes a storage subsystem14that in turn includes a storage controller16which accesses a solid state cache18and plural disk drives20to execute read requests and write requests. While for clarity only one cache18and one disk drive20are shown, the subsystem14generally will include plural disk drives if desired. Each disk drive20includes a disk drive controller20a, plural data storage disks20b, and a solid state cache20cand satisfies read requests and write requests received from storage controller16in an order defined by the logic shown inFIG. 2below.

As recognized herein, storage controllers16satisfy read requests from the cache18when possible, and otherwise access the disk drives20. Likewise, the storage controller16will satisfy a write request by storing the write data in the cache18, and sometime later will transfer the write data to one of its disk drives20as a maintenance operation. For this reason, satisfying read requests that require disk drive20access is generally a more important task impacting system performance from the perspective of the application12than is completing write requests, which from the application's perspective are complete when the data is initially written into the cache18. Storage controller16attempts to maintain as many read requests and write requests as possible in its disk drives allowing each disk drive to optimize performance by scheduling the order of execution locally. Each disk drive20maintains a task set of read and write requests received from the storage controller16and schedules them for execution. Accordingly, the present invention recognizes that while fulfilling read requests is generally more important than completing write requests, write requests must nonetheless be completed during periods of high activity even if some read requests are delayed as a result.

With the above recognition in mind, attention is directed toFIG. 2. Commencing at block22, a command is selected from the current set of unfulfilled commands. At block24, an expected access time (EAT) for the command is determined conventionally, using, e.g., seek time, latency, and probability of successfully fulfilling the command.

Proceeding to decision diamond26, it is determined whether the command is a write command. If it is, the logic moves to block30to add a time penalty to the EAT of the write command under test to render a modified EAT. The penalty usually will be positive, i.e., the modified EAT will be longer than the original EAT, but in some cases (e.g., when activity is high and cache18free space is low), the penalty could be negative to ensure a write command is completed and cache space is freed thereby.

In one embodiment, the penalty may be a single predetermined penalty period that is used for all write requests. In other embodiments, the penalty may vary dynamically or otherwise such that a first penalty period may be used for a first write request and a second, different penalty period may be used for a second write request. For example, the penalty period for a write request can be relatively short or even negative if the write request has not been selected for a long time, particularly in the context of high activity. On the other hand, the penalty can be relatively longer if the rate that new commands arrive at the disk drive is lower. Yet again, the penalty can be established based on the type of write request. Also, the penalty may be dynamically established to be longer if the performance of the disk drive20as measured by, e.g., response time is relatively poor, with the penalty being shorter when the performance of the disk drive20is in an acceptable range or above an acceptable threshold.

From block30, or from decision diamond26for a negative test, the logic moves to decision diamond32, wherein it is determined whether the current EAT (as potentially modified at block30) is shorter than the current “best” (i.e., shortest) EAT. If so, the command under test is designated as the “current best” at block34. At decision diamond36it is determined whether any more commands exist in the task set for which EATs have yet to be calculated. If so, the logic loops back to block22. Otherwise, when EATs have been calculated for all commands in the task set, the logic ends at block38by executing the current “best” command. The logic then repeats commencing at block22to select the next command among those still in the task set and any new commands which have arrived, given that the command selected at block38is the new starting point.