The present invention relates generally to large computer networks and, in particular, to accumulating statistics related to the performance of links associated with ports connected to the network.
In large data network environments, it is important to be able to obtain statistics about the performance of input/output (I/O) operations on the physical network, such as the links which connected ports of different network devices. Statistics of interest can include the number of I/O operations a link can handle (in operations per second); the bandwidth of a link (in megabytes (MB) per second); the average number of concurrent operations using a link during a time period; the average transfer length (in MB/operation); and the average link utilization per operation (in micro-seconds/operation).
Such statistics may be used in real time to trigger fault procedures if a large variance from a normal value indicates the existence of a possible problem. Statistics may also kept in a log to be referenced during normal maintenance or problem resolution. Typically, statistics may be calculated by a network server, such as an Enterprise Storage Server® (ESS) sold by IBM® and may be maintained by one or more attached host devices. However, due to the large number of links between components in a network, collecting data and sampling the collected data to compute statistics can consume a large amount of valuable network resources. Consequently, it is desirable to provide for more efficient data collection and statistic generation.
Moreover, each device port may include more than one link type, such as ECKD™ (extended count key data), PPRC (peer-to-peer remote copy), and SCSI (small computer system interface). Consequently, it is desirable to generate statistics on a link type basis to provide a higher level of detail than generating statistics only by port.
The present invention provides computer networks with an ability to efficiently generate link performance statistics. To calculate the average link utilization per I/O operation, a first counter accumulates the number of I/O operations processed by a link and a second counter accumulates the time required by the link to complete each I/O operation. The second value is then divided by the first value. The number of operations per second for a link may be computed by dividing the first number by a predetermined period of time and the average number of operations using the link may be computed by dividing the second number by the predetermined period of time. A third counter may be employed to accumulate the number of bytes transferred by a link during each I/O operation. Then, the average size of an I/O operation may be computed by dividing the third number by the first number and the average bandwidth per link operation may be computed by dividing the third number by the predetermined period of time. Separate sets of counters are preferably associated with each of several link types associated with a single port, thereby allowing separate statistics to be generated for each link type. The generated statistics are useful for such activities as problem resolution, load balancing and capacity planning.
For each link of each port, there are preferably three corresponding counters in the controller 110. A first counter provides an accumulated count of the number of I/O operations processed through the link. A second counter provides the accumulated utilization time (in microseconds or other appropriate unit of time) associated with each I/O operation. And, a third counter provides an accumulated bandwidth comprising the number of bytes transferred by each I/O operation through the link. The utilization time indicates how long a port processor is active with a particular I/O operation and is useful in determining the port's contribution to any delay. Using only the three counters for each port reduces the processing resources required for obtaining performance statistics. From the three counters, a variety of statistics may be computed.
Before statistics can be computed, the counters must be sampled. A time period AT is selected, such as by pre-programming the controller 110, by action of a host device, by a network administrator or by a maintenance technician. The time periods selected for each of the three counters are preferably the same. The time period selected should be long enough to provide meaningful values but not so long that a counter overflows and wraps around to 0 before the end of the period. The time period must also be selected according to the data rate of the link. For example, one user may wish to sample rapidly at the rate of approximately ΔT equals one second while another user may wish to sample more slowly at the rate of ΔT equals 30 minutes. Thus, the counters should be of sufficient size to allow for both one second sampling and 30 minute sampling without overflowing. A counter capacity of 128K allows for measurement of one second samples with link data rates as low as 128 KB/sec. while also allowing measurement of 30 minute samples with link data rates of 150 GB/sec. While larger counter capacities will accommodate longer sampling periods, larger counters require the use of more hardware. Four-byte counters have been found to accommodate a wide range of link data rates and sampling rates.
In operation, each counter is sampled first at the beginning of the selected time period and then at the end of the period, thereby providing a delta value for each. Initial and final readings of the first counter provide a count ΔA of the number of I/O operations processed through the link during the period ΔT. Initial and final readings of the second counter provide third counter provide the utilization time ΔB associated with I/O operations during the period ΔT. And, initial and final readings of the bandwidth ΔC of the link during the period ΔT. The statistics may then be computed by the controller 110:
If desired, separate counters may be included in the controller 110 to track read operation data separate from write operation data for each link, such as: number of read operations and of write operations; number of bytes read and bytes written; and the response time for read operations and for write operations.
The objects of the invention have been fully realized through the embodiments disclosed herein. Those skilled in the art will appreciate that the various aspects of the invention may be achieved through different embodiments without departing from the essential function of the invention. The particular embodiments are illustrative and not meant to limit the scope of the invention as set forth in the following claims.