The subject matter of this disclosure is generally related to data storage, and more particularly to SANs (storage area networks).
Data centers are used to maintain large data sets associated with critical functions for which avoidance of data loss and maintenance of data availability are important. A key building block of a data center is the SAN. SANs provide host servers with block-level access to data that is used by applications that run on the host servers. One type of SAN node is a storage array. A storage array may include a network of computing nodes that manage access to arrays of solid-state drives and disk drives. The storage array creates a logical storage device known as a production volume on which host application data is stored. The production volume has contiguous LBAs (logical block addresses). The host servers send block-level IO (input-output) commands to the storage array to access the production volume. The production volume is a logical construct, so the host application data is maintained at non-contiguous locations on the arrays of managed drives to which the production volume is mapped by the computing nodes. SANs have advantages over other types of storage systems in terms of potential storage capacity and scalability. However, no single SAN caching policy provides the best performance for all workloads and configurations.
All examples, aspects and features mentioned in this document can be combined in any technically possible way.
In accordance with some implementations a method comprises: with an agent running on a SAN (storage area network) node, adjusting at least one parameter of a caching policy of the SAN node by: generating a record of operation of the SAN node; generating a caching model based on the record; and adjusting the parameter based on the caching model. In some implementations generating the record of operation of the SAN node comprises generating a structured state index. Some implementations comprise updating the structured state index over time, thereby generating an updated structured state index. Some implementations comprise adjusting the parameter based on the caching model and the updated structured state index. In some implementations generating the caching model based on the record comprises obtaining state vectors from the structured state index. In some implementations generating the caching model based on the record comprises generating hit rate distribution vectors from IO traces. In some implementations generating the caching model based on the record comprises building a design matrix that represents a history of access to a production volume. In some implementations generating the caching model based on the record comprises building a target matrix that represents actual hit rate as a function of look-ahead based on simulations. In some implementations generating the caching model based on the record comprises building a matrix that represents predicted hit rate as a function of look-ahead which is compared with the target matrix. In some implementations adjusting the parameter based on the caching model comprises calculating a baseline regularized reward that quantifies a performance improvement in a state feature from adjusting the parameter, choosing a parameter value that maximizes the performance improvement, and outputting an action associated with the chosen parameter.
In accordance with some implementations an apparatus comprises: a SAN (storage area network) node comprising: a plurality of managed drives; a plurality of computing nodes that create a logical production volume based on the managed drives; and a direct-learning agent comprising: instructions that generate a record of operation of the SAN node; instructions that generate a caching model based on the record; and instructions that adjust the parameter based on the caching model. In some implementations the instructions that generate the record of operation of the SAN node comprise instructions that generate a structured state index. Some implementations comprise instructions that update the structured state index over time, thereby generating an updated structured state index. Some implementations comprise instructions that adjust the parameter based on the caching model and the updated structured state index. In some implementations the instructions that generate the caching model based on the record comprise instructions that obtain state vectors from the structured state index. In some implementations the instructions that generate the caching model based on the record comprise instructions that generate hit rate distribution vectors from IO traces. In some implementations the instructions that generate the caching model based on the record comprise instructions that build a design matrix that represents a history of access to a production volume. In some implementations the instructions that generate the caching model based on the record comprise instructions that build a target matrix that represents actual hit rate as a function of look-ahead based on simulations. In some implementations the instructions that generate the caching model based on the record comprise instructions that build a matrix that represents predicted hit rate as a function of look-ahead which is compared with the target matrix. In some implementations the instructions that adjust the parameter based on the caching model comprise instructions that calculate a baseline regularized reward that quantifies a performance improvement in a state feature from adjusting the parameter, choose a parameter value that maximizes the performance improvement, and output an action associated with the chosen parameter.
Other aspects, features, and implementations may become apparent in view of the detailed description and figures.
Aspects of the inventive concepts will be described as being implemented in a data storage system that includes a host server and storage array. Such implementations should not be viewed as limiting. Those of ordinary skill in the art will recognize that there are a wide variety of implementations of the inventive concepts in view of the teachings of the present disclosure.
Some aspects, features, and implementations described herein may include machines such as computers, electronic components, optical components, and processes such as computer-implemented procedures and steps. It will be apparent to those of ordinary skill in the art that the computer-implemented procedures and steps may be stored as computer-executable instructions on a non-transitory computer-readable medium. Furthermore, it will be understood by those of ordinary skill in the art that the computer-executable instructions may be executed on a variety of tangible processor devices, i.e. physical hardware. For ease of exposition, not every step, device, or component that may be part of a computer or data storage system is described herein. Those of ordinary skill in the art will recognize such steps, devices, and components in view of the teachings of the present disclosure and the knowledge generally available to those of ordinary skill in the art. The corresponding machines and processes are therefore enabled and within the scope of the disclosure.
The terminology used in this disclosure is intended to be interpreted broadly within the limits of subject matter eligibility. The terms “logical” and “virtual” are used to refer to features that are abstractions of other features, e.g. and without limitation abstractions of tangible features. The term “physical” is used to refer to tangible features that possibly include, but are not limited to, electronic hardware. For example, multiple virtual computing devices could operate simultaneously on one physical computing device. The term “logic” is used to refer to special purpose physical circuit elements, firmware, software, computer instructions that are stored on a non-transitory computer-readable medium and implemented by multi-purpose tangible processors, and any combinations thereof.
The following terms in quotation marks have the indicated meanings within this description. A “caching policy” is a group of settings that determine which data to copy into shared memory from managed drives and which data to evict from the shared memory to the managed drives. A “parameterized caching policy” is a caching policy that includes parameters with values that can be adjusted without interrupting regular operation of the SAN. “LRU” (least recently used) is an aspect of a caching policy that causes the least recently used extent of host application data to be evicted from the shared memory when a new extent that is not in the shared memory is the subject of an access operation and the shared memory is “full” in accordance with some predetermined characteristics. A “LRU-look-ahead caching policy” is a caching policy that includes a look-ahead parameter, such as prefetch size, that can be dynamically adjusted. Prefetch size represents the number of additional extents to be retrieved from the managed drives, where the additional extents are contiguously stored (on a production volume or the managed drives) with one or more extents accessed by a given TO command. An extent may be a predetermined basic allocation unit such as a slot or track, for example, and without limitation. Consequently, an TO that accesses a specific slot or track would result in copying that slot or track into shared memory along with the n slots or tracks that are contiguously stored with the accessed slot or track if the prefetch size is n. A “SLRU (segmented LRU) caching policy” is a caching policy in which the shared memory is divided in two regions: probationary and protected. The probationary region is used store extents of host application data that have been requested only once in a given time epoch, whereas the protected region is used to store all other extents. An “alpha parameter” denotes the fraction, ratio or portion of the shared memory reserved for probationary items. The alpha parameter can be dynamically adjusted based on learned access patterns. An “IO trace” or “trace” is a sequence of addresses and lengths that describes sequential accesses to managed drives or a production volume. An “SLRU-look-ahead policy” is a caching policy that includes adjustable look-ahead and alpha parameters.
The managed drives 101 are not discoverable by the hosts but the SAN node 100 creates a logical storage device 140 that can be discovered and accessed by the hosts. The logical storage device is used by host applications for storage of host application data. Without limitation, the logical storage device may be referred to as a production volume, production device, or production LUN, where LUN (Logical Unit Number) is a number used to identify the logical storage volume in accordance with the SCSI (Small Computer System Interface) protocol. From the perspective of the hosts the logical storage device 140 is a single drive having a set of contiguous fixed-size logical block addresses (LBAs) on which data used by instances of the host application resides. However, the host application data is stored at non-contiguous addresses on various managed drives 101.
To service IOs from instances of a host application the SAN node 100 maintains metadata that indicates, among various things, mappings between LBAs of the logical storage device 140 and addresses with which extents of host application data can be accessed from the shared memory and managed drives 101. In response to a data access command from an instance of the host application to read data from the production volume 140 the SAN node uses the metadata to find the requested data in the shared memory or managed drives. When the requested data is already present in memory when the command is received it is considered a “cache hit.” When the requested data is not in the shared memory when the command is received it is considered a “cache miss.” In the event of a cache miss the accessed data is temporarily copied into the shared memory from the managed drives and used to service the IO, i.e. reply to the host application with the data via one of the computing nodes. In the case of an IO to write data to the production volume the SAN node copies the data into the shared memory, marks the corresponding logical storage device location as dirty in the metadata, and creates new metadata that maps the logical storage device address with a location to which the data is eventually written on the managed drives. Read and write “hits” and “misses” occur depending on whether the stale data associated with the IO is present in the shared memory when the IO is received. The relationship between hits and misses may be referred to as the “cache hit rate.”
The caching policy 103 is implemented by the computing nodes 112, 114 to determine which data to copy into the shared memory from the managed drives and which data to evict from shared memory to the managed drives. Consequently, the cache hit rate is at least in part a function of the caching policy. Some aspects of the caching policy may be static. For example, the caching policy may always evict the least recently used host application data from the shared memory. Some parameters of the caching policy are adjustable. For example, the prefetch size may be a look-ahead parameter value that indicates the amount of data to be copied from the managed drives into the shared memory in a prefetch operation. A prefetch size value that is too small may result in delays associated with subsequently copying needed non-prefetched data into memory, whereas a prefetch size value that is too large may cause instabilities and performance degradation because of inefficient use of processing and memory resources to prefetch data that isn't needed. Optimal sizing of the prefetch value may vary over time and differ between SAN nodes because of different configurations and time-varying workloads. As will be described below, the direct-learning agent 101 dynamically updates at least some of the adjustable caching policy parameters while the SAN node is in operation.
The state index structuring process 302 extracts meaningful information from the raw data and outputs a structured state index 304 with state features that correlate with adjustable parameters of the caching policy, e.g. a state feature such as cache hit rate that correlates with an adjustable caching policy parameter such as prefetch size. The structured state index is computed periodically, for example once every few seconds or every hundred milliseconds, and each index within the structured state index is a vector describing the operational state of the SAN node at that point in time. As shown in
Specific examples have been presented to provide context and convey inventive concepts. The specific examples are not to be considered as limiting. A wide variety of modifications may be made without departing from the scope of the inventive concepts described herein. Moreover, the features, aspects, and implementations described herein may be combined in any technically possible way. Accordingly, modifications and combinations are within the scope of the following claims.