PATH SELECTION TO READ OR WRITE DATA
In one aspect, a method includes determining a number of read blocks pending for each path from a host to a logical device, determining a number of write blocks pending for each path from the host to the logical device, determining one or more factors associated with time for each path from the host to the logical device and selecting a path from the host to the logical device to read or write data using the number of read blocks pending, the number of write blocks pending and the one or more factors associated with time.
This application claims priority to Russian Patent Application number 2013156784, filed Dec. 20, 2013, and entitled “PATH SELECTION TO READ OR WRITE DATA,” which is incorporated herein by reference in its entirety.
BACKGROUNDA path management product may be used to provide management of multiple paths that run from an application to storage devices. A path management product is typically a host-based solution that is used to manage storage area networks (SANs) and, among other things, can detect load imbalances for disk array controllers in a SAN and can identify alternate paths through which to route data. An example of path management product is EMC® POWERPATH® by EMC Corporation of Hopkinton, Mass.
SUMMARYIn one aspect, a method includes determining a number of read blocks pending for each path from a host to a logical device, determining a number of write blocks pending for each path from the host to the logical device, determining one or more factors associated with time for each path from the host to the logical device and selecting a path from the host to the logical device to read or write data using the number of read blocks pending, the number of write blocks pending and the one or more factors associated with time.
In another aspect, an apparatus includes electronic hardware circuitry configured to determine a number of read blocks pending for each path from a host to a logical device, determine a number of write blocks pending for each path from the host to the logical device, determine one or more factors associated with time for each path from the host to the logical device and select a path from the host to the logical device to read or write data using the number of read blocks pending, the number of write blocks pending and the one or more factors associated with time.
An article includes a non-transitory computer-readable medium that stores computer-executable instructions. The instructions cause a machine to determine a number of read blocks pending for each path from a host to a logical device, determine a number of write blocks pending for each path from the host to the logical device, determine one or more factors associated with time for each path from the host to the logical device and select a path from the host to the logical device to read or write data using the number of read blocks pending, the number of write blocks pending and the one or more factors associated with time.
One of more of the aspects above may include one or more of the following features. Determining one or more factors associated with time for each path from the host to the logical device may include determining a weighted average time to read a single block for each path from the host to the logical device and determining a weighted average time to write a single block for each path from the host to the logical device. A feature that include determining an expected wait time for each path from the host to the logical device using the weighted average time to read a single block and the weighted average time to write a single block and selecting the path from the host to the logical device includes selecting a path with the least expected wait time. Determining the weighted average time to read a single block for each path includes determining a weighted average time to read a single block for last N blocks read and determining a weighted average time to write a single block for each path includes determining a weighted average time to write a single block for each path for last N blocks written, where N is an integer greater than 1. Determining one or more factors associated with time for each path from the host to the logical device includes determining a total path weight using a blocks per time interval value, and wherein selecting the path from the host to the logical device includes selecting a path with the least total path weight. Determining a total path weight includes determining a product of a sum of the number of I/Os pending, the number of read blocks pending and the number of write blocks pending and a path weight of a path.
Described herein are techniques to select a path to read or write data. In some examples the techniques include using a number of read blocks pending and a number of write blocks pending to select a path. In other examples, a weighted average time taken for reading a single block and a weighted average time taken for writing may also be used to select a path. In further examples, a path weight based on a blocks per time interval rate may also be used to select a path.
The following definitions may be useful in understanding the specification and claims.
HOST—at least one computer or networks of computers that runs at least one data processing application that issues I/O requests to one or more storage systems; a host is an initiator with a SAN;
I/O REQUEST—an input/output request (sometimes referred to as an I/O), which may be a read I/O request (sometimes referred to as a read request or a read) or a write I/O request (sometimes referred to as a write request or a write);
READ BLOCKS—blocks to be read from; and
WRITE BLOCKS—blocks to be written to.
Referring to
The host 102 includes an application 104, a path manager 106, host base adapter (HBA) drivers (e.g., a HBA driver 108a, a HBA driver 108b, a HBA driver 108c and a HBA driver 108d), and HBAs (e.g., a HBA 112a, a HBA 112b, a HBA 112c and a HBA driver 112d).
The path manager 106 determines which path to send an I/O from the application 104. For example, if an application is performing a read operation (i.e., sending a read I/O) on blocks in the first logical device 118a, path selector will determine which paths of the first path set 116a to use (i.e., choosing path 114a or choosing the path 114b). If the path 114a is chosen, the I/O read in this example is sent to the HBA driver 108a. From the HBA driver 108 the I/O read goes to the HBA 112a and then to the path 114a and finally to the first logical device 118a.
Referring to
Process 200 determines a number of read blocks pending (202) and a number of write blocks pending (204) for each path.
Process 200 determines, for each path, a weighted average time for reading a single block (206) and determines, for each path, a weighted average time for reading a single block (210). In some examples, the weighted average time for reading a single block uses the last N blocks read and the weighted average time for writing a single block uses the last N block written, where N is an integer greater than zero.
In some particular examples, the weighted average time for reading a single block using the last N blocks read and the weighted average time for writing a single block using the last N block written may each be determined as a weighted average where more weight is given to the more recent blocks read or written respectively. For example, the weighted average time for reading a single block using the last N blocks read may be equal to:
(wt1*R1+wt2*R2+ . . . +wtN*RN)/(wt1+wt2+ . . . +wtN)
where R1, R2, . . . , RN are the actual reading time of the last N blocks in chronological order where R1 is the most recent one read and RN is the oldest one read, and wt1, wt2, . . . , wtN are real numbers where wt1>wt2> . . . >wtN.
In another example, the weighted average time for writing a single block using the last N blocks written may be equal to:
(wt1*W1+wt2*W2+ . . . +wtN*WN)/(wt1+wt2+ . . . +wtN)
where W1, W2, . . . , WN are the actual writing time of the last N blocks in chronological order where W1 is the most recent one written and WN is the oldest one written, and wt1, wt2, . . . , wtN are real numbers where wt1>wt2> . . . >wtN.
Process 200 determines an expected wait time for each path (218). For example, the expected wait time, EWT is equal to:
EWT=ART*RN+AWT*WN,
ART is the weighted average time for reading a single block using the last N blocks read, AWT is the weighted average time for writing a single block using the last N blocks written, RN is equal to a number of pending read blocks and WN is equal to a number of pending write blocks.
Process 200 selects the path with the lowest expected wait time (222).
Referring to
Process 300 sleeps for a time interval (302). Process determines blocks per time interval rate (BPTI(n)) for each path n (306) and determines the maximum value BPTI rate among all paths (MBPTI) (312). In one example, the time interval is a configurable value that may be chosen by a user.
Process 300 determines path weight (PW(n)) based on MBPTI and BPTI(n) for each path (n) (316). For example, a maximum blocks per time interval value, MBPTI, is determined for all paths. A path weight is determined for each path where a path weight for a path n, PW(n), is equal to:
MBTI/BPTI(n),
where is BPTI(n) is the blocks per time interval value for a path n, where n is an integer greater than 1.
Process 350 goes to the first path (n=1) (352). Process 350 determines a number of read blocks pending (354), determines a number of write blocks pending (358) and determines a number of pending I/Os (362).
Process 350 determines a path weight for the path (368). For example, the path weight determined in processing block 316 for this path is used.
Process 350 determines the total path weight for the path (372). For example, the total weight for a path n, TW(n) is equal to:
PW(n)*(NIO+RN+RW),
where NIO is equal to the number of I/Os pending, RN is equal to a number of pending read blocks and WN is equal to a number of pending write blocks.
Process 350 determines if there is another path left to evaluate (380) and if there is process 350 goes to the next path (n=n+1) (382).
If there are no more paths to evaluate, process 350 selects the path with the lowest total path weight (384).
Referring to
The processes described herein (e.g., processes 200, 300 and 350) are not limited to use with the hardware and software of
The system may be implemented, at least in part, via a computer program product, (e.g., in a non-transitory machine-readable storage medium such as, for example, a non-transitory computer-readable medium), for execution by, or to control the operation of; data processing apparatus (e.g., a programmable processor, a computer, or multiple computers)). Each such program may be implemented in a high level procedural or object-oriented programming language to communicate with a computer system. However, the programs may be implemented in assembly or machine language. The language may be a compiled or an interpreted language and it may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program may be deployed to be executed on one computer or on multiple computers at one site or distributed across multiple sites and interconnected by a communication network. A computer program may be stored on a non-transitory machine-readable medium that is readable by a general or special purpose programmable computer for configuring and operating the computer when the non-transitory machine-readable medium is read by the computer to perform the processes described herein. For example, the processes described herein may also be implemented as a non-transitory machine-readable storage medium, configured with a computer program, where upon execution, instructions in the computer program cause the computer to operate in accordance with the processes. A non-transitory machine-readable medium may include but is not limited to a hard drive, compact disc, flash memory, non-volatile memory, volatile memory, magnetic diskette and so forth but does not include a transitory signal per se.
The processes described herein are not limited to the specific examples described. For example, the processes 200, 300 and 350 are not limited to the specific processing order of
The processing blocks (for example, in the processes 200 and 300) associated with implementing the system may be performed by one or more programmable processors executing one or more computer programs to perform the functions of the system. All or part of the system may be implemented as, special purpose logic circuitry (e.g., an FPGA (field-programmable gate array) and/or an ASIC (application-specific integrated circuit)). All or part of the system may be implemented using electronic hardware circuitry that include electronic devices such as, for example, at least one of a processor, a memory, a programmable logic device or a logic gate.
Elements of different embodiments described herein may be combined to form other embodiments not specifically set forth above. Other embodiments not specifically described herein are also within the scope of the following claims.
Claims
1. A method comprising:
- determining a number of read blocks pending for each path from a host to a logical device;
- determining a number of write blocks pending for each path from the host to the logical device;
- determining one or more factors associated with time for each path from the host to the logical device; and
- selecting a path from the host to the logical device to read or write data using the number of read blocks pending, the number of write blocks pending and the one or more factors associated with time.
2. The method of claim 1 wherein determining one or more factors associated with time for each path from the host to the logical device comprises:
- determining a weighted average time to read a single block for each path from the host to the logical device;
- determining a weighted average time to write a single block for each path from the host to the logical device.
3. The method of claim 2 further comprising determining an expected wait time for each path from the host to the logical device using the weighted average time to read a single block and the weighted average time to write a single block.
- wherein selecting the path from the host to the logical device comprises selecting a path with the least expected wait time.
4. The method of claim 2 wherein determining the weighted average time to read a single block for each path comprises determining a weighted average time to read a single block for last N blocks read, and
- wherein determining a weighted average time to write a single block for each path comprises determining a weighted average time to write a single block for each path for last N blocks written, where N is an integer greater than 1.
5. The method of claim 1 wherein determining one or more factors associated with time for each path from the host to the logical device comprises determining a total path weight using a blocks per time interval value, and
- wherein selecting the path from the host to the logical device comprises selecting a path with the least total path weight.
6. The method of claim 5 wherein determining a total path weight comprises determining a product of a sum of the number of I/Os pending, the number of read blocks pending and the number of write blocks pending and a path weight of a path.
7. An apparatus, comprising:
- electronic hardware circuitry configured to: determine a number of read blocks pending for each path from a host to a logical device; determine a number of write blocks pending for each path from the host to the logical device; determine one or more factors associated with time for each path from the host to the logical device; and select a path from the host to the logical device to read or write data using the number of read blocks pending, the number of write blocks pending the one or more factors associated with time.
8. The apparatus of claim 7, wherein the circuitry comprises at least one of a processor, a memory, a programmable logic device or a logic gate.
9. The apparatus of claim 7 wherein the circuitry configured to determine one or more factors associated with time for each path from the host to the logical device comprises circuitry configured to:
- determine a weighted average time to read a single block for each path from the host to the logical device;
- determine a weighted average time to write a single block for each path from the host to the logical device.
10. The apparatus of claim 9, further comprising circuitry configured to determine an expected wait time for each path from the host to the logical device using the weighted average time to read a single block and the weighted average time to write a single block.
- wherein circuitry configured to select the path from the host to the logical device comprises circuitry configured to select a path with the least expected wait time.
11. The apparatus of claim 9 wherein the circuitry configured to determine the weighted average time to read a single block for each path comprises circuitry configured to determine a weighted average time to read a single block for last N blocks read, and
- wherein the circuitry configured to determine a weighted average time to write a single block for each path comprises circuitry configured to determine a weighted average time to write a single block for each path for last N blocks written, where N is an integer greater than 1.
12. The apparatus of claim 7 wherein the circuitry configured to determine one or more factors associated with time for each path from the host to the logical device comprises circuitry configured to determine a total path weight using a blocks per time interval value, and
- wherein the circuitry configured to select the path from the host to the logical device comprises circuitry configured to select a path with the least total path weight.
13. The apparatus of claim 12 wherein the circuitry configured to determine a total path weight comprises circuitry configured to determine a product of a sum of the number of I/Os pending, the number of read blocks pending and the number of write blocks pending and a path weight of a path.
14. An article comprising:
- a non-transitory computer-readable medium that stores computer-executable instructions, the instructions causing a machine to: determine a number of read blocks pending for each path from a host to a logical device; determine a number of write blocks pending for each path from the host to the logical device; determine one or more factors associated with time for each path from the host to the logical device; and select a path from the host to the logical device to read or write data using the number of read blocks pending, the number of write blocks pending the one or more factors associated with time.
15. The article of claim 14 wherein the instructions causing the machine to determine one or more factors associated with time for each path from the host to the logical device comprises instructions causing the machine to:
- determine a weighted average time to read a single block for each path from the host to the logical device;
- determine a weighted average time to write a single block for each path from the host to the logical device.
16. The article of claim 15, further comprising instructions causing the machine to determine an expected wait time for each path from the host to the logical device using the weighted average time to read a single block and the weighted average time to write a single block.
- wherein instructions causing the machine to select the path from the host to the logical device comprises instructions causing the machine to select a path with the least expected wait time.
17. The article of claim 15 wherein the instructions causing the machine to determine the weighted average time to read a single block for each path comprises instructions causing the machine to determine a weighted average time to read a single block for last N blocks read, and
- wherein the instructions causing the machine to determine a weighted average time to write a single block for each path comprises instructions causing the machine to determine a weighted average time to write a single block for each path for last N blocks written, where N is an integer greater than 1.
18. The article of claim 14 wherein the instructions causing the machine to determine one or more factors associated with time for each path from the host to the logical device comprises instructions causing the machine to determine a total path weight using a blocks per time interval value, and
- wherein the instructions causing the machine to select the path from the host to the logical device comprises instructions causing the machine to select a path with the least total path weight.
19. The article of claim 17 wherein the instructions causing the machine to determine a total path weight comprises instructions causing the machine to determine a product of a sum of the number of I/Os pending, the number of read blocks pending and the number of write blocks pending and a path weight of a path.
Type: Application
Filed: Jul 11, 2014
Publication Date: Jun 25, 2015
Patent Grant number: 9569132
Inventors: Amrita Sadhukhan (West Bengal), Mikhail Borisov (Saint-Petersburg)
Application Number: 14/329,336