CN103635887B - Data caching method and storage system - Google Patents

Data caching method and storage system Download PDF

Info

Publication number
CN103635887B
CN103635887B CN201380001620.0A CN201380001620A CN103635887B CN 103635887 B CN103635887 B CN 103635887B CN 201380001620 A CN201380001620 A CN 201380001620A CN 103635887 B CN103635887 B CN 103635887B
Authority
CN
China
Prior art keywords
controller
address information
read
target data
data request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201380001620.0A
Other languages
Chinese (zh)
Other versions
CN103635887A (en
Inventor
陈磊
蒋培军
李小华
邹蛟同
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN103635887A publication Critical patent/CN103635887A/en
Application granted granted Critical
Publication of CN103635887B publication Critical patent/CN103635887B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0862Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with prefetch
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0868Data transfer between cache memory and other subsystems, e.g. storage devices or host systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The embodiment of the invention provides a data caching method and a storage system. The storage system includes a plurality of controllers, and each of the controllers comprises buffer memory. The method comprises steps that a first controller receives a reading data demand carrying address information; a second controller is determined according to the address information carried by the reading data demand; the address information is transmitted to the second controller; and the second controller obtains address information of target data to be read according to the address information, and the target data can be read to buffer memory according to the address information of the target data. Target data of to be read can be accurately predicted.

Description

Data cached method and storage system
Technical field
The present invention relates to memory technology, particularly relate to a kind of data cached method and storage system.
Background technology
Cache memory (being called for short buffer memory, also known as cache), be the memory buffer in storage system between CPU and primary memory (such as, hard disk), volume ratio hard disk is little, but speed is faster than hard disk.Under normal circumstances, CPU, when processing read data request, if find data available (being called that cache hits) in the buffer, then can return the result of this read data request immediately, just read data request is sent in hard disk and reads and writes data when not hitting.Because the speed of cache access is much larger than the speed of disk read-write, therefore cache hit probability is higher, and the performance of storage system is higher.Therefore, existing way is read in advance in cache the data of " being about to be accessed to ", and follow-up read data request then can be hit immediately, and this way is just referred to as to look ahead.
For the storage system comprising multiple controller, if multiple controller is active/standby (A/P) pattern, namely only have a controller in running order, so concerning a storage system, its data be kept at inside cache all can be centrally stored in the cache of this controller, therefore can carry out looking ahead of cache data by carrying out the identification of order stream to read data request.But, if multiple controller is main/main (A/A) pattern, each controller is in running order, read data request may be distributed on each controller, therefore when each controller carries out the identification of order stream to read data request thus looks ahead, the information of institute's foundation is comprehensive not, and the data of therefore looking ahead are not accurate enough.
Summary of the invention
The embodiment of the present invention provides a kind of data cached method and storage system, to realize, when storage system comprises multiple controller, predicting target data to be read exactly.
Embodiment of the present invention first aspect provides a kind of data cached method, and described method is applied in storage system, and described storage system comprises multiple controller, and wherein, each controller comprises buffer memory; Described method comprises:
The read data request that first controller Receiving Host sends, described read data request carries address information; According to the address information determination second controller that described read data request is carried; Described address information is sent to described second controller;
Described second controller obtains the address information of target data to be read according to described address information, described target data is read in buffer memory with the address information according to described target data.
In the first embodiment of embodiment of the present invention first aspect, the address information that described read data request is carried comprises the start address that described read data request is carried;
The described address information determination second controller carried according to described read data request comprises:
According to the start address that described read data request is carried, according to the hashing algorithm of setting, determine second controller.
In conjunction with the first embodiment of embodiment of the present invention first aspect, in the second embodiment of embodiment of the present invention first aspect, the hashing algorithm of described setting comprises consistance hash algorithm.
In the third embodiment of embodiment of the present invention first aspect, the address information that described read data request is carried comprises the start address that described read data request is carried;
The described address information determination second controller carried according to described read data request comprises:
According to the allocation list that described start address inquiry is preset, obtain the second controller that described start address is corresponding.
In the 4th kind of embodiment of embodiment of the present invention first aspect, described target data is read buffer memory and comprises by the described address information according to described target data:
Described target data reads in the buffer memory of described second controller according to the address information of described target data by described second controller.
In the 5th kind of embodiment of embodiment of the present invention first aspect, described target data is read buffer memory and comprises by the described address information according to described target data:
Described second controller determines according to the address information of described target data the 3rd controller that described target data is corresponding; Send prefetched command to described 3rd controller, described prefetched command comprises the address information of described target data;
Described target data reads in the buffer memory of described 3rd controller according to the address information of described target data by described 3rd controller.
Embodiment of the present invention second aspect provides a kind of storage system, comprising:
First controller is used for the read data request that Receiving Host sends, and described read data request carries address information; According to the address information determination second controller that described read data request is carried; Described address information is sent to described second controller;
Described second controller is used for the address information obtaining target data to be read according to described address information, described target data is read in buffer memory with the address information according to described target data.
In the first embodiment of embodiment of the present invention second aspect, the address information that described read data request is carried comprises the start address that described read data request is carried;
The start address of described first controller specifically for carrying according to described read data request, according to the hashing algorithm of setting, determines second controller.
In conjunction with the first embodiment of embodiment of the present invention second aspect, in the second embodiment of embodiment of the present invention second aspect, the hashing algorithm of described setting comprises consistance hash algorithm.
In the third embodiment of embodiment of the present invention second aspect, the address information that described read data request is carried comprises the start address that described read data request is carried;
Described first controller, specifically for the allocation list preset according to described start address inquiry, obtains the second controller that described start address is corresponding.
In the 4th kind of embodiment of embodiment of the present invention second aspect, described target data also reads in the buffer memory of described second controller for the address information according to described target data by described second controller.
In the 5th kind of embodiment of embodiment of the present invention second aspect, described system also comprises the 3rd controller;
Described second controller is also for determining the 3rd controller that described target data is corresponding according to the address information of described target data; Send prefetched command to described 3rd controller, described prefetched command comprises the address information of described target data;
Described 3rd controller is used for described target data being read in the buffer memory of described 3rd controller according to the address information of described target data.
In embodiments of the present invention, receive the read data request of main frame transmission at the first controller after, according to the address information determination second controller that described read data request is carried, and described address information is sent to described second controller, by second controller according to address information acquisition target data to be read, read the operation of described target data to buffer memory to perform.Because the controller performing the operation obtaining target data to be read is that the address information of being carried by read data request is determined, therefore the read data request occurred on one section of logical address can by a controller collective analysis, for this section of logical address, the information of the read data request obtained is comprehensive, therefore can predict target data to be read exactly, and read in buffer memory.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The application network configuration diagram of a kind of data cached method that Fig. 1 provides for the embodiment of the present invention;
The process flow diagram of a kind of data cached method that Fig. 2 provides for the embodiment of the present invention;
The process flow diagram of the method that the another kind that Fig. 3 provides for the embodiment of the present invention is data cached;
The data structure diagram of the data pre-fetching unit that Fig. 4 provides for the embodiment of the present invention;
The data structure diagram of the data block table in the data pre-fetching unit that Fig. 5 provides for the embodiment of the present invention;
The idiographic flow schematic diagram of the method that the another kind that Fig. 6 provides for the embodiment of the present invention is data cached;
The corresponding schematic diagram of the read data request that Fig. 7 provides for the embodiment of the present invention and data block;
The structural representation of the storage system that Fig. 8 provides for the embodiment of the present invention.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The system architecture of the embodiment of the present invention
The data cached method that the embodiment of the present invention provides can realize in storage system.The system architecture schematic diagram of the data cached method that Fig. 1 provides for the embodiment of the present invention, as shown in Figure 1, this storage system comprises multiple controller (to comprise 4 controllers in figure) and memory device.In the present embodiment, memory device illustrates for hard disk.
Fig. 1 is only exemplary illustration, does not limit concrete networking mode, and as: the tree-like networking of cascade, ring-type networking can.As long as can intercom mutually between controller and memory device.
Controller can comprise the known any computing equipment of current techniques, as server, desk-top computer etc.In a kind of application scenarios of the embodiment of the present invention, each controller can process the read data request of from host, and the data that also can store in accessing storage device, such as by the digital independent in memory device out, are stored in cache.Or, in another kind of application scenarios, each controller can process the read data request of from host, but the one section of storage space (the part storage space of such as part disk or a disk) in each controller corresponding stored equipment, that is every section of storage space in memory device has the specific controller of its correspondence, can not by other controller managements or access.It should be noted that, memory device here refers to disk, hard disk or other storage mediums, does not comprise controller.
Inner at controller, include buffer memory (cache), cache is the memory buffer between CPU and hard disk, and volume ratio hard disk is little, but speed is faster than hard disk.Partial data is stored in Cache, when CPU is when processing read data request, if find data available in cache, i.e. cache hit.
Can intercom mutually between each controller, the data stored in the cache of other controllers can be accessed.Such as, controller 0 receives the read data request of from host (not shown) visit data A, data A is not stored in the cache of controller 0, but store data A in the cache of controller 1, therefore controller 0 can send data read command to controller 1, make controller 1 read data A from cache, and send to controller 0, therefore controller 0 just can directly to main frame return data A.It should be noted that, because the data communication between cache adopts high speed data transfer passage, therefore between controller, cache data shared access speed is quickly, need to read compared with the data in memory device with cache is miss, the time that data-generating process spends from the cache of other controllers is very short.
Operating system and other software programs are installed in controller.Such as, include at least one administrative unit of looking ahead in each controller, in embodiments of the present invention, the quantity of the administrative unit of looking ahead comprised in each controller is roughly equal.Each administrative unit of looking ahead is for performing the logical memory space data read operation of a sector address scope.The logical memory space of each administrative unit management of looking ahead here, can be a logic storage unit (Logic Unit Number, LUN), also can be one section of region of LUN, can also be file etc., in this no limit.Administrative unit of looking ahead distribution situation in the controller can be determined according to the address realm of logical memory space.Such as, for a logical address (such as Logic Block Address, LBA), according to consistance hash algorithm or other hashing algorithms, the controller at administrative unit place of looking ahead corresponding to described logical address can be obtained out.
Memory device can comprise the known memory device of current techniques, as SSD or direct access storage device (Direct Access Storage Device, DASD) etc.The storage space of memory device can be divided into several logical blocks (chunk), and each chunk has unique ID.In the present embodiment, to the management of the data in memory device in units of chunk, such as can in units of chunk by digital independent in cache.
According to description above, in a kind of application scenarios of the embodiment of the present invention, each controller can carry out read-write operation to memory device, such as, each controller by inside the digital independent in memory device to oneself cache, can realize cache hit during to perform follow-up read data request; In another kind of application scenarios, a part of storage space of each controller corresponding stored equipment, read-write operation can only be carried out to the data stored in this part storage space, such as by the digital independent that stores in this part storage space to oneself cache, and the data stored in other storage spaces of this memory device are by other controller managements.
Data cached method
Introducing the data cached method that the embodiment of the present invention provides below, as shown in Figure 2, is the process flow diagram of the data cached method that the embodiment of the present invention provides, described method is applied in storage system, described storage system comprises multiple controller, and wherein, each controller comprises buffer memory; Described method comprises:
The read data request that step S201: the first controller Receiving Host sends, described read data request carries address information; According to the address information determination second controller that described read data request is carried; Described address information is sent to described second controller.
Optionally, described address information comprises start address and the length of data to be read, according to the start address of data to be read, according to the hashing algorithm of setting, can obtain the second controller that described read data request is corresponding.
Step S202: described second controller obtains the address information of target data to be read according to described address information, reads described target data in buffer memory with the address information according to described target data.
Optionally, after second controller obtains the address information of target data to be read according to described address information, described target data can be read in the buffer memory of second controller according to the address information of described target data; Or the address information according to described target data sends prefetched command to the 3rd controller, and described target data reads in the buffer memory of the 3rd controller according to the address information of described target data by the 3rd controller.
Optionally, the embodiment of the present invention can also be applied in a distributed system, and described distributed system comprises multiple node, and each node is a server, and each controller class in the function that each server performs and storage system seemingly, does not repeat them here.
It should be noted that, the read data request that the main frame that described first controller receives sends can be one, also can be multiple.When read data request is multiple, the address information can carried according to described multiple read data request judges that whether described multiple read data request is continuous, if continuously, then described multiple read data request can be merged, obtain one section of continuous print address information.The described address information determination second controller carried according to described read data request specifically refers to, according to continuous print address information determination second controller after merging.If discontinuous between described multiple read data request, then respectively according to the address information determination second controller that each read data request is carried.
In embodiments of the present invention, receive the read data request of main frame transmission at the first controller after, according to the address information determination second controller that described read data request is carried, and described address information is sent to described second controller, by second controller according to address information acquisition target data to be read, read the operation of described target data to buffer memory to perform.Because the controller performing the operation obtaining target data to be read is that the address information of being carried by read data request is determined, therefore the read data request occurred on one section of logical address can by a controller collective analysis, for this section of logical address, the information of the read data request obtained is comprehensive, therefore can predict target data to be read exactly, and read in buffer memory.
As shown in Figure 3, be the process flow diagram of another data cached method that the embodiment of the present invention provides, for convenience of description, in fact the embodiment of the present invention for three controllers, but is not limited to three controllers.See Fig. 3, concrete what perform following step can be processor in controller, and described method comprises:
The first read data request that step S301: the first controller Receiving Host sends, described first read data request carries the address information of the first data to be read, and wherein said address information comprises start address (LBA) and the length of the first data to be read.
It should be noted that, the logical address in the embodiment of the present invention, also known as start address, also known as LBA.
The controller that described first read data request is corresponding determined by step S302: the first controller.
In embodiments of the present invention, at least one administrative unit of looking ahead is included in each controller, in embodiments of the present invention, the quantity of the administrative unit of looking ahead comprised in each controller is roughly equal, each administrative unit of looking ahead for managing the storage space of a sector address scope, one section of region of such as LUN.Concrete, according to the LBA of the first data to be read, according to consistance hash algorithm or other hashing algorithms, the controller that the first read data request is corresponding can be obtained, and then obtain the administrative unit of looking ahead in this controller.When comprise in controller one look ahead administrative unit time, controller corresponding to the first read data request determines, and the administrative unit of looking ahead that so the first read data request is corresponding also just determines; When comprise in controller multiple look ahead administrative unit time, each administrative unit of looking ahead manages the storage space of a sector address scope, therefore also uniquely can determine an administrative unit of looking ahead in a controller according to LBA.For example, the controller that described first data to be read are corresponding is second controller.
Hashing algorithm, also known as hash algorithm, key (key) value referring to according to certain determines a kind of data structure of unique reference address, its objective is that quickening is searched.Wherein, key refers to start address.Optionally, common hashing algorithm can realize with a hash table, carries out searching the reference address that can obtain its correspondence according to key value in hash table.It should be noted that, general hashing algorithm is linear account form.In embodiments of the present invention, hashing algorithm can be adopted uniquely to determine a controller by the input of start address.
Optionally, consistance hashing algorithm can adopt the data structure of annular to realize the location of key value to access location.In the data structure of described annular, multiple dummy node can be comprised, such as dummy node 0, dummy node 1, dummy node 2, dummy node 3 ... dummy node 10, the corresponding one section of reference address of each dummy node.Wherein every two adjacent dummy nodes connect successively, and dummy node 10 is connected with dummy node 0 head and the tail, jointly forms an annular.Three controllers are had for storage system, three controller called after controller A, controller B and controller C respectively, dummy node in the corresponding several ring data structure of each controller difference, such as controller A corresponding dummy node 0, dummy node 1, dummy node 2, dummy node 3; Controller B corresponding dummy node 4, dummy node 5, dummy node 6, dummy node 7; Controller C corresponding dummy node 8, dummy node 9, dummy node 10.In this way, the unique corresponding controller of start address can also be made.
But, for consistance hashing algorithm, when storage system increases new controller, such as increase controller D, without the need to data structure or the amendment algorithm of again arranging, only need to adjust the corresponding dummy node of each controller, just can make the corresponding segment base of controller D increased newly.
Optionally, a default allocation list can be preserved in each controller of storage system, described allocation list comprises the corresponding relation between start address and each controller, the controller receiving read data request can be inquired about in allocation list according to the start address of carrying in read data request, thus obtains controller corresponding to described start address.
Optionally, above-mentioned allocation list can only be kept in a controller, when other controllers receive read data request, inquiry request can be sent to the controller preserving allocation list, described inquiry request comprises the start address that described read data request is carried, the controller of described preservation allocation list can be inquired about according to described start address in allocation list, thus obtain controller corresponding to described start address, and Query Result is sent to the controller receiving read data request.
Optionally, when breaking down to prevent the controller preserving allocation list, described allocation list is lost, and can preserve the copy of described allocation list in another controller of described storage system.
Optionally, controller corresponding to described start address can also be obtained by the mode of delivery, concrete, by the number of described start address divided by controller, corresponding controller can be obtained according to the mould calculated.
Step S303: the second read data request that second controller Receiving Host sends, described second read data request carries the address information of the second data to be read, and wherein said address information comprises start address (LBA) and the length of the second data to be read.
It should be noted that between step S301 and step S303, there is no dividing of sequencing.
Step S304: second controller determines the controller that described second read data request is corresponding.
Concrete, the controller of its correspondence can be obtained according to the LBA of the second data to be read, similar with step S302, do not repeat them here.
When the controller that the controller that the first read data request is corresponding is corresponding with the second read data request is not identical, two controllers can carry out data cached operation of looking ahead respectively, are independent of each other.Here the situation that controller corresponding to the first read data request controller corresponding with the second read data request is identical is discussed.
Step S305: the first controller sends the drop point information of the first read data request to second controller, described drop point information comprises the address information of the first data to be read, in addition, drop point information can also comprise the ID of the main frame of transmission first read data request, and first ID etc. of controller, described drop point information can as the analysis foundation of data pre-fetching.
Because the controller that the second read data request is corresponding is second controller, therefore the drop point information of the second read data request address stored in the buffer can be pushed to the administrative unit of looking ahead of second controller by the processor of second controller, or otherwise make the administrative unit of looking ahead of second controller obtain the drop point information of the second read data request, in this no limit.
Step S306: the drop point information of second controller according to the first read data request and the drop point information of the second read data request, predicts the target data of next read data request.
Next read data request refers to that storage system is about to the read data request (also not receiving at present) received, and for convenience of description, next read data request is called third reading request of data.It should be noted that, next read data request is not limited to the read data request of and then the first read data request, the second read data request, as long as the read data request received after the first read data request, the second read data request can be called next read data request.
Second controller can utilize administrative unit of looking ahead to predict the target data of third reading request of data.Administrative unit of looking ahead is the functional unit for performing data cached read operation comprised in controller, and as shown in Figure 4, administrative unit of looking ahead comprises: data block table, interface and prefetch policy module.Wherein data block table comprises multiple data block, a logical block (chunk) on the corresponding disk of each data block, and size is identical.Described data block is for recording drop point information and other information of read data request.Described data block table can sort from small to large according to the LBA comprised in drop point information, or sorts from big to small.In addition, the data block table of the embodiment of the present invention also can be not limited to the form shown, and can also be RBTree, or binary tree etc. other can realize the data management structure of sequential search.It should be noted that, what record in each data block is drop point information and other information of read data request, but does not comprise data to be read itself.In addition, interface for receiving the drop point information of the read data request of other controllers transmission, or sends prefetched command to other controllers; Prefetch policy module is used for performing read operation according to the prefetch policy of setting.
As shown in Figure 5, the information recorded in each data block can comprise: the ID of the chunk that Chunk ID, drop point information and the last time read, and wherein drop point information specifically can comprise host id, controller ID, LBA and length;
Described Chunk ID specifically refers to the ID of the chunk on the disk corresponding to described data block, can obtain the start address of chunk by the size that Chunk ID is multiplied by each chunk.Due to looking ahead in units of chunk of data, so also need the start address of the chunk knowing target data place when prefetch target data.It should be noted that, previously described LBA refers to the start address of read data request, is different from the start address of described chunk.In some cases, the start address of read data request is identical with the start address of chunk, but majority of case, the start address of read data request is not identical with the start address of chunk.
The ID of the chunk that described the last time reads, for being identified at the scope of looking ahead of the read operation of the last time that described data block occurs, due to when performing read operation, all perform in units of chunk, so the ID of the chunk that can read according to described the last time judges that this is looked ahead and whether has overlapping with the scope that last time looks ahead, if had, the chunk of lap can not be comprised when performing read operation.
In addition, the information such as sequence number, timestamp, bitmap of read data request can also be recorded.
As shown in Figure 6, step S306 specifically can comprise the following steps:
S3061: according to the drop point information of the first read data request and the drop point information of the second read data request, determines that the first read data request and the second read data request have continuous print ordinal relation.
Concrete determination methods is, the end address of the first read data request is obtained according to the start address of the first read data request and length, if the start address of the end address of the first read data request and the second read data request is continuous, then illustrate that the first read data request and the second read data request have continuous print ordinal relation; Or, the end address of the second read data request is obtained according to the start address of the second read data request and length, if the start address of the end address of the second read data request and the first read data request is continuous, then illustrate that the first read data request and the second read data request have continuous print ordinal relation.
It should be noted that, in embodiments of the present invention, the first read data request and the second read data request can not absolute continuation, allow the space, address had between them to a certain degree.
S3062: determine the first read data request and data block corresponding to the second read data request.
Concrete, can according to the drop point information of the drop point information of the first read data request and the second read data request, determine the first read data request and data block corresponding to the second read data request.Because the first read data request and the second read data request have continuous print ordinal relation, so the data block of their correspondence is also continuous.First read data request and data block corresponding to the second read data request can be as shown in Figure 7.
S3063: determine the data block continuous print data block corresponding with described first read data request and the second read data request, obtain the maximum continuous segment of data block.
Concrete, can according to the first read data request and data block corresponding to the second read data request, travel through forward described data block table, if the data block having data block corresponding with the first read data request and the second read data request is continuous, then according to the drop point information that its continuous print data block records judge to occur last time read data request in described data block whether with the first current read data request, second read data request is continuous, if continuously, then continue to obtain continuous print data block in data block table, until obtain the maximum continuous segment of the data block corresponding with described first read data request and the second read data request.
S3064: the length and the start address that obtain target data.
Concrete, the size of the maximum continuous segment of the data block that can obtain according to step S3063, through the calculating of prefetch policy, obtains the length of target data.
Optionally, if the ID of the chunk read by described the last time is known, a wherein part prefetched mistake when read operation last time in target data, so can remove this part data.
In addition, predict the target data of next read data request, except the length determining target data, also need the start address determining target data.In the present embodiment, the start address of target data is the end address of the first read data request or the end address of the second read data request.
After second controller dopes the target data of next read data request, described target data can be read from disk according to the start address of described target data and length, be stored in the cache of second controller, can hit by cache for when performing third reading request of data next time.This situation is mainly applicable to each controller and all can manages or the scene of each disk in accessing storage device.
But, in some application scenarios, each controller can only manage or part storage space (the part storage space of part disk or a disk) in accessing storage device, that is every section of storage space in memory device has the specific controller of its correspondence, can not by other controller managements or access.In this case, the storage space at hypothetical target data place is by the 3rd controller management, and so the present embodiment can also comprise:
Step S307: second controller sends prefetched command to the 3rd controller, and described prefetched command comprises start address and the length of target data, and described target data is read in its buffer memory by the 3rd controller.
Optionally, according to the start address of target data, second controller can determine that the storage space at described target data place is by the 3rd controller management, therefore can send data pre-fetching order to the 3rd controller.Concrete, second controller can pass through system configuration or some existing computing method, by the start address of target data, obtains the controller that the storage space at described target data place is corresponding.
Step S308: the three controller looks ahead described target data in its buffer memory.
Concrete, the 3rd controller according to the start address of described target data and length, can read described target data from disk, is stored in the cache of the 3rd controller.
The third reading request of data that step S309: the first controller Receiving Host sends, the data to be read of described third reading request of data are described target datas, or data to be read are parts of described target data.
After first controller receives described third reading request of data, find not store described target data in its cache, but store described target data in the cache of the 3rd controller, perform step S310.
Optionally, what receive described third reading request of data can be any one controller in storage system, if receive the 3rd controller of described third reading request of data, then target data in its buffer memory directly can be sent to described main frame by the 3rd controller, does not need to perform step S310-S311; If what receive described third reading request of data is other controllers in storage system, the situation that its operation steps and the first controller receive described third reading request of data is similar.
Step S310: the first controller sends data read command to the 3rd controller, and described data read command comprises start address and the length of described target data, for requiring that described 3rd controller sends described target data.
Step S311: the three controller sends described target data to the first controller.
It should be noted that, what the data channel between controller adopted is high speed data transfer passage, and according to statistics, the access speed of the cache data between controller is generally less than 1ms.But if cannot hit by cache, the speed reading target data from disk is 6-10ms.Therefore, even across controller hit, its speed is also the speed much larger than reading data from disk.
Step S312: the first controller sends described target data to main frame, namely achieves cache hit after receiving the target data of the 3rd controller transmission.
In addition, in the present embodiment, the controller that the information determination third reading request of data that first controller can also carry according to third reading request of data is corresponding, the drop point information of third reading request of data is sent to this controller, make the administrative unit of looking ahead of this controller continue the data to be read of the next read data request of prediction, perform data cached operation.This process can repeat step S301-step S308, repeats no more here.
In embodiments of the present invention, receive the read data request of main frame transmission at the first controller after, according to the address information determination second controller that described read data request is carried, and described address information is sent to described second controller, by second controller according to address information acquisition target data to be read, read the operation of described target data to buffer memory to perform.Because the controller performing the operation obtaining target data to be read is that the address information of being carried by read data request is determined, therefore the read data request occurred on one section of logical address can by a controller collective analysis, for this section of logical address, the information of the read data request obtained is comprehensive, therefore can predict target data to be read exactly, and read in buffer memory.
Storage system
Introduce the storage system that the embodiment of the present invention provides below, as shown in Figure 8, be the structural drawing of the storage system 80 that the embodiment of the present invention provides, comprise multiple controller, wherein, each controller comprises processor and buffer memory; Wherein:
The read data request that first controller 801 sends for Receiving Host, described read data request carries address information; According to the address information determination second controller 802 that described read data request is carried; Described address information is sent to described second controller 802.Concrete, what perform aforesaid operations is processor in the first controller 801.
Optionally, described address information comprises start address and the length of data to be read, can according to the start address of data to be read, and according to the hashing algorithm of setting, obtaining controller corresponding to described read data request is second controller 802.
In embodiments of the present invention, at least one administrative unit of looking ahead is included in each controller, in embodiments of the present invention, the quantity of the administrative unit of looking ahead comprised in each controller is roughly equal, each administrative unit of looking ahead for managing the storage space of a sector address scope, one section of region of such as LUN.Concrete, according to the LBA of the first data to be read, according to consistance hash algorithm or other hashing algorithms, the controller that the first read data request is corresponding can be obtained, and then obtain the administrative unit of looking ahead in this controller.When comprise in controller one look ahead administrative unit time, controller corresponding to the first read data request determines, and the administrative unit of looking ahead that so the first read data request is corresponding also just determines; When comprise in controller multiple look ahead administrative unit time, each administrative unit of looking ahead manages the storage space of a sector address scope, therefore also uniquely can determine an administrative unit of looking ahead in a controller according to LBA.For example, the controller that described first data to be read are corresponding is second controller.
Optionally, hashing algorithm can be adopted uniquely to determine a controller by the input of start address, and described hashing algorithm can be consistance hashing algorithm.
Optionally, a default allocation list can be preserved in each controller of storage system, described allocation list comprises the corresponding relation between start address and each controller, the controller receiving read data request can be inquired about in allocation list according to the start address of carrying in read data request, thus obtains controller corresponding to described start address.
Optionally, above-mentioned allocation list can only be kept in a controller, when other controllers receive read data request, inquiry request can be sent to the controller preserving allocation list, described inquiry request comprises the start address that described read data request is carried, the controller of described preservation allocation list can be inquired about according to described start address in allocation list, thus obtain controller corresponding to described start address, and Query Result is sent to the controller receiving read data request.
Optionally, when breaking down to prevent the controller preserving allocation list, described allocation list is lost, and can preserve the copy of described allocation list in another controller of described storage system.
Optionally, controller corresponding to described start address can also be obtained by the mode of delivery, concrete, by the number of described start address divided by controller, corresponding controller can be obtained according to the mould calculated.
After the address information determination second controller 802 that first controller 801 carries according to described read data request, described address information can be sent to described second controller 802.
Described target data, for obtaining the address information of target data to be read according to described address information, reads in buffer memory with the address information according to described target data by described second controller 802.Concrete, what perform aforesaid operations is processor in the first controller 801.
Optionally, after second controller 802 obtains the address information of target data to be read according to described address information, described target data can be read in the buffer memory of second controller 802 according to the address information of described target data; Or the address information according to described target data sends prefetched command to the 3rd controller 803, and described target data reads in the buffer memory of the 3rd controller 803 according to the address information of described target data by the 3rd controller 803.
Wherein, second controller 802 can utilize administrative unit of looking ahead to obtain target data to be read.Concrete preparation method and above-described embodiment of the method similar, repeat no more here.
Optionally, the next read data request that the first controller 801 Receiving Host sends, the data to be read of described next read data request are described target datas, or data to be read are parts of described target data.After first controller 801 receives described next read data request, find not store described target data in its cache, but store described target data in the cache of the 3rd controller 803, then can send data read command to the 3rd controller 803, described data read command comprises start address and the length of described target data, for requiring that described 3rd controller 803 sends described target data.After 3rd controller 803 receives described data read command, send described target data to the first controller 801.
It should be noted that, next read data request is not limited to the read data request that and then described first controller receives, as long as the read data request received after described read data request can be called next read data request.
Due to the data channel employing between controller is high speed data transfer passage, and according to statistics, the access speed of the cache data between controller is generally less than 1ms.But if cannot hit by cache, the speed reading target data from disk is 6-10ms.Therefore, even across controller hit, its speed is also the speed much larger than reading data from disk.
In embodiments of the present invention, receive the read data request of main frame transmission at the first controller after, according to the address information determination second controller that described read data request is carried, and described address information is sent to described second controller, by second controller according to address information acquisition target data to be read, read the operation of described target data to buffer memory to perform.Because the controller performing the operation obtaining target data to be read is that the address information of being carried by read data request is determined, therefore the read data request occurred on one section of logical address can by a controller collective analysis, for this section of logical address, the information of the read data request obtained is comprehensive, therefore can predict target data to be read exactly, and read in buffer memory.
One of ordinary skill in the art will appreciate that the possible implementation of various aspects of the present invention or various aspects can be embodied as system, method or computer program.Therefore, the possible implementation of each aspect of the present invention or various aspects can adopt complete hardware embodiment, completely software implementation (comprising firmware, resident software etc.), or the form of the embodiment of integration software and hardware aspect, is all referred to as " circuit ", " module " or " system " here.In addition, the possible implementation of each aspect of the present invention or various aspects can adopt the form of computer program, and computer program refers to the computer readable program code be stored in computer-readable medium.
Computer-readable medium can be computer-readable signal media or computer-readable recording medium.Computer-readable recording medium is including but not limited to electronics, magnetic, optics, electromagnetism, infrared or semiconductor system, equipment or device, or aforesaid appropriately combined arbitrarily, as random access memory (RAM), ROM (read-only memory) (ROM), Erasable Programmable Read Only Memory EPROM (EPROM or flash memory), optical fiber, portable ROM (read-only memory) (CD-ROM).
Processor in computing machine reads the computer readable program code be stored in computer-readable medium, makes processor can perform the function action specified in the combination of each step or each step in flow charts; Generate the device implementing the function action specified in the combination of each block of block diagram or each piece.
Computer readable program code can perform completely on the computing machine of user, part performs on the computing machine of user, as independent software package, part on the computing machine of user and part on the remote computer, or to perform on remote computer or server completely.Also it should be noted that in some alternate embodiment, in flow charts in each step or block diagram each piece the function that indicates may not according to occurring in sequence of indicating in figure.Such as, depend on involved function, in fact two steps illustrated in succession or two blocks may be executed substantially concurrently, or these blocks sometimes may be performed by with reverse order.

Claims (12)

1. a data cached method, described method is applied in storage system, and described storage system comprises multiple controller, and wherein, each controller comprises buffer memory; It is characterized in that, described method comprises:
The read data request that first controller Receiving Host sends, described read data request carries address information; According to the address information determination second controller that described read data request is carried; Described address information is sent to described second controller;
Described second controller obtains the address information of target data to be read according to described address information, determines according to the address information of described target data the 3rd controller that described target data is corresponding; Send prefetched command to described 3rd controller, described prefetched command comprises the address information of described target data;
Described target data reads in the buffer memory of described 3rd controller according to the address information of described target data by described 3rd controller.
2. method according to claim 1, is characterized in that, the address information that described read data request is carried comprises the start address that described read data request is carried;
The described address information determination second controller carried according to described read data request comprises:
According to the start address that described read data request is carried, according to the hashing algorithm of setting, determine second controller.
3. method according to claim 2, is characterized in that, the hashing algorithm of described setting comprises consistance hash algorithm.
4. method according to claim 1, is characterized in that, the address information that described read data request is carried comprises the start address that described read data request is carried;
The described address information determination second controller carried according to described read data request comprises:
According to the allocation list that described start address inquiry is preset, obtain the second controller that described start address is corresponding.
5. method according to claim 1, is characterized in that, also comprises:
Described first controller receives the next read data request that described main frame sends, and described next read data request comprises the address information of described target data;
Determine according to the address information of described target data to store described target data in the buffer memory of described 3rd controller;
Send data read command to described 3rd controller, make described 3rd controller that described target data is sent to described first controller;
Described target data is sent to described main frame.
6. method according to claim 1, is characterized in that, the address information of described target data comprises start address and the length of described target data;
The address information that described second controller obtains target data to be read according to described address information comprises:
The address information that described second controller carries according to the read data request that described main frame sends, determines the start address of described target data; And
The address information that the read data request sent according to described main frame is carried, determines the first data block corresponding in data block table, and with described first data block continuous print second data block; According to the summation of the size of described first data block and the second data block, obtain the length of described target data.
7. a storage system, is characterized in that, described system comprises:
First controller is used for the read data request that Receiving Host sends, and described read data request carries address information; According to the address information determination second controller that described read data request is carried; Described address information is sent to described second controller;
Described second controller is used for the address information obtaining target data to be read according to described address information, determines according to the address information of described target data the 3rd controller that described target data is corresponding; Send prefetched command to described 3rd controller, described prefetched command comprises the address information of described target data;
Described target data reads in the buffer memory of described 3rd controller according to the address information of described target data by described 3rd controller.
8. system according to claim 7, is characterized in that, the address information that described read data request is carried comprises the start address that described read data request is carried;
The start address of described first controller specifically for carrying according to described read data request, according to the hashing algorithm of setting, determines second controller.
9. system according to claim 8, is characterized in that, the hashing algorithm of described setting comprises consistance hash algorithm.
10. system according to claim 7, is characterized in that, the address information that described read data request is carried comprises the start address that described read data request is carried;
Described first controller, specifically for the allocation list preset according to described start address inquiry, obtains the second controller that described start address is corresponding.
11. systems according to claim 7, is characterized in that,
Described first controller is also for receiving the next read data request that described main frame sends, and described next read data request comprises the address information of described target data;
Determine according to the address information of described target data to store described target data in the buffer memory of described 3rd controller;
Send data read command to described 3rd controller, make described 3rd controller that described target data is sent to described first controller;
Described target data is sent to described main frame.
12. systems according to claim 7, is characterized in that, the address information of described target data comprises start address and the length of described target data;
The address information that the read data request that described second controller is used for sending according to described main frame is carried, determines the start address of described target data; And
The address information that the read data request sent according to described main frame is carried, determines the first data block corresponding in data block table, and with described first data block continuous print second data block; According to the summation of the size of described first data block and the second data block, obtain the length of described target data.
CN201380001620.0A 2013-09-23 2013-09-23 Data caching method and storage system Active CN103635887B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/084024 WO2015039352A1 (en) 2013-09-23 2013-09-23 Data caching method and storage system

Publications (2)

Publication Number Publication Date
CN103635887A CN103635887A (en) 2014-03-12
CN103635887B true CN103635887B (en) 2015-07-08

Family

ID=50215548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201380001620.0A Active CN103635887B (en) 2013-09-23 2013-09-23 Data caching method and storage system

Country Status (2)

Country Link
CN (1) CN103635887B (en)
WO (1) WO2015039352A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105574008B (en) * 2014-10-11 2020-01-31 华为技术有限公司 Task scheduling method and device applied to distributed file system
CN104461943B (en) * 2014-12-29 2017-10-27 成都致云科技有限公司 Method for reading data, device and system
CN107844270A (en) * 2014-12-31 2018-03-27 华为技术有限公司 A kind of memory array system and data write request processing method
CN108345551B (en) * 2017-01-23 2020-05-12 杭州海康威视数字技术股份有限公司 Data storage method and device
WO2019127487A1 (en) * 2017-12-29 2019-07-04 华为技术有限公司 Data prefetching method and apparatus, and storage device
CN109691065B (en) * 2018-08-23 2021-11-09 袁振南 Distributed storage system and data read-write method thereof, storage terminal and storage medium
WO2020038466A1 (en) * 2018-08-24 2020-02-27 华为技术有限公司 Data pre-fetching method and device
CN112199304B (en) * 2019-07-08 2024-04-09 华为技术有限公司 Data prefetching method and device
CN110928495B (en) * 2019-11-12 2023-09-22 杭州宏杉科技股份有限公司 Data processing method and device on multi-control storage system
CN112579479B (en) * 2020-12-07 2022-07-08 成都海光微电子技术有限公司 Processor and method for maintaining transaction order while maintaining cache coherency
CN112799589B (en) * 2021-01-14 2023-07-14 新华三大数据技术有限公司 Data reading method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6728258B1 (en) * 1995-11-15 2004-04-27 Hitachi, Ltd. Multi-processor system and its network
CN1818855A (en) * 2005-02-09 2006-08-16 国际商业机器公司 Method and apparatus for performing data prefetch in a multiprocessor system
CN101311894A (en) * 2007-03-30 2008-11-26 英特尔公司 Method and apparatus for speculative prefetching in a multi-processor/multi-core message-passing machine
CN101630303A (en) * 2009-08-24 2010-01-20 成都市华为赛门铁克科技有限公司 Request message processing method, device and multi-processor memory system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030195939A1 (en) * 2002-04-16 2003-10-16 Edirisooriya Samatha J. Conditional read and invalidate for use in coherent multiprocessor systems
CN101201723A (en) * 2006-12-14 2008-06-18 英业达股份有限公司 Virtual disc router system, virtual disc accesses system and method
CN101055511B (en) * 2007-05-16 2010-05-26 华为技术有限公司 Memory array system and its data operation method
CN101840309B (en) * 2009-10-28 2011-10-26 创新科存储技术有限公司 Access control method and system of double control disk array in multipath environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6728258B1 (en) * 1995-11-15 2004-04-27 Hitachi, Ltd. Multi-processor system and its network
CN1818855A (en) * 2005-02-09 2006-08-16 国际商业机器公司 Method and apparatus for performing data prefetch in a multiprocessor system
CN101311894A (en) * 2007-03-30 2008-11-26 英特尔公司 Method and apparatus for speculative prefetching in a multi-processor/multi-core message-passing machine
CN101630303A (en) * 2009-08-24 2010-01-20 成都市华为赛门铁克科技有限公司 Request message processing method, device and multi-processor memory system

Also Published As

Publication number Publication date
CN103635887A (en) 2014-03-12
WO2015039352A1 (en) 2015-03-26

Similar Documents

Publication Publication Date Title
CN103635887B (en) Data caching method and storage system
CN108459826B (en) Method and device for processing IO (input/output) request
US10198363B2 (en) Reducing data I/O using in-memory data structures
US9128855B1 (en) Flash cache partitioning
US8760956B1 (en) Data processing method and apparatus
CN102486752B (en) Data pre-fetching in SAS expander
US9817865B2 (en) Direct lookup for identifying duplicate data in a data deduplication system
CN110557964B (en) Data writing method, client server and system
CN108363641B (en) Main and standby machine data transmission method, control node and database system
US20180150472A1 (en) Method and apparatus for file compaction in key-value store system
CN101644996A (en) Storage method of index data and storage control device
CN107329704B (en) Cache mirroring method and controller
CN102841854A (en) Method and system for executing data reading based on dynamic hierarchical memory cache (hmc) awareness
CN112114753B (en) Data writing method, device and equipment
CN103399823A (en) Method, equipment and system for storing service data
JP2016153957A (en) Data arrangement program, data arrangement device, and data arrangement method
CN115470157A (en) Prefetching method, electronic device, storage medium, and program product
CN101783797A (en) Alarm pushing method and server thereof
JP2018511131A (en) Hierarchical cost-based caching for online media
US20150268858A1 (en) Computer system, cash data management method, and computer
US8055815B2 (en) Optimal paths with SCSI I/O referrals
CN113835613B (en) File reading method and device, electronic equipment and storage medium
CN108153883B (en) Search method and apparatus, computer device, program product, and storage medium
CN112416262B (en) Data pre-reading method in solid state disk, storage medium and electronic device
KR100470914B1 (en) Method and apparatus for controlling a disk cache in a disk array system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant