System and method for throttling host throughput

A method for throttling host throughput in a computer storage subsystem is provided. The host throughput is compared to a throughput limit for a predetermined time period. If the host throughput exceeds the throughput limit during the predetermined time period, an input/output (I/O) delay is set equal to the remainder of the predetermined time period, and the delay is implemented for an associated storage device of the computer storage subsystem.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates in general to computers, and more particularly to a method, system, and computer program product for throttling host throughput in computer storage subsystems.

2. Description of the Related Art

Computer systems may include a host which is connected to a computer subsystem, such as a computer storage subsystem. The host may store and access data from the computer storage subsystem over a communications channel having a maximum throughput. Generally, the throughput is measured in data passed through the channel per a certain time period, such as bytes-per-second (B/sec). Computer storage subsystems may include a variety of components such as virtual tape storage systems, where hard disk drive storage is used to emulate tape drives and tape cartridges. In other storage subsystems, hard disk drives may be configured in a redundant array of independent disks (RAID) typology.

While the communications channel between the host and the storage subsystem carries a maximum throughput, in certain situations it may be desirable to limit or “throttle” the throughput. For example, it may be desirable to throttle certain host throughput to an amount less than the maximum throughput for a certain amount of time. For example, a user may purchase a certain amount of host throughput. As a result, it is desirable to limit the host throughput to the purchased amount.

SUMMARY OF THE INVENTION

A need exists for a system, method, and computer program product for throttling host throughput in a computer storage subsystem such as a virtual tape storage system. Accordingly, in one embodiment, by way of example only, a method for throttling host throughput in a computer storage subsystem is provided. The host throughput is compared to a throughput limit for a predetermined time period. If the host throughput exceeds the throughput limit during the predetermined time period, an input/output (I/O) delay is set equal to the remainder of the predetermined time period, and the delay is implemented for an associated storage device of the computer storage subsystem.

In another embodiment, again by way of example only, a system for throttling host throughput in a computer storage subsystem is provided. A virtual server is operational on the computer storage subsystem. The virtual server is configured to compare the host throughput to a throughput limit for a predetermined time period, and if the host throughput exceeds the throughput limit during the predetermined time period, set a delay equal to the remainder of the predetermined time period, and implement the delay for an associated storage device of the computer storage subsystem.

In still another embodiment, again by way of example only, a computer program product is provided for throttling host throughput in a computer storage subsystem, the computer program product comprising a computer-readable storage medium having computer-readable program code portions stored therein. The computer-readable program code portions comprise a first executable portion for comparing the host throughput to a throughput limit for a predetermined time period, and a second executable portion for, if the host throughput exceeds the throughput limit during the predetermined time period, setting a delay equal to the remainder of the predetermined time period and implementing the delay for an associated storage device of the computer storage subsystem.

DETAILED DESCRIPTION OF THE DRAWINGS

The present description and claimed subject matter describe exemplary system, method, and computer program product embodiments for throttling host throughput in a computer storage subsystem. These embodiments implement a timer that defines a predetermined time period in which throughput is monitored. The embodiments then monitor the throughput over a series of succeeding predetermined time periods, such as one (1) second time intervals. If an actual throughput exceeds a maximum throughput, the embodiments then set a delay equal to the remainder of an instant time period currently seen by the timer. The embodiments then institute the delay in one or more storage devices of the computer storage subsystem.

FIG. 1illustrates, in a block diagram, further details of a computing environment in accordance with implementations of the invention. Hosts2may connect to a virtual tape server (VTS)3through host data interfaces, such as Fiber Connectivity (FICON) adapters4and5or any other switching mechanism known in the art (e.g., fibre channel, Storage Area Network (SAN) interconnections, etc.). The Channel Access Device Driver (CADD)6is a device driver for tape daemons7A . . .7N. Tape daemons7A . . .7N receive read and write tape operations from hosts2. For a write operation, the tape daemons7A . . .7N receive data, create logical volumes, and write the logical volumes as files in cache, embodied as a direct access storage device (DASD)25. For read operations, the tape daemons7A . . .7N access the cache25to retrieve data through client kernel extension17and return the data to hosts2. The hosts2believe that they are communicating with physical tape drives, rather than with the tape daemons7A . . .7N, which emulate the physical tape drives. Each tape daemon7A . . .7N includes a file system manager (FSM)8A . . .8N that is used to create files in cache25.

The storage manager9transfers data from cache25to tape drives19A . . .19N. In certain implementations, the storage manager9includes multiple components, as illustrated inFIG. 1. The autonomic cache control14controls the transfer of data from cache25to tape drives19A . . .19N in response to transfer operations received from hosts2. Additionally, the autonomic cache control14controls the rate at which the tape daemons7A . . .7N write data to the cache25. In certain implementations, the autonomic cache control14performs monitoring functionality.

In particular, the autonomic cache control14receives notification from one of the hosts2to transfer data. The hosts2indicate which logical volumes (not shown) are to be placed into particular pools of tape cartridges23. The autonomic cache control14maintains metadata on which files are stored in cache25. The autonomic cache control14notifies the disk data client16to transfer data. The disk data client16requests data from the client kernel extension17, which retrieves the requested data from cache25and forwards the data to disk data client16. The disk data client16forwards the data to tape data server15at the request of the autonomic cache control14.

The tape data server controls the writing of data to tape drives19A . . .19N. The data is sent from tape data server15to A tape driver12to SCSI adaptor13and to the tape drives19A . . .19N. The tape data server15uses a library interface111to tell the library manager18which tape cartridge23is to be put into one of the tape drives19A . . .19N. The autonomic cache control14sends messages to the library manager18through the library driver10

The library manager18manages the mounting and unmounting of the tape cartridges23from the tape drives19A . . .19N. When the library manager18receives a notification to mount or unmount a tape cartridge23, the library manager18notifies the accessor21, which is used to access the tape drives19A . . .19N. The accessor21mounts and unmounts tape drives19A . . .19N.

Virtual tape servers3as well as adapters4and5may utilize hardware, software, firmware, or a combination thereof to perform various method steps as will be further described. For example, device drivers such as the CADD6may be configured to be operational on the virtual tape servers3. In one embodiment, the CADD6may be integrated into a kernel operational on the virtual tape server3. In addition, the virtual tape server3and/or adapters4and5may utilize a shared memory location in CADD6to access various data as will be further described. While the depicted embodiment illustrates virtual tape servers3integrated into a particular computing environment, one skilled in the art will appreciate that the methods and systems further described and claimed may be applied to various computer system components in a variety of configurations and compliant with various protocols.

As previously described, a timer may be implemented that defines a predetermined time period, such as one second. As the storage subsystem is operational, the timer turns over or “pops” at the conclusion of one time period and the beginning of a succeeding time period. The timer may be established in CADD. The timer may be used to set a throughput limit for the time period for a value set by a user. The throughput limit is obtained at the beginning of each time period to account for dynamic changes made to the throughput limit by the user. For example, if a customer/user decides to purchase additional throughput, a feature code may be applied while the customer is still in production (i.e., while the customer is still using the storage subsystem for an action). CADD may update this throughput limit during a succeeding time period.

In one embodiment, a global variable may be defined to represent an actual throughput seen during a particular time period. The timer may reset this variable's value depending on if the actual throughput is less than or greater than the throughput limit. If the total throughput value is found to be less than or equal to the max throughput limit, the actual throughput value for the upcoming one second period is reset to zero. However, if the actual throughput is found to be greater than the max limit throughput value, then the actual throughput for the upcoming one second period is set to the difference between the actual throughput value and the limit throughput value.

The timer may also be configured to set a period timer. The period timer may be set to start at the beginning of a predetermined time period. The period timer may then be stopped if and when the throughput limit is reached. The value of the period timer may then be used to determine a delay to be applied to I/O devices associated with the computer storage system to stop additional throughput during a respective time period. Such a delay will be further described.

Since CADD may execute in a multi-threaded environment, it is possible that the delay to stop incoming throughput may not be communicated to all devices before the next throughput requests have come through. By applying the previous period's throughput overage to the next period's actual throughput value, the code is able to account for the throughput overage and effectively manage throughput from the host.

FIG. 2is a flow chart depicting an exemplary method20of operation for a timer as previously described. Method20begins as the timer pops (step22) indicating the conclusion of a first time period and the beginning of a second, succeeding time period. In the present depiction, the time period is set to one (1) second in length. Method20then retrieves a throughput limit from a shared memory location (step24). This throughput limit may be set by a user and updated as needed (steps26,28). Updating the throughput limit may occur dynamically as previously described during the succeeding time period.

Once the throughput limit for the instant time period is retrieved from shared memory, method30then queries whether an actual throughput (measured from the communications channel) exceeds the throughput limit (decision30). The actual throughput may be measured by totaling the byte count of all records passed through the communications channel during the instant time period. For example, using the depicted embodiment ofFIG. 1, as throughput is processed during the one second period, the host adapter may send records to CADD that contain the length of the data in bytes. The bytes are added to the actual throughput value in order to keep track of how much throughput is to be processed. The value of actual throughput value is then compared to the value of the max throughput limit value. If actual throughput value is greater than or equal to max throughput limit value, the code stops the period timer as will be described below.

