This application is related to and claims the benefit of priority to Japanese Patent Application No. 2009-192800, filed on Aug. 24, 2009, the entire contents of which are incorporated herein by reference.
Embodiments discussed herein relate to a cache control technology applicable to storages.
Object-based storage systems are known as storage systems standardized by the American National Standards Institute (ANSI) T10. Block-based storage systems are known as storage systems that manage data in units different from those of object-based storage systems. Hereafter, a block-based storage system and an object-based storage system will be outlined.
As illustrated in
As illustrated in
In a case where data to be accessed is composed of continuing blocks or in a case where an entire volume is to be read, such a prefetch function allows the higher-level device 91 to access data present in the cache memory 921. This increases the speed at which the storage system returns data in response to read requests from the higher-level device.
Also, in the block-based storage system 7, upon receiving a request for writing of data from the higher-level device 91, the storage control device 92 caches the data in the storage control device 92. In this case, the cache memory 921 has a smaller capacity than that of the storage device 93. Accordingly, the storage control device 92 uses an algorithm for removing cached data, such as an LRU (least recently used) or MRU (most recently used). Hereafter, a cached-data removal algorithm will be outlined using an LRU as an example.
As illustrated in
As illustrated in
However, the data removed from the cache memory 921 according to the above-mentioned algorithm may be updated by the higher-level device 91. In this case, the storage control device 92 must again read the removed data from the storage device 93 into the cache memory 921. This problem occurs because the storage control device 92 cannot grasp the configuration of data handled by the higher-level device 91.
Further, the object-based storage system 8 manages data handled by the higher-level device 91 on an object basis; it performs cache control on a block basis. Accordingly, the object-based storage system 8 also has the same problem as that with the block-based storage system 7. Stated differently, conventionally, data cached within a cached memory is not managed based on an object ID or configuration information even in a conventional object-based storage system.
That is, the above-mentioned storage system again reads the data, which has been removed from the cache memory 921 into the storage device, from the storage device 93 into the cache memory 921.
A storage system includes, a storage device that stores data, a cache memory that caches the data, an information storage unit that stores data configuration information indicating a configuration of the data and state information indicating a cache state of the data in the cache memory, a candidate data selection unit that, according to the state information, selects candidate data from the data cached in the cache memory, the candidate data being a candidate for data to be written into the storage device, a first determination unit that, according to the data configuration information, makes a determination as to whether data relating to the candidate data is cached in the cache memory, and a data-to-be-written selection unit that, according to the determination made by the first determination unit, selects data to be written into the storage device, from the data cached in the cache memory.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed. These together with other aspects and advantages which will be subsequently apparent, reside in the details of construction and operation as more fully hereinafter described and claimed, reference being had to the accompanying drawings forming a part hereof, wherein like numerals refer to like parts throughout.
First, the hardware configuration of a storage system according to an embodiment will be described.
As illustrated in
Each CM (e.g., cache control device) 121 includes a central processing unit (CPU) 121a, a cache memory 121b, multiple channel adapters (CAs) 122, and multiple device interfaces (DIs) 123 and performs cache control, RAID control, and resource management on the storage device 11. Each CA 122 is an interface at which the corresponding CM 121 transmits or receives data to or from the corresponding higher-level device 13. In this embodiment, multiple CAs 122 are used for connection with a single higher-level device 13. Each DI 123 is an interface at which the corresponding CM 121 transmits or receives data to or from the storage device 11. Each CPU 121a controls the corresponding cache memory 121b, CAs 122, and DIs 123.
The FRTs 124 relay the connections between the multiple CMs 121. The BRTs 125 relay the connections between the multiple CMs 121 and multiple DEs 111. It is assumed that the FRTs 124 and BRTs 125 are redundant and that the execution systems and standby systems thereof are connected to the relay targets via different paths.
Next, control information will be described.
As illustrated in
Among other things, a storage system in which object IDs are implemented as further described below provides an increased recognition of a relationship among data in the cache memory by managing the data in the cache memory with the object IDs. Accordingly, the storage system may have an improved cache hit rate when data reading request is received from a higher-level device.
The valid/invalid indicates whether an object identified by each object ID is valid, that is, whether there exists an object corresponding to each object ID. In the valid/invalid, “0” indicates invalid and “1” indicates valid. The distribution number represents the number of sections where blocks of an object are continuously arranged. The cache state indicates whether each object is cached in the cache memory 121b. In the cache state, “HIT” indicates that the object is cached and “MISS” indicates that the object is not cached. In this embodiment, if all blocks of an object are cached, the object is considered to be cached. The LBA indicates the addresses of blocks of each object. The control information is stored in the cache memories 121b or storage device 11, for example. The cache memories 121b or storage device 11 correspond to an information storage unit that stores data configuration information and state information.
According to an example embodiment, the above described object ID, cache state, distribution number and LBAs are used within a cache control method and a cache control device as described below. Although a conventional device such as those described in the background section of this application may include one or more of these pieces of information, these pieces of information conventionally are not used within a cache control method and a cache control device as described below. For example, a conventional object based system may include the use of LBA or object ID for managing data within a higher level device, however the LBA and/or object ID is unavailable or ignored by caching components of the conventional storage system or conventional caching control operations. Further, it is noted that an Object ID is not the same as a simple logical block address.
Next, an operation that a CM performs in response to a write request will be described.
As illustrated in
If the data is a new object (YES in S102), the CPU 121a secures free space corresponding to the area specified by the write request in the storage area of the storage device 11 (S103). The storage device 11 stores block information indicating the storage state of each block. The CPU 121a refers to the block information to secure free space. The block information may be stored in the CMs.
Next, the CPU 121a assigns an object ID to the data to be written and returns it to the write-requesting higher-level device 13 (S104). At that time, the CPU 121a refers to the valid/invalid in the control information to detect a free object ID and then assigns the object ID to the data to be written.
After returning the object ID, the CPU 121a performs a cache process (to be discussed in greater detail later) (S105). The CPU 121a then sets control information for the assigned object ID in accordance with the write request (S106). For example, at that time, the CPU 121a sets “1” for the valid/invalid and “HIT” for the cache state. The CPU 121a also stores, as control information, the number of blocks corresponding to the free space secured in response to the write request and the distribution number of the blocks. If there is an object, of which all blocks have been removed from the cache memory 121b in the cache process, the CPU 121a sets “MISS” for the cache state of the object.
If it is determined in S102 that the data is not a new object (NO in S102), the CPU 121a performs a cache process (S105), that is, updates an existing object. At that time, the higher-level device 13 specifies the object ID of the existing object. The function for performing S104 of
Next, cache data will be described.
The cache data includes multiple cache blocks listed in the order of shortness of caching in the cache memory 121b. In this embodiment, each cache block includes 50 blocks, but the number of blocks included in each cache block is not limited thereto. In
Next, the cache process will be described.
As illustrated in
If the cache size is equal to or greater than the threshold (YES in S201), the CPU 121a determines whether i is equal to or smaller than a specified and/or predetermined number (S202).
If i is equal to or smaller than the number (YES in S202), the CPU 121a selects the cache block cached in the lowest row of the cache information as candidate data to be written into the storage device 11 (candidate data) (S203). The CPU 121a then refers to the control information to determine whether the cache block selected as a candidate includes multiple objects (S204).
If the cache block includes multiple objects (YES in S204), the CPU 121a determines, according to the control information, whether the objects included in the cache block are included in other cache blocks (S205). Specifically, the CPU 121a determines whether the same object IDs as those of the objects included in the cache block are included in other cache blocks. For example, in the cache data illustrated in
If the objects are not included in other cache blocks (NO in S205), the CPU 121a selects the cache block as a block to be written into the storage device 11 (data to be written). The CPU 121a then removes the cache block from the cache memory 121b (S206) and writes it into the storage device 11. The CPU 121a then caches new data (S207).
In contrast, if the objects are included in other cache blocks (YES in S205), the CPU 121a excludes the selected cache block from options (S208) and increments i by 1 (S209). Then, the CPU 121a again determines whether i is equal to or smaller than the number (S202).
If the cache block does not include multiple objects in S204 (NO in S204), the CPU 121a removes the selected cache block from the cache memory 121b (S206).
If i is not equal to or smaller than the number in S202 (NO in S202), the CPU 121a selects a cache block including the fewest objects (S210). The CPU 121a then removes the selected cache block from the cache memory 121b (S206).
If the cache size is smaller than the threshold in S201 (NO in S201), the CPU 121a caches new data (S207).
As described above, removing cached data in data units requested by the higher-level device 13, such as objects, can increase processing efficiency in cache control. A candidate data selection unit may perform S203 of
Next, an operation that a CM performs in response to a read request will be described.
As illustrated in
If the target object is a cache miss (YES in S302), the CPU 121a refers to the control information to determine whether the distribution number of the target object is greater than 1, that is, whether the target object is distributed to multiple blocks (S303).
If the distribution number is greater than 1 (YES in S303), the CPU 121a executes the schedules of the distributed blocks (S304). Specifically, the CPU 121a selects the distributed blocks as data to be read from the storage device 11 into the cache memory 121b. Also, the CPU 121a retrieves a free cache block for data that is among the distributed blocks and that is not cached in the cache memory 121b, and assigns the retrieved free cache block to the data.
The CPU 121a then caches data of the target object from the storage device 11 into the cache memory 121b (S305). At that time, the CPU 121a prefetches the read-requested data in accordance with the configuration of the data and caches the prefetched data in the cache memory 121b. The CPU 121a also updates the control information with respect to the cached object. The CPU 121a then transfers the cached data to the higher-level device 13 (S306).
If the distribution number of the target object is 1 (NO in S303), the CPU 121a caches data of the target object from the storage device 11 into the cache memory 121b (S305). The CPU 121a then transfers the cached target object data to the higher-level device 13 (S306).
If the target object is not a cache miss in step S302 (NO in S302), the CPU 121a transfers the cached target object data to the higher-level device 13 (S306).
A second determination unit may perform S303 of
As seen, if an uncached object is stored in the storage device 11 in a distributed manner, the storage system 1 performs cache control in accordance with the configuration of the data handled by the higher-level device 13. This allows only necessary data to be loaded or pre-fetched into or from the cache memory, thereby increasing the use efficiency of the cache memory and the data transfer efficiency.
The many features and advantages of the embodiments are apparent from the detailed specification and, thus, it is intended by the appended claims to cover all such features and advantages of the embodiments that fall within the true spirit and scope thereof. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the inventive embodiments to the exact construction and operation illustrated and described, and accordingly all suitable modifications and equivalents may be resorted to, falling within the scope thereof.
| Number | Date | Country | Kind |
|---|---|---|---|
| 2009-192800 | Aug 2009 | JP | national |