If the actual throughput exceeds the throughput limit, then the actual throughput for the upcoming one second period is set to the difference between the actual throughput value and the limit throughput value (step32) as previously described. If however, the total throughput value is found to be less than or equal to the max throughput limit, the actual throughput value for the upcoming one second period is reset to zero (step34) as previously described. In either case, at the beginning of the time period, the period timer runs up to if and when the throughput limit is exceeded (step36). If the throughput limit is not exceeded, then the value of the period timer equals the predetermined time period, and starts over again at the beginning of the succeeding time period. As the remainder of the predetermined time period (in this case, one second) passes, the timer sleeps and ultimately returns to step22when the timer pops again.

The difference of the period timer's value at the end of the predetermined time period compared to the value of the beginning of the predetermined time period represents how much time has elapsed before the throughput limit had been reached. This difference is subtracted from one second (in the exemplary embodiment) and the result represents the amount of time to delay the devices. The result represents the portion of the predetermined time period remaining when the throughput limit is exceeded. The amount of delay, in nanoseconds, is stored. As long as the value of the delay is greater than zero, notification of the delay will be passed on in the CADD's response to the host adapter, as incoming messages from the devices are received in CADD.

FIGS. 3 and 4, following, are flow chart diagrams of exemplary methods of operation of various aspects of the storage subsystem depicted inFIG. 1as part of an overall system, method and computer program product for throttling host throughput. The functionality of host adapters4and5(FIG. 1) are designated as shown. The functionality of virtual tape server3incorporating CADD6(againFIG. 1) is designated. However, one skilled in the art will appreciate that various other computer and storage components may be utilized to implement aspects of the depicted methods.

In light of the foregoing,FIG. 3is a flow chart diagram of an exemplary method40of operation for monitoring throughput and setting a delay. As a first step in method40, the adapter device sends an I/O message to CADD (step42). The I/O message may be a read or a write I/O instruction, for example. The CADD receives the adapter device message (step44). The actual throughput value is measured by examining the records sent over the channel and is denoted as ACTUAL_THROUGHPUT (step46). The actual throughput value is compared to a throughput limit value denoted as MAX_LIMIT (decision48). If the actual throughput value exceeds the throughput limit, the period timer is stopped, the DELAY value is set to the remainder of the instant predetermined time period, a THROTTLE flag is set to true and a DEVICE_DELAY value is set to the calculated DELAY value (step50). Such a flag will be further described. If the actual throughput value does not exceed the throughput limit, the system continues normal message processing (step52). In either case, the message response (including the THROTTLE flag setting and DEVICE_DELAY value) is sent to the adapter (step54).

The adapter receives the CADD response (step56) including the THROTTLE flag setting and DEVICE_DELAY values. The adapter then queries if the THROTTLE flag is set (decision58). If so, the adapter handles the delay. The adapter institutes a command channel retry (CCR) for the channel which will be further described. The adapter delays all I/O of the associated storage device for the DELAY_DEVICE amount of time. Finally, the adapter is configured to send a Device End message to the host once the delay expires. The adapter then continues response processing (step60). If the THROTTLE flag is not set (again decision58), the system continues normal response processing (step62).

In order to notify the adapter that a delay is in effect, the CADD code must set flags to indicate no further throughput is allowed in the response messages to the adapter. Additionally, CADD must also communicate to the adapter the amount of time to delay in this response. CADD may be configured to send the delay flag and time in the response to the adapter by checking the delay in effect flag while processing the device request. When the delay is in effect, CADD may be configured to respond to the adapter immediately without processing throughput.

When an adapter receives a response from CADD, it will check if the delay flag (e.g., THROTTLE flag) is set for the associated storage device. If the delay is in effect, the adapter will delay any further activity on the device for the time specified in the response message from CADD. The adapter sends the CCR command to the channel and after the delay is complete, the adapter will send device end status to the host. The above process has the effect of holding off any further throughput until the beginning of the succeeding time period.

In light of the foregoing,FIG. 4is a flow chart diagram of an exemplary method70to institute a delay. Again, various steps associated with the adapter and CADD is indicated. Method70begins by the adapter sending an I/O message to CADD (step72). CADD receives the message (step74). CADD queries whether the calculated DELAY value is greater than zero (0) (decision76). If this is the case, the CADD constructs a throttle response for the adapter by setting the THROTTLE flag to true and setting the DEVICE_DELAY value to the calculated DELAY value (step78). If DELAY is not greater than zero, the system continues normal message processing (step80). The CADD then sends the message response to the adapter (including the THROTTLE flag and DEVICE_DELAY value) (step82).

Once the response is received by the adapter (step84), the adapter queries if the THROTTLE flag is set to true (decision86). If yes, the adapter handles the delay for the associated storage device, CCRs the channel, delays all I/O of the associated storage device for the DEVICE_DELAY amount of time, and sends a Device End to the host once the delay expires. The adapter continues message processing (step88). If the THROTTLE flag is not set to true (again, decision86), the adapter continues normal response processing (step90).