WO2013091192A1 - 提供多设备镜像和条带功能的磁盘缓存方法、设备和系统 - Google Patents

提供多设备镜像和条带功能的磁盘缓存方法、设备和系统 Download PDF

Info

Publication number
WO2013091192A1
WO2013091192A1 PCT/CN2011/084359 CN2011084359W WO2013091192A1 WO 2013091192 A1 WO2013091192 A1 WO 2013091192A1 CN 2011084359 W CN2011084359 W CN 2011084359W WO 2013091192 A1 WO2013091192 A1 WO 2013091192A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache
data
ssd
addresses
devices
Prior art date
Application number
PCT/CN2011/084359
Other languages
English (en)
French (fr)
Inventor
秦岭
温正湖
章晓峰
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201180004852.2A priority Critical patent/CN102713828B/zh
Priority to PCT/CN2011/084359 priority patent/WO2013091192A1/zh
Publication of WO2013091192A1 publication Critical patent/WO2013091192A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1666Error detection or correction of the data by redundancy in hardware where the redundant component is memory or memory area
    • 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/0893Caches characterised by their organisation or structure
    • G06F12/0895Caches characterised by their organisation or structure of parts of caches, e.g. directory or tag array
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements

Definitions

  • Disk caching method, device and system providing multi-device mirroring and striping functions
  • the present invention relates to data caching. Background technique
  • a high-speed memory between the disk and the memory can be set between the main memory and the disk, and a part of the instruction or data near the address of the instruction being executed is transferred from the disk into the memory. Reduce the amount of time the CPU waits for data. This has a great effect on improving the speed of the program.
  • This high-speed memory between the main memory and the disk is called a cache, that is, a cache.
  • Figure 1 is a schematic diagram of the address mapping relationship of the disk cache data block of facebook flashcache.
  • a non-volatile medium including SSD, PCM, etc., hereinafter referred to as SSD
  • a disk cache is cached in the same mode as the memory.
  • the group associative mode is used as the address mapping method of the disk HDD to the cache SSD.
  • the space of the SSD is equally divided into several groups, each group consisting of 512 SSD data blocks, each of which is 4 KB in size.
  • the disk space is divided into n areas of SSD size, and the organization of each area is the same as that of the SSD.
  • the number of groups is the total number of groups in the SSD.
  • the present invention provides a method of performing an input/output 10 operation on a plurality of cache devices.
  • the cache device management information is configured for the multiple cache devices.
  • the method includes: selecting at least one of a configuration stripe and a mirroring based on a first 10 operation; searching for, in a different cache device consistent with a configuration requirement of at least one of the stripe and the mirror, according to the cache device management information a cache address; submitting input and output data corresponding to at least one of the stripe and the mirror to a cache address in the different cache device such that the cache block is configured as a mirror or a stripe.
  • the present invention provides, in a second aspect, an apparatus for performing input/output 10 operations on a plurality of cache devices.
  • the device includes: the device mapping module determines whether the 10 operation request is to be forwarded by the plurality of cache devices and whether the processing involves at least one of a stripe and a mirror; the strip/mirror management module, the operation at 10 needs to be When performing the at least one operation of the striping and the mirroring, the cache device management information is used to search for a cache address in a different cache device that matches the configuration requirement of at least one of the stripe and the mirror; The request execution module submits input and output data corresponding to at least one of the stripe and the mirror to a cache address in the different cache device, such that the cache address is configured as a mirror or a stripe.
  • the present invention provides a system for performing input and output 10 operations on a plurality of cache devices.
  • the system includes a disk, a plurality of cache devices that provide caching for the disk, and a processing device of the memory; wherein the processing device determines whether the 10 operation request for the memory is to be forwarded by the plurality of cache devices and whether the processing involves at least one of a stripe and a mirror;
  • the processing device determines whether the 10 operation request for the memory is to be forwarded by the plurality of cache devices and whether the processing involves at least one of a stripe and a mirror;
  • the present invention provides a method for processing cache data, where the method includes: a cache management module reads cache block information, the cache block information includes at least two addresses, and the at least two The address points to at least two different SSD cache devices; the cache management module initiates a data read operation to the at least two SSD cache devices according to at least two addresses in the cache block information.
  • the present invention provides a cache management device for buffering data.
  • the device includes: a reading module, configured to read cache block information, the cache block information includes at least two addresses, the at least two addresses point to at least two different S SD cache devices; At least two addresses in the cache block information initiate a data read operation to the at least two S SD cache devices.
  • the present invention provides a processing system for buffering data.
  • the processing system includes: a plurality of SSD cache devices; a cache management device, reading cache block information, the cache block information includes at least two addresses, and the at least two addresses point to at least two different S SD cache devices; And initiating a data read operation to at least two of the plurality of SSD cache devices according to at least two addresses in the cache block information.
  • Figure 1 is a schematic diagram of the address mapping relationship of the disk cache data block of the facebook flashcache
  • Figure 3 is a schematic diagram of the organization of the cache and main memory in the group associative mode
  • FIG. 4 is a schematic diagram of a disk cache composed of a plurality of SSD devices
  • FIG. 5 is a schematic diagram of a disk cache multi-device mirroring/striping configuration according to an embodiment of the present invention
  • FIG. 6 is a flowchart of operations for mirroring/striping in a cache
  • Figure 7 is a flow chart of the operation of mirror reconfiguration after dirty data is written back
  • FIG. 8 is a schematic diagram of an operation flow of performing stripe reconfiguration after a clean data write hit
  • FIG. 9 is a schematic diagram of a state before performing cache space expansion
  • FIG. 10 is a schematic diagram of a state after performing cache space expansion and completing data migration
  • FIG. 11 is a schematic diagram showing a state before buffer space shrinkage
  • Figure 12 is a schematic diagram of the state after the completion of the buffer space contraction.
  • Figure 13 is an example of metadata of a virtual group cache_set
  • Figure 14 is an example of a virtual block cache_block
  • Figure 15 is an example of the value of cacheblock.state
  • Figure 16 is an example of buffer pool control information
  • 17 is an example of control information of an ssd device
  • Figure 18 is an example of the ssd group metadata ssd_set
  • Figure 19 is an example of the metadata ssd_block
  • 21 is a schematic diagram of a cache management device according to an embodiment of the present invention. detailed description
  • the technical solution of the present invention implements the mirroring and striping function of the cached data in the cache by improving the cache device management mode of the disk cache and the address mapping mode of the cached data block, so that the user can select the cached data block according to different characteristics or user needs. Differentiated image And strip configuration for optimal combination of performance and reliability.
  • the present invention provides a method of processing cached data.
  • the method includes: the cache management module reads cache block information, the cache block information includes at least two addresses, the at least two addresses point to at least two different SSD cache devices; and the cache management module is configured according to the cache At least two addresses in the block information initiate a data read operation to the at least two SSD cache devices.
  • the method includes submitting input and output data corresponding to the stripe to the two addresses before the step of the cache management module reading the cache block information, such that the two addresses are configured as strips.
  • the method includes: performing a dirty data write back before the step of the cache management module reading the cache block information; and the step of writing the dirty data back to the dirty data write back operation and the address configured as a mirror image
  • the image in one address is retained and the image in the other address is deleted.
  • the method includes: before the step of the cache management module reading the cache block information, searching for a configuration of an address related to the cache write hit operation; in the case that the configuration is a stripe, the configuration requirement of the lookup mirror is consistent Address; submit input and output data consistent with the image to a different address, such that the cache address is configured as a mirror.
  • the present invention provides a cache management device for caching data.
  • the device includes: a reading module, configured to read cache block information, the cache block information includes at least two addresses, the at least two addresses point to at least two different SSD cache devices; At least two addresses in the cache block information initiate a data read operation to the at least two SSD cache devices.
  • the present invention provides a processing system for caching data.
  • the processing system includes: a plurality of SSD cache devices; a cache management device, reading cache block information, the cache block information including at least two addresses, the at least two addresses pointing to at least two different SSD cache devices; At least two addresses in the cache block information initiate a data read operation to at least two of the plurality of SSD cache devices.
  • a method of performing input and output 10 operations on a plurality of cache devices is provided.
  • the cache device management information is configured for the multiple cache devices.
  • the method includes: selecting at least one of a configuration stripe and a mirroring based on a first 10 operation; searching for, in a different cache device consistent with a configuration requirement of at least one of the stripe and the mirror, according to the cache device management information Cache address; submit input and output data corresponding to at least one of the stripe and the mirror to a cache address in the different cache device, such that the cache address is configured as a mirror or a stripe.
  • the first 10 operations are writing data to the disk, writing data missing from the disk read operation to the cache device, or buffering a write hit, wherein at least one of the stripe and the mirror is a mirror.
  • the first 10 operation is to perform disk write back to the dirty data, at least one of the strip and the mirror is a strip.
  • the method includes: searching, according to the cache device management information, a configuration of a cache address in the cache device related to the second 10 operation; in the case that the configuration is one of a mirror and a stripe, according to the cache device management information Finding a cache address in a different cache device that matches the configuration requirements of another of the mirror and the stripe; submitting the input and output data corresponding to the other of the mirror and the stripe to a cache address in the different cache device,
  • the cache address is configured as a mirror or stripe.
  • the second operation is to perform disk write back to the dirty data, one of the mirror and the strip is a mirror, and the other of the mirror and the strip is a strip.
  • the second 10th operation is to write a hit to the cache, one of the mirror and the stripe is a stripe, and the other of the mirror and stripe is a mirror.
  • At least one of the stripe and the mirror is a mirror, the method comprising retaining one mirror and deleting the other mirrors in the event that the third 10 operation is associated with a cached address configured as a mirror. Further preferably, the third 10 operation is dirty data write back.
  • the method includes: when adding at least one new cache device to the multiple cache devices, searching for at least one of the plurality of cache devices configured as a stripe and/or a mirror according to the cache device management information. a cache address and migrating the stripe and/or mirror on the first cache address to at least one new cache device. Further preferably, the migration strip Or the step of mirroring involves changing the image into strips.
  • the migrating step includes: searching, according to the cache device management information, a second cache address that matches a configuration requirement of a stripe and/or a mirror on the first cache address in the at least one new cache device; submitting the first cache address And inputting and outputting data to the second cache address, such that the second cache address is configured as a mirror or a stripe.
  • the method includes: when the at least one cache device is released from the multiple cache devices, searching for a third cache address configured as a stripe and/or a mirror in the at least one cache device according to the cache device management information. And migrating the stripes and/or images in the third cache address to other cache devices of the plurality of cache devices. Further preferably, when the cache device is released, a portion of the stripe and/or the image in the at least one cache device is deleted. Alternatively, when the at least one cache device is released, data in at least a portion of the cache block of the at least one cache device is deleted.
  • the method includes updating the cache device management information after the step of submitting the input and output data corresponding to at least one of the stripe and the mirror to the cache address in the different cache device.
  • the plurality of cache devices are managed in a group associative mode.
  • the plurality of cache devices perform 10 operations in units of data blocks.
  • the plurality of cache devices provide a cache function for the disk
  • the method includes determining whether the first 10 operations for the memory need to be forwarded to the plurality of cache devices, and executing the scenario if forwarding to the plurality of cache devices is required.
  • the step of selecting at least one of a strip and a mirror is selected.
  • the step of the cache management module reading the cache block information comprises parsing the cache block information to obtain the at least two addresses.
  • the method includes initializing block input and output data bio according to the analysis result, and the cache management module initiates a data read operation to the at least two SSD cache devices according to at least two addresses in the cache block information.
  • the step includes submitting bio to the at least two SSD cache devices.
  • an apparatus for performing input and output 10 operations on a plurality of cache devices includes: a device mapping module, determining whether the 10 operation request is to be forwarded by The plurality of cache device processes and whether the process involves at least one of a stripe and a mirror; the strip/mirror management module, at 10 operations requiring at least one of striping and mirroring in the plurality of cache devices In an operation, searching for a cache address in a different cache device that matches a configuration requirement of at least one of the stripe and the mirror according to the cache device management information;
  • the request execution module submits input and output data corresponding to at least one of the stripe and the mirror to a cache address in the different cache device such that the cache address is configured as a mirror or a stripe.
  • the strip/mirror management module searches for a configuration of a cache address in the cache device related to the second 10 operation according to the cache device management information, in the case that the configuration is one of a mirror and a stripe, according to the cache device Management information, looking for a cache address in a different cache device that matches the configuration requirements of another of the mirror and the stripe; 10 requesting the execution module to submit input and output data corresponding to the other of the mirror and stripe to the different cache
  • the cache address is configured as a mirror or a stripe.
  • the plurality of cache devices are a flash solid state drive SSD or a phase change memory solid state drive PCM SSD.
  • the reading module includes a parsing module that parses the cache block information to obtain the at least two addresses.
  • the cache management device includes an initialization module that initializes block input and output data b i o according to the result of the analysis, and the initiating module submits b i o to the at least two SSD cache devices.
  • a system for performing input and output 10 operations on a plurality of cache devices includes a disk, a plurality of cache devices providing a cache function for the disk, and a processing device having a memory; wherein the processing device determines whether a 10 operation request for the memory is to be forwarded by the plurality of cache devices and whether the process involves a strip At least one of a band and a mirror; when the 10 operations require at least one of striping and mirroring in the plurality of cache devices, searching for at least one of the stripe and the mirror according to the cache device management information a configuration requesting a cache address in a different cache device; submitting input and output data corresponding to at least one of the stripe and the mirror to a cache address in the different cache device, such that the cache address is configured as a mirror Or strips.
  • the cache management device parses the cache block information to obtain the at least two addresses. Further preferably, the cache management device initializes the block input and output data bio according to the parsing result, and submits bio to the at least two SSD cache devices.
  • 2 is a system block diagram of an embodiment of the present invention. As shown in FIG. 2, the system includes a processing device and a cache pool 27.
  • the processing device includes an application 21, a device mapping module 23, a stripe and mirror management module 24, 10 requesting the execution module 25, and a virtual cache device 26.
  • the cache pool 27 is used to store cached data, which is a single virtual device.
  • Cache pool 27 can consist of multiple physical or logical cache devices. Each logical cache device can be a partition of a cache device, or a full cache disk, or a cache array configured to some sort of RAID level. In this example, the cache pool consists of SSD devices.
  • the cache pool 27 performs 10 operations in units of data blocks. Each cache block of the cache device uses metadata to manage the data block.
  • the cache pool 27 can alleviate the conflict of speed mismatch between the central processor and the disk 22. When the processor accesses a unit of the disk 22, the set of unit contents including the unit can be transferred to the buffer pool 27 so that the processor directly accesses the buffer pool 27.
  • the cache pool 27 can be connected to a computer device through a slot or to a computer device through a remote network.
  • the virtual cache device 26 includes cache device management and cache block management required to perform 10 operations on the cache pool 27.
  • the virtual cache device 26 is stored in the memory.
  • the device mapping module 23 in the kernel determines whether the 10 operation request is to be forwarded by the buffer pool 27 and the buffer pool if it is determined that there is no relevant data in the memory and thus needs to be read from the disk, or if the data needs to be written to the disk. Whether the processing of 27 involves striping/mirror operations. If a stripe/mirror operation is required in the cache pool 27, the strip/mirror management module 24 is invoked. The strip/mirror management module 24 accesses the virtual cache device 26 to obtain cache device management and cache block management and obtain cache block metadata in the cache pool to find different cache devices that match the strip and/or mirror configuration requirements.
  • the cache block in , and prepares the block input and output data in accordance with the strip and/or image. Strip/mirror after strip and/or mirror management operations are completed
  • the image management module 24 passes the cache device and cache block information and the input and output data to the 10 request execution module 25.
  • the request execution module 25 completes the read and write operations to the cache pool 27.
  • the request execution module 25 also has access to a disk (HDD) 22 as needed.
  • information of the underlying cache device can be added.
  • the information of the underlying cache device includes its total capacity, used capacity, interface type of the device, and device properties (RAI D devices such as a device, a mirror, or a stripe). This information is used to query when buffer block allocations to write data to the most reasonable location to maximize its performance.
  • RAI D devices such as a device, a mirror, or a stripe
  • the strip/mirror management module 24 performs striping/mirroring configuration or reconfiguration based on the type of data or user needs.
  • the clean data in the cache is configured as a multi-device stripe to improve its read and write performance.
  • the dirty data in the cache is configured as a multi-device image, and when a device with a copy fails or a 10 error occurs, the data copy on the other device can still be read to improve the fault tolerance of the cached data.
  • the mirroring or striping data of the data can be dynamically adjusted. Users can also set a custom image or stripe mode.
  • the clean data can be changed to the mirror/strip mode when the write data becomes dirty data, and the mirror/strip is implemented. Reconfiguration.
  • the mirror/strip can be reconfigured based on the information of the underlying cache device owned by the changed cache.
  • the mapping mode helps to improve the utilization efficiency between memory and cache.
  • the group associative mode is a memory address commonly used by the CPU cache to the cache mapping mode. It is between a direct map and a fully associative map. A good balance is achieved between memory address translation complexity, cache block placement flexibility, and space utilization, and the overall efficiency is high.
  • Figure 3 is a schematic diagram of the organization of the cache and main memory in the group associative mode. As shown, there are N areas in the main memory. Each block has m blocks, which are grouped into two groups, the Q group and the first group. The cache has m blocks, which are also grouped into two groups. According to the group associative mode, the data blocks in the main memory are mapped in groups to the cached data blocks of the same group. However, the block numbers of the two data blocks may be different. For example, the (N-1) m-1 block of the main memory belongs to the 0th group, and it may be mapped to the 0th block or the 1st block of the 0th group of the cache.
  • mapping methods including direct mapping and full associative mapping should also be covered.
  • FIG. 4 is a schematic diagram of a disk cache consisting of multiple SSD devices.
  • the SSD cache pool includes but is not limited to three SSD devices ssdl, ssd2 and ssd3.
  • Each SSD device can be organized in a group associative mode and split into a series of physical cache blocks (hereinafter referred to as physical blocks).
  • Data is stored in each physical block and includes metadata used to manage the physical block
  • Ssd_block The consecutive physical blocks are grouped into physical groups including metadata ssd_set that manages the data block information of the physical group.
  • Each physical block's ssd_block has a field indicating the physical group ssd_set to which it belongs. In the figure, ssdl has group 1, group 3, and so on.
  • a virtual cache device can correspond to all or part of the space of multiple SSD devices.
  • Virtual cache devices are organized in the same way as SSD devices, in this case organized in a group associative mode.
  • the virtual cache device is split into some virtual blocks, and the metadata cache_block is used to manage the control information of the block.
  • a set of consecutive virtual blocks are organized into virtual groups, and the metadata cache_set is used to maintain virtual block information in the group.
  • the cache_block has a field indicating which virtual group the virtual block it belongs to belongs to.
  • Cache_set has basically the same structure as ssd_set.
  • a virtual cache device has multiple virtual groups, such as group 1, group 3, and so on. Taking virtual group 1 as an example, the group corresponds to group 1 in ssdl, group 1 in ssd2, and group 1 in ssd3.
  • Figure 13 is an example of metadata of the virtual group cache_set. Based on the field s_index, you can find the cache-set of this group. Based on s-block-list, you can quickly find the pointer (cache-block) of each virtual block in the group, and then locate the virtual block. In addition, you can also count the number of dirty blocks in the group based on s_nr_dirty.
  • Figure 14 is an example of a virtual block cache_block.
  • Use the field b_dbn to locate the sector number of the virtual block on the disk.
  • Use the field b-cacheblock-state to identify whether the virtual block is free or valid, regular configuration, mirror configuration or stripe configuration.
  • the field b_ssd_block can be used to quickly find ssd_blocks of different images or stripes.
  • the field b_cacheset indicates the virtual group cache_set to which the virtual block belongs.
  • Figure 15 is an example of the value of cacheblock.state.
  • Figure 16 is an example of buffer pool control information.
  • the field p-ssd_header can locate all ssd devices.
  • the field -pool-avail-size can be used to determine the available space for this cache pool.
  • the field -ssd.header can be used to locate all SSD devices in the cache pool.
  • Figure 17 is an example of control information for the ssd device.
  • the field ssd_avail_size can be used to determine the free space of the ssd device.
  • the field cache_pool determines the cache pool to which the ssd device belongs.
  • Figure 18 is an example of the ssd group metadata ssd_set.
  • the group ssd.set can be found based on the field s _ index, and each physical block cache_set in the group can be found based on the field s_block_list.
  • Fig. 19 is an example of the metadata ssd_block.
  • the field owner _ s sd indicates the SSD device where the cache block is located.
  • the field ssd_block_offset indicates the starting offset of the physical block in the SSD device.
  • the field owner_cacheblock indicates the virtual block cache_block: where the cache block is located.
  • the field same_cacheblock-1 ist belongs to the physical block list of the same virtual block cache-block. When the mirror or stripe needs to be migrated (such as the cache space shrinking mentioned below), the fields owner-cacheblock and same-cacheblock- 1 ist help to quickly Locate the image and strip.
  • mirror/strip configuration, reconfiguration, and migration operations when adding or releasing devices can be implemented in SSD devices.
  • FIG. 5 is a schematic diagram of a disk cache multi-device image/strip configuration according to an embodiment of the present invention.
  • the read and write of the disk data block 10 requests are processed by the kernel to be processed by the virtual cache device.
  • the virtual cache device determines the virtual group number that the data should be cached according to the disk sector number of the disk data block through the group associative mapping policy.
  • Group number ( dbn / block size / group size) mod (number of groups), where dbn represents the sector number of the disk data block, the block size is the SSD block size, and the group size is the number of data blocks in the group.
  • the number of groups is the total number of groups in the SSD device. Assume that the location of the data cache is determined to be in group 1.
  • group 1 consists of five virtual blocks. According to the field
  • B-cacheblock.state determines that the currently free virtual blocks have virtual blocks 1, 3, 4, and 5, respectively.
  • virtual block allocation can be performed on the data.
  • the virtual block 1 is configured in mirror mode, and the number of mirrors is, for example, two. Dirty data is generally assigned to virtual block 1.
  • the source of dirty data is a user-initiated write to disk. When writing, the original 10 request was cloned into two.
  • Query SSD device control information (field
  • Ssd_avail_size found that ssd 1 and ssd 2 have more free space.
  • Set the target device in 10 requests to ssd 1 and ssd 2, and set the 10 requested start disk location and length fields. Submit 10 requests to both devices to complete the data write.
  • the two copies are stored in group 1 (physical block) of ssd 1 and ssd 2, respectively, and are marked as “1 mirror” and “1 mirror”, respectively, where "1" indicates that they are from virtual block 1.
  • Virtual block 1 is labeled "IMA” and MA represents the mirror address.
  • the virtual block 1 metadata cache_block #zhang is as follows: Field b_dbn records the sector number of the buffered data block on the disk;
  • B-cacheblock.state i has the virtual block as a mirror, and the field b_ssd-block uses a double-linked list to link two ssd physical blocks belonging to the virtual block. Save the pair in group 1 of ssdl
  • the physical block of the ssd.block field records the virtual block number of the ssd physical block
  • the field same-cacheblock-list records the pointer of the ssd physical block in the group 1 of the ssd2 in the linked list.
  • do similar processing For the ssd physical block that holds the copy in group 1 of ssd2, do similar processing.
  • the control information of the cache pool and the control information of the ssd device are also modified accordingly.
  • the virtual block 4 is a stripe configuration, and the number of strips is two.
  • clean data is stored in the virtual block.
  • the source of the clean data is: 1.
  • the read operation misses, the virtual cache fills the missed data into the SSD device; 2.
  • the virtual cache executes the dirty data.
  • the disk write back operation becomes clean data.
  • the original 10 requests are split into two.
  • the SSD device control information field ssd_avail_size
  • B-cacheblock.state records that the virtual block is a stripe configuration, and the field b_ssd_block links the two ssd physical blocks belonging to the virtual block with a double linked list.
  • the field owner_cacheblock of the metadata ssd.block records the virtual block number where the ssd physical block is located, and the field same-cacheblock-list holds the copy in the group 1 of the ssd2 record in the linked list. Pointer to the ssd physical block.
  • the copy is processed in a similar manner.
  • the control information of the buffer pool and the control information of the ssd device are also modified accordingly.
  • Virtual blocks 3 and 5 are conventional configurations, ie only one copy of the data.
  • the 10 operation methods are the same.
  • the copies are stored in the cache blocks of group 1 of ssd3 and ssd2, respectively, and the cache blocks are labeled as "virtual block 3" and "virtual block 5", respectively.
  • the control information cache_block of the virtual blocks 3 and 5 is modified as follows:
  • the field b.dbn records the sector number of the buffered data block on the disk; the field b-cacheblock-state records that the virtual block is a conventional configuration.
  • the field owner-cache block of the metadata ssd.block records the virtual block number where the ssd physical block is located.
  • Figure 6 is a flow chart of the operation of mirroring/striping in the cache.
  • step S6QQ the configuration operation flow begins.
  • step S610 10 requests to be sent to the virtual cache device.
  • step S620 a write operation is found based on the 10 flag.
  • step S630 it is judged whether or not the dirty data is to be written. If it is dirty data, the flow goes to step S642; if it is not dirty data but defaults or needs to perform strip operation according to the user-defined rule, the flow goes to step S646; if it does not belong to the above, the flow goes to step S640.
  • step S640 the process determines whether a mirror/strip operation is required according to the user-defined rule. If necessary, go to step S642 or S646 respectively; otherwise, go to step S644 to perform normal flow processing.
  • step S642 the data is configured as a mirror, a corresponding number of block input and output data (bio) is created according to the required number of copies, and then the flow proceeds to step S650.
  • step S646 the data is split into a plurality of stripes to create bio data. Then, the flow proceeds to step S650.
  • a mirror/strip operation determined in accordance with the foregoing flow is performed to find a mirror/strip device that satisfies the write condition.
  • step S660 a suitable ssd physical block is searched for in the corresponding device.
  • step S670 each bio is initialized, and bio is submitted to the corresponding device.
  • step S680 the ssd physical block of the ssd device and the metadata of the belonging group are updated.
  • step S690 the virtual block of the virtual cache device and the metadata of the belonging group are updated.
  • step S699 the flow ends.
  • Dirty data is configured by default in mirror mode, and the cache will be timed or triggered by other operations to write back dirty data. After the dirty data is written back, the state of the data changes from dirty to clean. There are three treatment options available at this time.
  • the mirror/strip configuration of the data can be adjusted. After the dirty data is written back, the data is adjusted to a stripe configuration. This method can be used when the cached 10 is idle.
  • Figure 7 is a flow chart showing the operation of mirror reconfiguration after dirty data is written back. Assume that the cache block dirty data has two images. In this scenario, the reconfiguration of the mirror can be performed in the callback function after the buffer block dirty data is written back.
  • step S700 the configuration operation flow begins.
  • step S710 the cache initiates a dirty data write back 10 to the disk.
  • step S720 the system completes the write back 10 operation.
  • step S730 a plurality of bio data structures are created, and then the flow proceeds to step S740.
  • step S740 a strip device that satisfies the write condition is found.
  • step S750 a suitable ssd physical block is searched for in the corresponding device.
  • step S760 each bio is initialized and bio is submitted to the corresponding device.
  • step S770 the two cache block mirrors that complete the write back are invalidated.
  • the cache block image that completes the write back can pass the virtual block metadata cache_block (field b_dbn and
  • step S780 the ssd physical block of the ssd device and the metadata of the group are updated.
  • step S790 the virtual cached virtual blocks and the metadata of the group are updated.
  • the second scenario cache write hits.
  • hit cache block data There are several possible configurations for hit cache block data:
  • the hit is dirty data (the default is the mirror configuration), the data after the cache write hit can still maintain the image;
  • hit data is a regular configuration, you can add a copy to other devices or maintain the original general configuration state, depending on the free space in the current cache;
  • the stripe can be mirrored to improve the protection level of dirty data.
  • Figure 8 is a flow chart showing the operation of strip reconfiguration after a clean data write hit. Assume that the cache block data has two bands.
  • step S8QQ the configuration operation flow begins.
  • the cache initiates a dirty data write 10.
  • step S820 the cache hit is found, and the metadata status is non-dirty, so the configuration is determined to be a stripe.
  • step S830 the current bio is cloned into two bio data structures.
  • step S840 a mirror device that satisfies the write condition is found.
  • step S850 a suitable ssd physical block is searched for in the corresponding device.
  • step S860 each bio is initialized and bio is submitted to the corresponding device.
  • step S870 the cleaned cache block strip that is hit is invalidated.
  • the cached block strips that are hit can be located by the virtual block metadata cache_block (fields b.dbn and b_ssd_block).
  • step S880 the ssd physical block of the ssd device and the metadata of the group are updated.
  • step S890 the virtual cached virtual blocks and the metadata of the group are updated.
  • Figure 9 is a schematic diagram of the state before the cache space is expanded. Assume that the cached data is clean and configured as a stripe.
  • the cache pool consists of, for example, three devices, ssd 1, ssd2, and ssd3, where ssd2 and ssd3 are nearly exhausted, and ssdl has a small amount of space available.
  • Two bands in virtual block 1, strips 1 and 2 are stored in ssdl and ssd2, respectively, labeled "1 strip 1" and "1 strip 2".
  • the two bands of virtual block 3 are stored in ssd2 and ssd3 respectively ("3 strips 2" and “3 strips 1")
  • the two strips of virtual block 4 are stored in ssdl and ssd3 respectively ("4 Strip 1" and "4 strip 2”
  • the two strips of virtual block 5 are stored in ssd2 and ssd3 ("5 strips 1" and "5 strips 2").
  • FIG. 10 is a schematic diagram of a state after performing cache space expansion and completing data migration.
  • Figure 10 adds a new ssd 4 to the cache compared to Figure 9.
  • the space usage rate of other original cache devices may be determined based on the buffer pool control information (field p_pool_avail -size) and the ssd device control information (field ssd_avail_size), and in determining, for example, ssd 4 When there is more free space, some data in ssd 2 and ssd 3 are migrated to ssd 4.
  • the second strip of virtual block 3 originally located in ssd 2 (“3 strips 2") is migrated to ssd 4
  • the second strip of virtual block 5 originally located in ssd 3 (“5 strips with 2") migrated to ssd 4.
  • the metadata of the physical blocks and groups of the relevant ssd device and the virtual blocks of the virtual cache and the metadata of the group need to be updated to reflect the post-migration control information.
  • a hybrid mirror/strip configuration can also be introduced when the cache space is expanded. If you are migrating one of the mirrors of dirty data, you can change the mirror to two or more stripes. Taking two bands as an example, one strip is written to the new device, and the other strip can remain in the original device or migrate to the second new device (that is, when two new devices are added). In this way, it is possible to use both the image and the reliability protection of the dirty data, and the striping to improve the reading speed of the dirty data.
  • the cache block image/strip in the SSD device to be deleted can be migrated to other devices.
  • the first ssd physical block that has been allocated can be found by the control information of the ssd device (field least-allocated.block), and all the same ssd device is found in the metadata ssd_block (field same_ssd_block) of the physical block. Physical blocks have been allocated, thereby determining the mirror/strip or common configuration data that needs to be migrated.
  • Figure 11 is a schematic diagram of the state before the buffer space is shrunk.
  • the strips corresponding to virtual block 1 are stored in ssdl and ssd2, the strips corresponding to virtual block 2 are stored in ssd3 and ssd4, the strips corresponding to virtual block 3 are stored in ssdl and ssd3, and the strips corresponding to virtual block 4 are stored.
  • ssd2 and ssd4 are stored in ssdl and ssd2.
  • FIG. 12 is a schematic diagram of the state after the completion of the buffer space contraction.
  • Figure 20 is a schematic diagram of data reading in accordance with one embodiment of the present invention.
  • the cache management module receives a 10 data read request.
  • the 10 data read request can be issued by an application that needs to read the data.
  • the 10 data read request may include the address of the requested data.
  • step 2020 when it is determined that there is no relevant data in the memory and thus needs to be read from the disk, the disk address where the data is located is obtained.
  • step 2030 the corresponding cache block information is searched in the memory according to the disk address. If there is information corresponding to the cache block, it indicates that the disk data is backed up in the cache block of the cache pool.
  • the virtual block cache_block can be queried, and if there is a cache, a cache block belonging to the same virtual block linked by the double-linked list is queried through the cache-block.
  • the cache block information includes at least two addresses that point to at least two different SSD cache devices. In one example, the cache block information further includes 10 disk addresses where the data is located.
  • the SSD cache address information and the cache block size are parsed.
  • Parsing is to determine which cache device, which group, and which cache block in the cache pool where the cached data is located.
  • the parsing can be accomplished by means of one or more of virtual group cache_set, virtual block cache_block, buffer pool control information, ssd device control information, ssd group metadata ssd_set and metadata ssd.block.
  • each bio is initialized based on cache block information (such as device, data offset, data length).
  • step 2070 the bio is submitted to the corresponding SSD cache device.
  • the 10 operation callback process is completed, that is, a data read operation is initiated to the at least two SSD cache devices based on the at least two addresses.
  • a data read operation is initiated to the at least two SSD cache devices based on the at least two addresses.
  • the data corresponding to the at least two addresses are the same to obtain data from any of the at least two addresses.
  • the at least two addresses are identical to the number of the at least two different SSD cache devices and are respectively corresponding.
  • the device includes: a reading module 2110, configured to read cache block information, where the cache block information includes at least two addresses, the at least two addresses point to at least two different SSD cache devices; and the initiating module 2120, according to At least two addresses in the cache block information initiate a data read operation to the at least two SSD cache devices.
  • the cache management device includes a receiving module 2130 that receives a data read request, so that the read module reads the cache block information according to the 10 data read request.
  • the receiving module 2130 includes an obtaining module 2132, which acquires an address where the data requested by the data read request is located, and a search module 2134, which is located in the memory according to the address of the data requested by the 10 data read request. Find the information of the cache block.
  • the cache block information further includes a fourth address, where the fourth address is an address of the data in the disk; and the third address is an address of the data in the disk.
  • the information about the cache block further includes data size information, and the cache management device A determination module is included to determine a size of data read from the at least two different SSD cache devices.
  • the initiating module 2 1 2 2 includes: a reading module 2 1 22, reading data corresponding to the at least two addresses in the at least two SSD cache devices; a merge module 2 1 24, Data corresponding to at least two addresses are combined to respond to the 10 data read request.
  • the data corresponding to the at least two addresses is the same, and the initiating module 2 1 2 0 obtains data from any one of the at least two addresses.
  • the device further includes an obtaining module, configured to acquire usage information of all the SSD cache devices and configuration information, to select the largest free storage space among all the SSD cache devices according to the usage and configuration information of all the SSD cache devices.
  • the S SD cache device acts as an SSD cache device pointed to by the at least two addresses.
  • the data of the at least two SSD cache devices corresponds to a disk
  • the reading module reads the cache block information according to the request
  • the cache management device passes the The at least two addresses read data of the at least two SSD cache devices, and the data of the at least two SSD cache devices are correspondingly replaced with data on the disk.
  • the embodiment of the present invention also provides reconfiguration capability of the mirror/strip when the buffer space is expanded.
  • the usage of each device can be balanced by migrating the mirror/strip of the cache block, and the appropriate space for the subsequent new cache block mirror/strip allocation. It is also possible to configure cache data with high reliability and excellent performance by configuring a mixed configuration of dirty data mirroring and striping.
  • the dirty data block is switched from the mirror to the stripe to save the cache space; when the sensor cache becomes dirty, it is switched to the mirror image, and the reliability is improved in time. .
  • the SSD device can be various SSD devices, including but not limited to flash (flash) Save) SSD or PCM (Phase Change Memory) SSD.
  • flash flash
  • PCM Phase Change Memory
  • the present invention is not limited to the use of SSDs as a cache for disks, and other non-volatile flash media, such as the newly emerging PCM media, can be used as a cache medium for disks.
  • the disk can also be PATA (Parallel Advanced Technology Attachment), SATA (Serial Advanced Technology Attachment), SAS (Serial Connection SCS I Interface), and FC, USB (Universal Serial Bus) interface hard disk.
  • striping or mirroring operation is performed in units of cache blocks
  • the present invention can also perform striping or mirroring operations in units of cache addresses.
  • striping or mirroring operations are not limited to fixed size.
  • the cache block can be made to a cache address of any size.

Landscapes

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

Abstract

本发明提供一种对多个缓存设备进行输入输出IO操作的方法、设备和系统。所述方法包括:缓存管理模块读取缓存块信息,所述缓存块信息包括至少两个地址,所述至少两个地址指向至少两个不同的SSD缓存设备;所述缓存管理模块根据所述缓存块信息中的至少两个地址向所述至少两个SSD缓存设备发起数据读取操作。本发明实施例通过在缓存设备中配置缓存块条带,实现IO请求的多设备并行处理,提高缓存块读取的性能;通过对脏缓存块增加镜像副本,提高数据可靠性。

Description

说 明 书
提供多设备镜像和条带功能的磁盘緩存方法、 设备和系统 技术领域
本发明涉及数据緩存。 背景技术
众所周知, 磁盘与内存间的输入输出( 10)速度一直是系统性能的一 个重要瓶颈。 在 10密集型的应用场景下, CPU往往需要等待磁盘 10。 目 前很多系统采用内存或类似的易失性介质来作为磁盘的緩存, 用于提高
10速度。 但内存的价格较贵, 且下电后数据丟失。 根据程序的局部性原 理, 可以在主存和磁盘之间设置一个高速的容量介于磁盘和内存之间的 存储器, 把正在执行的指令地址附近的一部分指令或数据从磁盘调入这 个存储器, 大大缩短 CPU等待数据的时间。 这对提高程序的运行速度有 很大的作用。 这个介于主存和磁盘之间的高速存储器称作高速緩冲存储 器(Cache) , 即高速緩存。
当前为了提高磁盘的 I/O性能, 业界多家著名公司均在内存与磁盘 间加入了磁盘的高速緩存, 如 facebook公司的 flashcache (闪存)方案 是较为成熟的方案之一,已在 MySQL数据库服务器场景中应用。 SSD( solid state disk, 固态硬盘)是非常适合作为緩存的一种非易失性存储器, 可 以基本避免数据丟失。
图 1是 facebook flashcache的磁盘緩存数据块地址映射关系示意 图。 如图 1所示,在采用非易失性介质 (包括 SSD、 PCM等, 下文以 SSD 为例)作磁盘的高速緩存时, 采用与内存相同的模式来组织磁盘的緩存 ( cache )。使用组相联模式来作为磁盘 HDD到緩存 SSD的地址映射方式。 将 SSD的空间等分为若干个组, 每个组由 512个 SSD数据块组成, 每个 数据块为 4KB大小。 同样, 将磁盘空间分为 SSD大小的 n个区域, 每个 区域内的组织方式和 SSD的组织方式相同。 磁盘数据块到 SSD的映射公 式为: 组号 = ( dbn /块大小 /组大小) mod (组数), 其中 dbn表示磁盘数 据块的扇区号, 块大小为前述的 SSD数据块大小, 组大小为组中数据块 的数量。 组数为 SSD中组的总数目。 与此同时, 在内存中需要保留緩存 的元数据信息, 在緩存中也需要保留緩存的元数据信息, 两者需要同步。 利用这些元数据信息, 可以有效定位各个数据块。
然而, 该现有技术无法将数据动态地分布到多物理或逻辑緩存设备 上, 实现緩存数据的并行读写。 緩存的数据, 不论其特性如何, 即是否 为脏、 是否为重要的数据等, 均只有一个数据副本。 发明内容
本发明的目的是提供能够解决上述问题的緩存机制。
为此, 在第一方面, 本发明提供一种对多个緩存设备进行输入输出 10操作的方法。 其中为所述多个緩存设备配置緩存设备管理信息。 所述 方法包括: 基于第一 10操作,选择配置条带和镜像中的至少一个; 根据 緩存设备管理信息,查找与所述条带和镜像中的至少一个的配置要求相 符的不同緩存设备中的緩存地址; 提交与所述条带和镜像中的至少一个 相符的输入输出数据到所述不同緩存设备中的緩存地址, 从而所述緩存 块配置为镜像或条带。
本发明在第二方面提供一种对多个緩存设备进行输入输出 10操作的 设备。 该设备包括: 设备映射模块判断 10操作请求是否要转发由所述多 个緩存设备处理以及所述处理是否涉及条带和镜像中的至少一个操作; 条带 /镜像管理模块, 在 10操作需要在所述多个緩存设备中进行条带和 镜像中的至少一个操作时, 根据緩存设备管理信息,查找与所述条带和镜 像中的至少一个的配置要求相符的不同緩存设备中的緩存地址; 10请求 执行模块, 提交与所述条带和镜像中的至少一个相符的输入输出数据到 所述不同緩存设备中的緩存地址, 从而所述緩存地址配置为镜像或条带。
在第三方面, 本发明提供一种对多个緩存设备进行输入输出 10操作 的系统。 该系统包括磁盘、 为磁盘提供緩存功能的多个緩存设备和具有 内存的处理设备; 其中处理设备判断对内存的 10操作请求是否要转发由 所述多个緩存设备处理以及所述处理是否涉及条带和镜像中的至少一个 操作; 在 10操作需要在所述多个緩存设备中进行条带和镜像中的至少一 个操作时, 根据緩存设备管理信息,查找与所述条带和镜像中的至少一个 的配置要求相符的不同緩存设备中的緩存地址; 提交与所述条带和镜像 中的至少一个相符的输入输出数据到所述不同緩存设备中的緩存地址, 从而所述緩存地址配置为镜像或条带。
在第四方面, 本发明提供一种緩存数据的处理方法, 其特征在于, 所述方法包括: 緩存管理模块读取緩存块信息, 所述緩存块信息包括至 少两个地址,所述至少两个地址指向至少两个不同的 SSD緩存设备; 所述 緩存管理模块根据所述緩存块信息中的至少两个地址向所述至少两个 SSD緩存设备发起数据读取操作。
第五方面, 本发明提供一种緩存数据的緩存管理设备。 所述设备包 括: 读取模块, 用于读取緩存块信息, 所述緩存块信息包括至少两个地 址,所述至少两个地址指向至少两个不同的 S SD緩存设备; 发起模块, 根 据所述緩存块信息中的至少两个地址向所述至少两个 S SD 緩存设备发起 数据读取操作。
在第六方面, 本发明提供一种緩存数据的处理系统。所述处理系统包 括: 多个 SSD緩存设备; 緩存管理设备, 读取緩存块信息, 所述緩存块 信息包括至少两个地址,所述至少两个地址指向至少两个不同的 S SD緩存 设备; 根据所述緩存块信息中的至少两个地址向所述多个 SSD緩存设备 中的至少两个发起数据读取操作。
本发明实施例通过在緩存设备中配置緩存块条带, 实现 10请求的多 设备并行处理, 提高緩存块读取的性能; 通过对脏緩存块增加镜像副本, 提高数据可靠性。 附图说明
下面将参照附图对本发明的具体实施方案进行更详细的说明, 其 中:
图 1是 facebook flashcache的磁盘緩存数据块地址映射关系示意 图;
图 2是本发明实施例的系统框图;
图 3为组相联模式中緩存和主存的组织示意图;
图 4是由多个 SSD设备组成的磁盘緩存的示意图;
图 5是本发明实施例的磁盘緩存多设备镜像 /条带配置的示意图; 图 6为在緩存中进行镜像 /条带配置的操作流程图;
图 7是脏数据回写后进行镜像重配置的操作流程图;
图 8是干净数据写命中后进行条带重配置的操作流程示意图; 图 9是进行緩存空间扩展前的状态示意图;
图 10是进行緩存空间扩展并完成数据迁移后的状态示意图; 图 11是进行緩存空间收缩前的状态示意图;
图 12是完成緩存空间收缩后的状态示意图。
图 13是虚拟组 cache— set的元数据的一个例子;
图 14是虚拟块 cache_block的一个例子;
图 15是 cacheblock.state取值的一个例子;
图 16是緩存池控制信息的一个例子;
图 17是 ssd设备的控制信息的一个例子;
图 18是 ssd组元数据 ssd_set的一个例子;
图 19是元数据 ssd_ block的一个例子;
图 20是本发明一个实施例的数据读取示意图;
图 21是本发明一个实施例的緩存管理设备的示意图。 具体实施方式
本发明技术方案通过改进磁盘緩存的緩存设备管理模式和緩存数据 块的地址映射方式, 在緩存内部实现緩存数据的镜像和条带功能, 使用 户能够根据緩存数据块的不同特性或者用户需要对其进行差异化的镜像 和条带配置, 达到性能和可靠性上的最优结合。
在一个实施例中, 本发明提供一种緩存数据的处理方法。 所述方法 包括: 緩存管理模块读取緩存块信息, 所述緩存块信息包括至少两个地 址,所述至少两个地址指向至少两个不同的 SSD緩存设备; 所述緩存管理 模块根据所述緩存块信息中的至少两个地址向所述至少两个 SSD緩存设 备发起数据读取操作。
优选地, 所述方法包括在緩存管理模块读取緩存块信息的步骤之前, 提交与所述条带相符的输入输出数据到所述两个地址, 从而所述两个地 址配置为条带。
优选地, 所述方法包括, 在緩存管理模块读取緩存块信息的步骤之 前, 进行脏数据回写; 所述脏数据回写的步骤包括, 在该脏数据回写操 作和配置为镜像的地址有关的情况下, 保留一个地址中的镜像而删除其 它地址中的镜像。
优选地, 所述方法包括在緩存管理模块读取緩存块信息的步骤之前, 查找与对緩存写命中操作有关的地址的配置; 在所述配置为条带的情况 下, 查找镜像的配置要求相符的地址; 提交与所述镜像相符的输入输出 数据到不同的所述地址, 从而所述緩存地址配置为镜像。
在另一个实施例中, 本发明提供一种緩存数据的緩存管理设备。 所 述设备包括: 读取模块, 用于读取緩存块信息, 所述緩存块信息包括至 少两个地址,所述至少两个地址指向至少两个不同的 SSD緩存设备; 发起 模块, 根据所述緩存块信息中的至少两个地址向所述至少两个 SSD 緩存 设备发起数据读取操作。
在又一个实施例中, 本发明提供一种緩存数据的处理系统。所述处理 系统包括: 多个 SSD緩存设备; 緩存管理设备, 读取緩存块信息, 所述 緩存块信息包括至少两个地址,所述至少两个地址指向至少两个不同的 SSD緩存设备;根据所述緩存块信息中的至少两个地址向所述多个 SSD緩 存设备中的至少两个发起数据读取操作。 在再一个实施例中, 提供一种对多个緩存设备进行输入输出 10操作 的方法。 其中为所述多个緩存设备配置緩存设备管理信息。 所述方法包 括: 基于第一 10操作,选择配置条带和镜像中的至少一个; 根据緩存设 备管理信息,查找与所述条带和镜像中的至少一个的配置要求相符的不 同緩存设备中的緩存地址; 提交与所述条带和镜像中的至少一个相符的 输入输出数据到所述不同緩存设备中的緩存地址, 从而所述緩存地址配 置为镜像或条带。
优选地, 第一 10操作是对磁盘写数据, 将磁盘读操作未命中的数据 写入緩存设备, 或者緩存写命中, 其中所述条带和镜像中的至少一个是 镜像。
优选地, 第一 10操作是对脏数据进行磁盘回写, 所述条带和镜像中 的至少一个是条带。
优选地, 所述方法包括根据緩存设备管理信息,查找与第二 10 操作 有关的緩存设备中的緩存地址的配置; 在所述配置为镜像和条带之一的 情况下, 根据緩存设备管理信息,查找与镜像和条带之另一个的配置要求 相符的不同緩存设备中的緩存地址; 提交与所述镜像和条带之另一个相 符的输入输出数据到所述不同緩存设备中的緩存地址, 从而所述緩存地 址配置为镜像或条带。 进一步优选地, 第二 10操作是对脏数据进行磁盘 回写, 镜像和条带之一是镜像, 镜像和条带之另一个是条带。 或者, 第 二 10操作是对緩存写命中, 镜像和条带之一是条带, 镜像和条带之另一 个是镜像。
优选地, 条带和镜像中的至少一个是镜像, 所述方法包括在第三 10 操作和配置为镜像的緩存地址有关的情况下, 保留一个镜像而删除其它 镜像。 进一步优选地, 第三 10操作是脏数据回写。
优选地, 所述方法包括在所述多个緩存设备中添加至少一个新緩存 设备时, 根据緩存设备管理信息, 查找所述多个緩存设备中的至少一个 配置为条带和 /或镜像的第一緩存地址, 并且将所述第一緩存地址上的条 带和 /或镜像迁移到至少一个新緩存设备。 进一步优选地, 所述迁移条带 或镜像的步骤包括将镜像变为条带。 或者, 所述迁移步骤包括根据緩存 设备管理信息,在至少一个新緩存设备中查找与第一緩存地址上的条带 和 /或镜像的配置要求相符的第二緩存地址; 提交第一緩存地址中的输入 输出数据到所述第二緩存地址, 从而所述第二緩存地址配置为镜像或条 带。
优选地, 所述方法包括当所述多个緩存设备中释放至少一个緩存设 备时, 根据緩存设备管理信息, 查找所述至少一个緩存设备中的配置为 条带和 /或镜像的第三緩存地址并且将第三緩存地址中的条带和 /或镜像 迁移到所述多个緩存设备中的其它緩存设备。 进一步优选地, 在释放所 述緩存设备时, 删除所述至少一个緩存设备中的条带和 /或镜像中的一部 分。 或者, 在释放所述至少一个緩存设备时, 删除该至少一个緩存设备 的至少一部分较冷緩存块中的数据。
优选地, 所述方法包括在提交与所述条带和镜像中的至少一个相符 的输入输出数据到所述不同緩存设备中的緩存地址的步骤之后, 更新緩 存设备管理信息。
优选地, 多个緩存设备采用组相联模式管理。
优选地, 多个緩存设备按数据块为单位进行 10操作。
优选地, 所述多个緩存设备为磁盘提供緩存功能, 所述方法包括判 断针对内存的第一 10操作是否需要转发给多个緩存设备, 并且在需要转 发给多个緩存设备的情况下执行所述选择配置条带和镜像中的至少一个 的步骤。
优选地, 緩存管理模块读取緩存块信息的步骤包括解析緩存块信息, 以得到所述至少两个地址。 进一步优选地, 所述方法包括根据解析结果 初始化块输入输出数据 b i o ,所述緩存管理模块根据所述緩存块信息中的 至少两个地址向所述至少两个 SSD 緩存设备发起数据读取操作的步骤包 括提交 b i o到所述至少两个 SSD緩存设备。
在再又一个实施例中, 提供一种对多个緩存设备进行输入输出 10操 作的设备。 该设备包括: 设备映射模块,判断 10操作请求是否要转发由 所述多个緩存设备处理以及所述处理是否涉及条带和镜像中的至少一个 操作; 条带 /镜像管理模块, 在 10操作需要在所述多个緩存设备中进行 条带和镜像中的至少一个操作时, 根据緩存设备管理信息,查找与所述条 带和镜像中的至少一个的配置要求相符的不同緩存设备中的緩存地址;
10请求执行模块, 提交与所述条带和镜像中的至少一个相符的输入输出 数据到所述不同緩存设备中的緩存地址, 从而所述緩存地址配置为镜像 或条带。
优选地, 条带 /镜像管理模块根据緩存设备管理信息,查找与第二 10 操作有关的緩存设备中的緩存地址的配置, 在所述配置为镜像和条带之 一的情况下, 根据緩存设备管理信息,查找与镜像和条带之另一个的配置 要求相符的不同緩存设备中的緩存地址; 10请求执行模块提交与所述镜 像和条带之另一个相符的输入输出数据到所述不同緩存设备中, 从而所 述緩存地址配置为镜像或条带。
优选地, 所述多个緩存设备是闪存固态硬盘 SSD或相变存储器固态 硬盘 PCM SSD。
优选地, 读取模块包括解析模块, 解析緩存块信息,以得到所述至少 两个地址。 进一步优选地, 所述緩存管理设备包括初始化模块, 根据解 析结果初始化块输入输出数据 b i o ,所述发起模块提交 b i o到所述至少两 个 SSD緩存设备。
在另又一个实施例中, 提供一种对多个緩存设备进行输入输出 10操 作的系统。 该系统包括磁盘、 为磁盘提供緩存功能的多个緩存设备和具 有内存的处理设备; 其中处理设备判断对内存的 10操作请求是否要转发 由所述多个緩存设备处理以及所述处理是否涉及条带和镜像中的至少一 个操作; 在 10操作需要在所述多个緩存设备中进行条带和镜像中的至少 一个操作时, 根据緩存设备管理信息,查找与所述条带和镜像中的至少一 个的配置要求相符的不同緩存设备中的緩存地址; 提交与所述条带和镜 像中的至少一个相符的输入输出数据到所述不同緩存设备中的緩存地 址, 从而所述緩存地址配置为镜像或条带。 优选地, 緩存管理设备解析緩存块信息,以得到所述至少两个地址。 进一步优选地, 所述緩存管理设备根据解析结果初始化块输入输出数据 b i o , 提交 b i o到所述至少两个 SSD緩存设备。 图 2是本发明实施例的系统框图。如图 2所示, 系统包括处理设备和 緩存池 27。 处理设备包括应用程序 21、 设备映射模块 23、 条带和镜像管 理模块 24、 10请求执行模块 25和虚拟緩存设备 26。
緩存池 27用于存放緩存的数据, 它是单一的虚拟设备。 緩存池 27 可以由多个物理或逻辑緩存设备组成。 每个逻辑緩存设备可以是一个緩 存设备的分区, 或一个完整的緩存盘, 或配置为某种 RAID级别的緩存阵 列等。 在本例中, 緩存池采用 SSD设备构成。 緩存池 27按数据块为单位 进行 10操作。 緩存设备的每个緩存块采用元数据进行本数据块的管理。 緩存池 27可以緩和中央处理器和磁盘 22之间速度不匹配的矛盾。 当处 理器存取磁盘 22的某一单元时, 可以将包括该单元在内的那一组单元内 容调入緩存池 27 , 以便处理器直接对緩存池 27进行存取。 緩存池 27可 以通过插槽连接到计算机设备中, 或者通过远端网络连接到计算机设备 中。
虚拟緩存设备 26包括对緩存池 27进行 10操作所需要的緩存设备管 理和緩存数据块管理。 虚拟緩存设备 26存放在内存中。
应用程序 21需要进行数据的读写操作时, 向内核发送 10操作请求。 内核中的设备映射模块 23在判断内存中没有相关的数据因而需要从磁盘 中读取,或者数据需要写入磁盘的情况下,继续判断该 10操作请求是否要 转发由緩存池 27处理以及緩存池 27的处理是否涉及条带 /镜像操作。 如 果需要在緩存池 27进行条带 /镜像操作, 则调用条带 /镜像管理模块 24。 条带 /镜像管理模块 24访问虚拟緩存设备 26获取緩存设备管理和緩存数 据块管理并且获取緩存池中的緩存块元数据, 查找与所述条带和 /或镜像 的配置要求相符的不同緩存设备中的緩存块, 并且准备与所述条带和 /或 镜像相符的块输入输出数据。 完成条带和 /或镜像管理操作后, 条带 /镜 像管理模块 24将緩存设备和緩存块信息以及输入输出数据交给 10请求 执行模块 25。 10请求执行模块 25完成对緩存池 27的读写操作。 10请求 执行模块 25根据需要, 还可以访问磁盘 (HDD ) 22。
上文结合不同模块对处理设备和处理系统的结构做了描述,但是本领 域的技术人员理解这些模块可以采用硬件、 软件、 固件或者其组合来实 现, 因此这些模块也可以采用其它的划分方式。
下文将对緩存设备管理做详细讨论。
具体地说, 在緩存设备管理上, 可以添加底层緩存设备的信息。 在一 个例子中, 所述底层緩存设备的信息包括其总容量、 已使用的容量、 设 备的接口类型和设备性质 (棵设备、 镜像或条带等 RAI D设备) 等。 这些 信息用于緩存块分配时进行查询, 以便将数据写入到最合理的位置上, 最大化其 10性能。
在緩存数据块管理上, 可以添加和緩存块的镜像 /条带配置有关的信 息。 在一个例子中, 可以添加緩存块的镜像 /条带标志字段, 添加镜像 / 条带数量字段, 添加镜像 /条带的底层存储设备及其偏移字段。
在工作中 ,条带 /镜像管理模块 24根据数据类型或用户需要来对数据 进行条带 /镜像配置或重配置。
在一个例子中, 当数据类型为干净的数据时,将緩存中干净的数据配 置为多设备条带, 提高其读写性能。 将緩存中的脏数据配置为多设备镜 像, 在出现一个副本所在设备发生故障错误或 10出错时, 仍能够读取另 一个设备上的数据副本来提高緩存数据的容错能力。 数据的镜像或条带 数据可以动态调整。 用户还可以设置自定义的镜像或条带模式。
在緩存中数据的状态发生变化后,如脏数据通过磁盘回写操作变为干 净数据, 干净的数据由于写 10操作变为脏数据时, 能够改变其镜像 /条 带模式, 实现镜像 /条带的重配置。
在緩存的空间伸缩时,能够基于改变后的緩存所拥有的底层緩存设备 的信息, 对镜像 /条带进行重配置。
由于緩存设备增多, 内存和緩存之间的对应关系趋于复杂。采用恰当 的映射模式有助于提高内存和緩存之间的利用效率。 组相联模式是 CPU 緩存所常用的内存地址到緩存映射模式。 它介于直接映射和全相联映射 之间。 在内存地址变换复杂度和緩存块放置灵活性、 空间利用率之间达 成一个较好的平衡, 综合效率较高。
图 3为组相联模式中緩存和主存的组织示意图。 如图所示, 主存有 N 个区。 每个区有 m块, 分别编组为两组, 第 Q组和第 1组。 緩存有 m块, 也分别编组为两组。 按照组相联模式, 主存中的数据块按组映射到緩存 的同组的数据块。 但两个数据块的块号可以不同, 比如主存的第 (N-1 ) m-1块属于第 0组, 它可以映射到緩存的第 0组的第 0块或第 1块。
下文将结合组相联模式进一步描述本发明的有关实施例。但是, 本发 明不限于此, 还应该涵盖包括直接映射和全相联映射的其它映射方式。
图 4是由多个 SSD设备组成的磁盘緩存的示意图。 如图 4所示, SSD 緩存池包括但不限于三个 SSD设备 ssdl, ssd2和 ssd3。 每个 SSD设备均 可采用组相联模式来组织, 拆分为一系列物理緩存块 (下称物理块) 。 每个物理块中存储数据, 并且包括用来管理该物理块的元数据
ssd_block。 连续的物理块编组为物理组, 该物理组包括管理该物理组的 数据块信息的元数据 ssd_set。每个物理块的 ssd_block均有字段表明其 所属的物理组 ssd_set。 在图中 ssdl有组 1, 组 3等。
虚拟緩存设备 ( virtual cache device, vcd ) 可以对应于多个 SSD 设备的全部或部分空间。 虚拟緩存设备采用与 SSD设备相同的方式组织, 在本例中采用组相联模式组织。 虚拟緩存设备拆分为一些虚拟块, 并且 采用元数据 cache_block管理本块的控制信息。 一组连续的虚拟块组织 为虚拟组,并且采用元数据 cache_set维护该组中的虚拟块信息。 cache_ block有字段表示它所在的虚拟块属于哪个虚拟组。 cache_set具有和 ssd_set基本相同的结构。 图中, 虚拟緩存设备有多个虚拟组, 例如组 1, 组 3等。 以虚拟组 1为例, 该组对应于 ssdl中的组 1, ssd2中的组 1和 ssd3中的组 1。
可以采用不同结构的元数据来管理 SSD设备、虚拟緩存设备。 下面的 图 13-图 19给出了组相联模式下的例子。 需要说明, 这样的例子仅属说 明性的, 本发明包括但不限于这样的数据结构。
图 13是虚拟组 cache_set的元数据的一个例子。 基于字段 s_index 可以找到本组 cache— set, 基于 s— block—list可以快速找到组内各虚拟 块的指针( cache-block ),进而定位虚拟块。此外,还可以基于 s_nr_dirty 统计组内的脏块数。
图 14是虚拟块 cache_block的一个例子。 利用字段 b_dbn可以定位 虚拟块在磁盘中的扇区号。 利用字段 b-cacheblock-state可以识别本虚 拟块是空闲的还是有效的, 常规配置、 镜像配置还是条带配置。 在镜像 配置还是条带配置的情况下, 利用字段 b_ssd_block可以迅速找到不同 镜像或条带的 ssd_block。 字段 b_cacheset表明虚拟块所属的虚拟组 cache_set。
图 15是 cacheblock.state取值的一个例子。
图 16是緩存池控制信息的一个例子。字段 p-ssd_header可以定位所 有的 ssd设备。 字段 -pool-avail-size可以用于确定该緩存池的可用 空间。 字段 -ssd.header可以用于定位緩存池中所有 SSD设备。
图 17是 ssd设备的控制信息的一个例子。 字段 ssd_avail_size可 以用于确定该 ssd设备的可用空间。 字段 cache_pool可以确定 ssd设 备所属的緩存池。
图 18是 ssd组元数据 ssd_set的一个例子。 基于字段 s _ index可以 找到本组 ssd.set, 基于字段 s_block_list可以找到组内的各物理块 cache_set。
图 19是元数据 ssd_block的一个例子。 字段 owner _ s sd表明该緩存 块所在的 SSD设备。 字段 ssd_block_offset表明该物理块在 SSD设备中 的起始偏移。 字段 owner_cacheblock表明该緩存块所在的虚拟块 cache— block:。字段 same_cacheblock- 1 i s t属于同个虚拟块 cache-block 的物理块链表。 在镜像或条带需要迁移 (比如下文将提到的緩存空间收 缩) 时, 字段 owner— cacheblock和 same— cacheblock- 1 i s t有助于快速 定位有关镜像和条带。
基于图 13-19描述的元数据, 可以实现在 SSD设备中镜像 /条带的配 置、 重配置和在添加新设备或释放设备时的迁移操作。
图 5是本发明实施例的磁盘緩存多设备镜像 /条带配置的示意图。 如 图所示, 磁盘数据块的读写 10请求由内核转发由虚拟緩存设备处理。 虚 拟緩存设备通过组相联映射策略, 根据磁盘数据块的磁盘扇区号来确定 该数据应緩存的虚拟组组号。 组号 = ( dbn /块大小 /组大小 ) mod (组数) , 其中 dbn表示磁盘数据块的扇区号, 块大小为 SSD数据块大小, 组大小 为组中数据块的数量。 组数为 SSD设备中组的总数目。 假设确定数据緩 存的位置在组 1中。 假设组 1由五个虚拟块组成。 根据字段
b-cacheblock.state,确定当前空闲的虚拟块分别有虚拟块 1、 3、 4和 5。
通过查询虚拟块 cache— block,可以对数据进行虚拟块分配。 通过查 询緩存池的控制信息、 ssd设备的控制信息, 选择待写入的 ssd设备、 物理组和物理块。
虚拟块 1被配置为镜像模式,镜像的数目例如为 2个。一般将脏数据 分配给虚拟块 1。 脏数据的来源为用户发起的对磁盘的写操作。 写入时, 原有的 10请求被克隆成两份。 查询 SSD设备控制信息 (字段
ssd_avail_size ) 时发现 ssd 1和 ssd 2有较多空闲空间。 查询 ssd 1 和 ssd 2组 1的元数据 ssd_set (字段 s—block— 1 i s t)和该组各数据块的 元数据 ssd_block (字段 same_ssd_list ) , 找到合适的緩存位置。 将 10 请求中目标设备设置为 ssd 1和 ssd 2, 并设置 10请求的起始磁盘位置 及长度字段。 提交 10请求到这两个设备上完成数据写入。 因此, 两个副 本分别保存在 ssd 1和 ssd 2的组 1 (的物理块) 中, 并且分别标记为 "1 镜像" 和 "1镜像" , 其中的 "1" 表明来自虚拟块 1。 虚拟块 1则标记 为 "IMA" ,MA代表镜像地址。 虚拟块 1的元数据 cache_block #丈如下爹 改: 字段 b_dbn记载被緩存的数据块在磁盘中的扇区号; 字段
b-cacheblock.state i己载该虚 块为镜像酉己置, 字段 b— ssd—block用双 链表链接同属于该虚拟块的两个 ssd物理块。 对于 ssdl的组 1中保存副 本的物理块, 其 ssd.block的字段 owner-cacheblock记载该 ssd物理块 所在的虚拟块号,字段 same-cacheblock-list在链表中记录 ssd2的组 1 中保存副本的 ssd物理块的指针。 对于 ssd2的组 1中保存副本的 ssd物 理块, 做类似处理。 緩存池的控制信息、 ssd设备的控制信息 (比如, 可用空间) 也#丈相应修改。
虚拟块 4为条带配置,条带的数目为 2个。一般将干净的数据存放在 该虚拟块。 干净数据的来源为: 1、 用户在进行磁盘读操作时, 读操作未 命中, 虚拟緩存将未命中的数据填充到 SSD设备中; 2、 用户写入脏数据 后, 虚拟緩存执行了脏数据的磁盘回写操作, 变为干净数据。 该数据在 存入时, 原有的 10请求被拆分成两份。 查询 SSD设备控制信息 (字段 ssd_avail_size ) 时发现 ssd 1和 ssd 3有较多空闲空间。 查询 ssd 1 和 ssd 3组 1的 ssd_set (字段 s_block_list)和该组各数据块的元数据 ssd_block (字段 same_ssd_list ) , 找到合适的緩存位置。 将 10请求中 目标设备设置为 ssd 1和 ssd 3, 并设置 10请求的起始磁盘位置及长度 字段, 提交 10请求到这两个设备上完成数据写入。 因此, 条带分别保存 在 ssd 1和 ssd 3的组 1 ( ssd.set 1 ) 中, 并且分另' J标记为 "4条带 1" 和 "4条带 2" 。 "4条带 1" 表明对应于虚拟块 4的条带 1, "4条带 2" 表明对应于虚拟块 4的条带 2。最后,虚拟块 4被标记为 "SA1"和 "SA2" , 其中 SA代表条带地址。 虚拟块 4的元数据 cache_block做如下修改: 字 段 b_dbn记载被緩存的数据块在磁盘中的扇区号; 字段
b-cacheblock.state记载该虚拟块为条带配置, 字段 b_ssd_block用双 链表链接同属于该虚拟块的两个 ssd物理块。 对于 ssdl的组 1中保存副 本的 ssd物理块, 其元数据 ssd.block的字段 owner_cacheblock记载该 ssd物理块所在的虚拟块号, 字段 same-cacheblock-list在链表中记录 ssd2的组 1中保存副本的 ssd物理块的指针。对于 ssd2的组 1中保存副 本的 ssd物理块, 做类似处理。 緩存池的控制信息、 ssd设备的控制信息 (比如, 可用空间等) 也#丈相应修改。
虚拟块 3和 5为常规配置, 即仅为一个数据副本。 其 10操作方法同 原有的磁盘緩存方法相同。 该副本分别保存在 ssd3和 ssd2的组 1的緩 存块中, 并且将緩存块分别标记为 "虚拟块 3" 和 "虚拟块 5" 。 最后, 虚拟块 3和 5的控制信息 cache_block做如下修改: 字段 b.dbn记载被 緩存的数据块在磁盘中的扇区号; 字段 b-cacheblock-state记载该虚拟 块为常规配置。 对于 ssd2和 ssd3的组 1中保存副本的 ssd物理块, 其 元数据 ssd.block的字段 owner-cacheblock记载该 ssd物理块所在的虚 拟块号。
图 6为在緩存中进行镜像 /条带配置的操作流程图。
在步骤 S6QQ, 配置操作流程开始。
在步骤 S610, 10请求发送到虚拟緩存设备。
在步骤 S620, 根据 10标志发现为写操作。
在步骤 S630, 判断拟写的是否脏数据。 如果是脏数据, 则流程转往 步骤 S642; 如果不是脏数据但默认或者根据用户自定义规则需要进行条 带操作, 则流程转往步骤 S646;如果不属于以上情况, 则流程转往步骤 S640。
在步骤 S640, 流程判断根据用户自定义规则是否需要进行镜像 /条带 操作。 如果需要, 则分别转往步骤 S642或 S646; 否则, 进入步骤 S644, 进行常规流程处理。
在步骤 S642, 将数据配置为镜像, 根据需要的副本数创建相应数量 的块输入输出数据 (bio) , 然后流程转往步骤 S650。
在步骤 S646, 将数据拆分为多个条带, 分别创建 bio数据。 然后, 流程转往步骤 S650。
在步骤 S650, 根据前述流程确定的镜像 /条带操作, 查找满足写入条 件的镜像 /条带设备。
在步骤 S660, 在相应的设备中寻找合适的 ssd物理块。
在步骤 S670, 初始化各 bio, 并提交 bio到相应设备。
在步骤 S680, 更新 ssd设备的 ssd物理块和所属组的元数据。
在步骤 S690, 更新虚拟緩存设备的虚拟块和所属组的元数据。 在步骤 S699, 流程结束。
由于需要对磁盘和緩存进行频繁的读写,因此緩存块的状态会发生变 化, 从而需要进行镜像 /条带重配置。 因緩存块的状态变化而需要进行镜 像 /条带重配置的场景主要有两个: 脏数据完成回写时; 干净的数据写命 中时。 下面分别对这两个场景进行介绍。
第一个场景, 脏数据完成回写。 脏数据默认配置为镜像模式, 緩存会 定时或因其他操作触发进行脏数据的回写。 完成脏数据回写后, 数据的 状态从脏变为干净。 此时有下列三种处理方式可供选择。
1、 最简单的方式是维持原有镜像组织不变, 但该方式造成了空间浪 费。 该方式仅在当前緩存有较多空闲空间时采用。
2、 将该緩存块调整为常规配置, 即删除一个镜像, 这种方式相比方 式 1节省了空间开销。
3、 考虑到緩存的应用场景一般为读操作的比例大于写操作, 此时可 以调整数据的镜像 /条带配置, 将在脏数据回写后, 将该数据调整为条带 配置。 在緩存的 10较空闲时可采用该种方式。
图 7是脏数据回写后进行镜像重配置的操作流程图。假设緩存块脏数 据有两个镜像。 该场景下, 对镜像的重配置操作可在完成緩存块脏数据 回写后的回调函数中进行。
在步骤 S700, 配置操作流程开始。
在步骤 S710, 緩存向磁盘发起脏数据回写 10。
在步骤 S720, 系统完成回写 10操作。
在步骤 S730, 创建多个 bio数据结构, 然后流程转往步骤 S740。 在步骤 S740, 查找满足写入条件的条带设备。
在步骤 S750, 在相应的设备中寻找合适的 ssd物理块。
在步骤 S760, 初始化各 bio, 并提交 bio到相应设备。
在步骤 S770, 将完成回写的两个緩存块镜像置无效。 完成回写的緩 存块镜像可以通过虚拟块元数据 cache_block (字段 b_dbn和
b_s sd-block ) 定位。 在步骤 S780, 更新 ssd设备的 ssd物理块和组的元数据。
在步骤 S790, 更新虚拟緩存的虚拟块和组的元数据。
在步骤 S799, 流程结束。
第二个场景,緩存写命中。命中的緩存块数据存在以下几种可能的配 置方式:
1、 若命中的为脏数据(默认为镜像配置), 緩存写命中后的数据可 仍维持镜像;
2、 若命中的数据为常规配置,可在其他设备中增加一个副本或者仍 维持原有的常规配置状态, 可视当前緩存中空闲空间而定;
3、 若命中的数据为干净数据(默认为条带配置), 此时可将条带变 为镜像, 提高脏数据的保护级别。
图 8是干净数据写命中后进行条带重配置的操作流程示意图。假设緩 存块数据有两条带。
在步骤 S8QQ, 配置操作流程开始。
在步骤 S810,緩存发起脏数据写入 10。
在步骤 S820, 经查找, 该緩存命中, 且元数据状态为非脏, 因此确 定配置为条带。
在步骤 S830, 将本次 bio克隆为两个 bio数据结构。
在步骤 S840, 查找满足写入条件的镜像设备。
在步骤 S850, 在相应的设备中寻找合适的 ssd物理块。
在步骤 S860, 初始化各 bio, 并提交 bio到相应设备。
在步骤 S870, 将被命中的干净緩存块条带置无效。 被命中的的緩存 块条带可以通过虚拟块元数据 cache— block (字段 b.dbn和 b_ssd_block ) 定位。
在步骤 S880, 更新 ssd设备的 ssd物理块和组的元数据。
在步骤 S890, 更新虚拟緩存的虚拟块和组的元数据。
在步骤 S899, 流程结束。
在緩存空间动态伸缩时, 也可能需要对緩存块的镜像 /条带情况重配 置。 这主要包括以下两种场景: 在添加 SSD设备进行空间扩展时, 迁移 緩存块的镜像 /条带位置, 均衡各设备空间使用率, 有利于之后的緩存镜 像 /条带的分配; 在删除 SSD设备进行空间收缩时, 需要删除部分緩存块 的镜像 /条带, 将另一部分緩存块的镜像 /条带迁移到其他设备中。 下面 对这两种情况进行介绍。
在进行空间扩展时, 可以将部分緩存块的镜像或条带迁移到新设备 上, 均衡设备的使用率。 尤其是在现有空间均已用完时, 若仅加入一个 新设备, 则之后需要进行緩存块的镜像 /条带操作时, 操作将无法成功。 为此, 可以将部分緩存块迁移到新设备中, 腾出部分旧设备的空间是十 分有价值的。
图 9是进行緩存空间扩展前的状态示意图。假设緩存的数据均为干净 数据, 配置为条带。 緩存池由例如三个设备组成, 分别为 ssd 1、 ssd2 和 ssd3, 其中 ssd2和 ssd3的存储空间已接近用完, ssdl还有少量空间 可用。 虚拟块 1中的两条带, 条带 1和 2分别存放在 ssdl和 ssd2中, 分别标记为 "1条带 1" 和 "1条带 2" 。 同理, 虚拟块 3的两条带分别 存放在 ssd2和 ssd3中 ( "3条带 2" 和 "3条带 1" ) , 虚拟块 4的两 条带分别存放在 ssdl和 ssd3中 ( "4条带 1" 和 "4条带 2" ) , 虚拟 块 5的两条带分别存放在 ssd2和 ssd3中( "5条带 1"和 "5条带 2" )。
图 10是进行緩存空间扩展并完成数据迁移后的状态示意图。 相比图 9而言, 图 10在緩存中添加了一个新的 ssd 4。 首先, 修改緩存池控制 信息, 将 ssd4的指针添加到字段 -ssd.header,更新字段
p_ pool— total— size和 -pool _ava i 1 _s ize中的緩存池总空间和可用空 间; 为该 ssd4配置控制信息。 为了平衡緩存中緩存设备的空间使用率, 可以基于緩存池控制信息 (字段 p_pool _avail -size)和 ssd设备控制信 息 (字段 ssd_avail_size) 来确定其它原有緩存设备的空间使用率, 并 且在确定例如 ssd 4有较多空闲空间时将 ssd 2和 ssd 3中部分数据迁移 到 ssd 4中。 如图中所示, 将虚拟块 3原位于 ssd 2中的第二个条带( "3 条带 2" ) 迁移到 ssd 4中, 将虚拟块 5中原位于 ssd 3中的第二个条带 ( "5条带 2" ) 迁移到 ssd 4中。
当然,在迁移后, 需要对相关 ssd设备的物理块和组的元数据以及虚 拟緩存的虚拟块和组的元数据进行更新, 以反映迁移后的控制信息。
虽然图 9和 10结合条带进行了空间扩展的说明, 但是, 本领域技术 人员容易领会到上述说明同样适用于在空间扩展中镜像的迁移。
在緩存空间扩展时, 还可以引入混合型的镜像 /条带配置。 如在迁移 脏数据的其中一个镜像时, 可以将该镜像变为两个或多个条带。 以两条 带为例, 一个条带写入新的设备中, 另一个条带可仍保留在原设备中或 迁移到第二个新设备(也就是说, 当加入两个新设备时) 。 这样, 可以 既发挥镜像对脏数据的可靠性保护, 又可以通过条带化来提高脏数据的 读取速度。
在进行空间收缩释放 SSD设备时,可以将待删除的 SSD设备中的緩存 块镜像 /条带迁移到其他设备中。 在一个例子中, 可以通过 ssd设备的控 制信息(字段 least-allocated.block )找到已分配的第一个 ssd物理块, 在该物理块的元数据 ssd_block (字段 same_ssd_block)找到同一个 ssd 设备的所有已分配物理块, 由此确定需要迁移的镜像 /条带或者常规配置 的数据。然后,通过物理块的元数据 ssd-block (字段 owner-cacheblock ) 找到该物理块所在的虚拟块的元数据 cache_block, 通过虚拟块的字段 b-ssd.block找到同一个镜像或条带的其它物理块,确定其它 ssd设备中 哪些设备可以接收镜像 /条带或常规数据的迁移。 其他设备的空间已满或 接近满时, 可以通过删除部分緩存块的镜像, 删除部分较冷的緩存块来 释放 SSD空间, 然后来完成剩余数据的迁移。
图 11是进行緩存空间收缩前的状态示意图。 虚拟块 1对应的条带存 储在 ssdl和 ssd2中, 虚拟块 2对应的条带存储在 ssd3和 ssd4中, 虚 拟块 3对应的条带存储在 ssdl和 ssd3中, 虚拟块 4对应的条带存储在 ssd2和 ssd4中。
此时, 需要空间收缩, 释放 SSD设备 ssdl。 由于 ssdl中存放着虚拟 块 1和 3对应的数据, 因此, 需要将相关数据迁移到其它 SSD设备中。 在进行数据迁移前, 可以查看还需要释放多少緩存空间才能完成 SSD 设备的删除操作, 假设为 K GB。 获取了该数据后, 寻找出緩存块中最冷 的 K GB数据。 在本例中, 仅需要删除一个最冷的緩存块就能满足要求, 通过热数据检测模块查询得知虚拟块 2为最冷,其两条带分别位于 ssd 3 和 ssd 4。 将该緩存块的条带置为无效 (设置该緩存块的元数据
cache-block中的字段 b— cacheblock— state为无效),并将待删除的 ssd 1中的数据迁移到 ssd 3和 ssd4中。 删除 ssd 1并更新虚拟緩存的相关 元数据 (修改緩存池控制信息, 将 ssdl的指针从字段 p_ssd_header中 删除,更新字段 -pool-total-size和 p— pool—ava i 1 _ s i ze中的緩存池总 空间和可用空间) 。 图 12是完成緩存空间收缩后的状态示意图。
虽然图 11和 12结合条带进行了空间收缩的说明,但是, 本领域技术 人员容易领会到上述说明同样适用于在空间收缩中镜像的迁移。
图 12中未考虑緩存中有镜像数据的场景, 若緩存中待删除的 SSD中 有镜像数据, 可以先删除该镜像, 释放部分空间, 然后再进行数据的迁 移。
图 20是本发明一个实施例的数据读取示意图。 在步骤 2010, 緩存管 理模块接收到 10数据读取请求。 10数据读取请求可以是由需要读取数据 的应用程序发出的。 10数据读取请求可以包括所请求的数据所在的地址。
在步骤 2020, 当判断内存中没有相关的数据因而需要从磁盘读取时 , 获取 10数据所在的磁盘地址。
在步骤 2030, 根据磁盘地址, 在内存中查找对应的緩存块信息。 如 果存在对应緩存块的信息, 则表明磁盘数据有备份在緩存池的緩存块中。 例如可以查询虚拟块 cache— block, 在有緩存的情况下通过 cache-block 查询到用双链表链接的属于同一个虚拟块的緩存块。
在步骤 2040, 读取所述对应緩存块信息。 所述緩存块信息包括至少 两个地址,所述至少两个地址指向至少两个不同的 SSD緩存设备。 在一个 例子中, 所述緩存块信息还包括 10数据所在的磁盘地址。
在步骤 2050, 解析 SSD緩存地址信息和緩存块大小。 在一个例子中, 解析就是确定緩存数据所位于的緩存池中哪个緩存设备、 哪个组、 哪个 緩存块。 解析可以借助于虚拟组 cache— set, 虚拟块 cache— block, 緩存 池控制信息, ssd设备控制信息, ssd组元数据 ssd_set和元数据 ssd.block中的一个或多个完成。
在步骤 2060, 根据緩存块信息(比如设备、 数据偏移、 数据长度) , 初始化各 bio。
在步骤 2070, 提交 bio到相应的 SSD緩存设备上。
在步骤 2080, 完成 10操作回调处理, 即根据所述至少两个地址向所 述至少两个 SSD 緩存设备发起数据读取操作。 在一个例子中, 在涉及比 如条带操作的情况下, 读取所述至少两 SSD 緩存设备中所述至少两地址 对应的数据; 将所述至少两地址对应的数据合并而响应所述 10数据读取 请求。 在另一个例子中, 在涉及比如镜像操作的情况下, 所述至少两地 址对应的数据相同, 以从所述至少两地址中任一地址获取数据。
此外, 优选地, 所述至少两个地址与所述至少两个不同的 SSD 緩存 设备的数量相同且分别——对应。
图 21是本发明一个实施例的緩存管理设备的示意图。所述设备包括: 读取模块 2110, 用于读取緩存块信息, 所述緩存块信息包括至少两个地 址,所述至少两个地址指向至少两个不同的 SSD緩存设备;发起模块 2120, 根据所述緩存块信息中的至少两个地址向所述至少两个 SSD 緩存设备发 起数据读取操作。
优选地, 緩存管理设备包括接收模块 2130, 接收 10数据读取请求, 以便读取模块根据所述 10数据读取请求读取所述緩存块信息。 进一步优 选地, 所述接收模块 2130包括获取模块 2132, 获取 10数据读取请求所 请求的数据所在的地址; 查找模块 2134, 根据所述 10数据读取请求所请 求的数据所在的地址, 在内存中查找所述緩存块的信息。
优选地, 所述緩存块信息还包括第四地址, 所述第四地址为数据在 磁盘中的地址;所述第三地址为数据在磁盘中的地址。
优选地, 所述緩存块的信息还包括数据大小信息, 所述緩存管理设 备包括确定模块, 确定从所述至少两个不同的 SSD緩存设备读取的数据 大小。
优选地, 所述发起模块 2 1 2 0包括: 读取模块 2 1 22 , 读取所述至少两 个 SSD緩存设备中所述至少两个地址对应的数据; 合并模块 2 1 24 , 将所 述至少两个地址对应的数据合并而响应所述 10数据读取请求。
优选地, 所述至少两个地址对应的数据相同, 所述发起模块 2 1 2 0从 所述至少两个地址中任一地址获取数据。
优选地, 所述设备还包括获取模块, 用于获取所有 S SD 緩存设备的 使用以及配置信息, 以根据所有 SSD 緩存设备的使用以及配置信息在所 述所有 SSD緩存设备中选取其中空闲存储空间最大的 S SD緩存设备作为 所述至少两个地址所指向的 SSD緩存设备。
优选地, 所述至少两个 SSD緩存设备的数据对应来自磁盘, 在所述 磁盘的数据被请求读取时, 所述读取模块依据该请求读取緩存块信息,所 述緩存管理设备通过所述至少两个地址读取所述至少两个 SSD 緩存设备 的数据, 将所述至少两个 SSD 緩存设备的数据对应替代所述磁盘上的数 据。
本发明实施例通过在緩存设备中配置緩存块条带, 实现 10请求的多 设备并行处理, 提高緩存块读取的性能; 通过对脏緩存块增加镜像副本, 提高数据可靠性。
此外, 本发明实施例还提供了緩存空间伸缩时镜像 /条带的重配置能 力。 在緩存空间扩展时, 可以通过迁移緩存块的镜像 /条带来平衡各设备 的使用率, 并为之后的新緩存块镜像 /条带分配提供合适的空间。 还可以 通过配置脏数据镜像加条带的混合型配置来使緩存数据兼具高可靠性和 优秀的 10性能。
另外, 本发明实施例在緩存块进行脏 /干净切换时, 将脏数据块从镜 像切换成条带, 节省緩存空间; 在感觉緩存变为脏时, 将其切换为镜像, 及时提高其可靠性。
需要说明, SSD设备可以是各种 SSD设备, 包括但不限于 f l a s h (闪 存) SSD或者 PCM (相变存储器) SSD。 此外, 本发明不限于使用 SSD作 为磁盘的高速緩存, 其他的非易失性闪存介质, 比如最新出现的 PCM介 质等, 均可以作为磁盘的高速緩存介质。 磁盘也可以采用 PATA (并行高 级技术附件) 、 SATA (串行高级技术附件) 、 SAS (串行连接 SCS I接口 ) 以及 FC、 USB (通用串行总线)接口的硬盘等。
需要指出, 虽然前文中条带或镜像操作是以緩存块为单位进行的,但 是本发明同样可以以緩存地址为单位进行条带或镜像操作, 换言之, 条 带或镜像操作并不局限于大小固定的緩存块, 而是可以对任意大小的緩 存地址进行。
显而易见, 在此描述的本发明可以有许多变化, 这种变化不能认为 偏离本发明的精神和范围。 因此, 所有对本领域技术人员显而易见的改 变, 都包括在本权利要求书的涵盖范围之内。

Claims

,1. 一种緩存数据的处理方法, 其特征在于, 所述方法包括: 緩存管理模块读取緩存块信息, 所述緩存块信息包括至少两个地址, 所述至少两个地址指向至少两个不同的固态硬盘 SSD緩存设备;
所述緩存管理模块根据所述緩存块信息中的至少两个地址向所述至 少两个 SSD緩存设备发起数据读取操作。
2、 如权利要求 1所述的方法, 其特征在于, 所述緩存管理模块读取 緩 块信息之前,所述方法还包括: 所述緩 管理模块接收输入输出 10 数据读取请求;
所述緩存管理模块读取緩存块信息包括: 根据所述 10数据读取请求 读^緩存块信息。
3、 如权利要求 2所述的方法, 其特征在于, 所述緩存管理模块根据 所^ 10数据读取请求读取緩存块信息包括:
获取 10数据读取请求所请求的数据所在的第三地址;
听述緩存管理模块根据所述 10数据读取 求所请求的数据所在的第 三 ^址, 在内存中查找所述緩存块的信息.
4、 如权利要求 3所述的方法, 其特征在于, 所述緩存块信息还包括 第^地址, 所述第四地址为数据在磁盘中的地址;所述笫三地址为数据在 中的地址.
5、 如权利要求 1至 4任一项所述的方法, 其特征在于, 所述緩存块 的,息还包括数据大小信息, 以确定从所述至少两个不同的 SSD緩存设 备 取的数据大小。
6、 如权利要求 1至 4任一项所述的方法, 其特征在于, 所述緩存管 理 块根据所述至少两个地址向所述至少两个 SSD緩存设备发起数据读 «作包括:
渎取所述至少两个 SSD緩存设备中所述至少两个地址对应的数据;
更正页 (细则第 91条)
7、 如权利要求 1至 4任一项所述的方法, 其特征在于, 所述至少两 个地址对应的数据相同, 以从所述至少两个 址中任一地址获取数据。
8、 如权利要求 1至 4任一项所述的方法, 其特征在于, 所述至少两 个地址与所述至少两个不同的 SSD緩存设备的数量相同且分别一一对应。
9、 如权利要求 1至 4任一项所述的方法, 其特征在于, 还包括获 取所有 SSD緩存设备的使用以及配置信息, 以根据所有 SSD緩存设备的 使用以及配置信息在所述所有 SSD緩存设备中选取其中空闲存储空间最 大的 SSD緩存设备作为所述至少两个地址所 ^向的 SSD緩存设备。
10、 如权利要求 1 至 4任一项所述的方法, 其特征在于, 所述 SSD 緩存设备的存储介质类型包括: 闪存 f lash SSD 和相变存储器 PCM SSD 中的一种或多种。
•1 如权利要求 1至 4任一项所述的方法, 其特征在于, 所述至少 两^ SSD緩存设备的数据对应来自磁盘, 所 i 方法包括请求读取所述磁 盘 数据; 所述緩存管理模块读取緩存块信息包括依据该请求读取緩存 块 息;所述方法还包括在所述緩存管理模块根据所述緩存块信息中的 通 所述至少两个地址向读取所述至少两个 SSD緩存设备发起数据读取 操 的数据之后, 将所述至少两个 SSD緩存设备的数据对应替代所述磁 盘 的数据。
12、 如权利要求 1至 4任一项所述的方法, 其特征在于, 所述緩存 管¾模块读取緩存块信息包括解析緩存块信 :息,以得到所述至少两个地 址
13、 如权利要求 12所述的方法, 其特征在于, 所述方法还包括根据 緩 块信息初始化块输入输出数据, 所述緩存管理模块根据緩存块信息 中^至少两个地址向至少两个 SSD緩存设备发起数据读取操作包括提交 块^入输出数据到所述至少两个 SSD緩存设备。
14、 一种緩存数据的緩存管理设备, 其特征在于, 所述设备包括: 渎取模块, 用于读取緩存块信息, 所述緩存块信息包括至少两个地 更正页 (细则第 91条) 址,所述至少两个地址指向至少两个不同的固态硬盘 SSD緩存设备; 发起模块, 根据所述緩存块信息中的至少两个地址向所述至少两个
SSD緩存设备发起数据读取操作。
15、 如权利要求 14所述的緩存管理设备, .其特征在于, 包括: 接收模块, 接收输入输出 10数据读取请求, 以便读取模块根据所述
10数据读取请求读取所述緩存块信息。
16、 如权利要求 15所述的緩存管理设备, 其特征在于, 所述接收模 块包括荻取模块, 获取 10数据读取请求所请求的数据所在的第三地址; 查找模块, 根据所述 10数据读取请求所请求的数据所在的第三地址, 在 内存中查找所述緩存块的信息。
;17、 如权利要求 16所述的緩存管理设备, 其特征在于, 所述緩存块 信息还包括第四地址, 所述第四地址为数据在磁盘中的地址;所述第三地 址为数据在磁盘中的地址。
18 , 如权利要求 14至 17任一项所述的緩存管理设备, 其特征在于, 所 ϋ緩存块的信息还包括数据大小信息, 所述緩存管理设备包括确定模 块, 确定从所述至少两个不同的 SSD緩存设备读取的数据大小.
19、 如权利要求 14至 17任一项所述的緩存管理设备, 其特征在于, 所述发起模块包括: 读取模块, 读取所述至少两个 SSD緩存设备中所述 至^;两个地址对应的数据;
: 合并模块, 将所述至少两个地址对应的数据合并而响应所述 10数 据 取请求。
20、 如权利要求 14至 17任一项所述的緩存管理设备, 其特征在于, 所^至少两个地址对应的数据相同, 所述发起模块从所述至少两个地址 中壬一地址获取数据。
21、 如权利要求 14至 17任一项所述的緩存管理设备, 其特征在于, 听 ^至少两个地址与所述至少两个不同的 SSD緩存设备的数量相同且分 ^一一对应。
22、 如权利要求 14至 17任一项所述的緩存管理设备, 其特征在于 更正页 (细则第 91条) 所述设备还包括荻取模块, 用于获取所有 SSD緩存设备的使用 直 信息, 以根据所有 SSD緩存设备的使用以及配置信息在所述所有 SSD緩 存设备中选取其中空闲存储空间最大的 SSD緩存设备作为所述至少两个 地址所指向的 SSD緩存设备。
23、 如权利要求 14至 17任一项所述的緩存管理设备, 其特征在于, 所述 SSD緩存设备的存储介质类型包括: f lash SSD以及 PCM SSD.
24、 如权利要求 14至 17任一项所述的緩存管理设备, 其特征在于, 所述至少两个 SSD緩存设备的数据对应来自磁盘, 在所述磁盘的数据被 请求读取时, 所述读取模块依据该请求读取緩存块信息,所述緩存管理设 备通过所述至少两个地址读取所述至少两个 SSD緩存设备的数据, 将所 述至少两个 SSD緩存设备的数据对应替代所述磁盘上的数据。
25、 如权利要求 14至 17任一项所述的緩存管理设备, 其特征在于, 读取模块包括解析模块, 解析緩存块信息,以得到所述至少两个地址。
26、 如权利要求 25所述的緩存管理设备, 其特征在于, 所述緩存管 理设备包括初始化模块, 根据緩存块信息初始化块输入输出数据 bio, 所 述发起模块提交 bio到所述至少两个 SSD緩存设备。
27、 —种緩存数据的处理系统, 其特征在于, 所述处理系统包括: 多个 SSD緩存设备;
緩存管理设备, 读取緩存块信息, 所述緩存块信息包括至少两个地 址,所述至少两个地址指向至少两个不同的固态硬盘 SSD緩存设备; 根据 所述緩存块信息中的至少两个地址向所述多个 SSD緩存设备中的至少两 个发起数据读取操作。
- .
28.、_如权利要求. 2:!所述鈞处理系统,.其特征在于,
緩存管理设备接收输入输出 10数据读取请求, 以根据所述 10数据 读取请求读取所述緩存块信息。
29、 如权利要求 28所述的处理系统, 其特征在于所述处理系统包括 内存, 所述緩存管理设备获取 10数据读取请求所请求的数据所在的第三 地址; 根据所述 10数据读取请求所请求的数据所在的第三地址, 在内存 更正页 (细则第 91条) 中查找所述緩存块的信息。
30、 如权利要求 29所述的处理系统, 其特征在于, 所述緩存块信息 还包括第四地址, 所述第四地址为数据在磁盘中的地址;所述第三地址为 数据在磁盘中的地址。
31、 如权利要求 27至 30任一项所述的处理系统, 其特征在于, 所 述緩存块的信息还包括数据大小信息, 所述緩存管理设备确定从所述至 少两个不同的 SSD緩存设备读取的数据大小。
32、 如权利要求 27至 30任一项所述的处理系统, 其特征在于, 所 述緩存管理设备读取所述至少两个 SSD緩存设备中所述至少两个地址对 应的数据; 将所述至少两个地址对应的数据合并而响应所述 10数据读取 请求。
33、 如权利要求 27至 30任一项所述的处理系统, 其特征在于, 所 述至少两个地址对应的数据相同, 所述緩存管理设备从所述至少两个地 址中任一地址获取数据。
34、 如权利要求 27至 30任一项所述的处理系统, 其特征在于, 所 述至少两个地址与所述至少两个不同的 SSD緩存设备的数量相同且分别 对 。
35、 如权利要求 27至 30任一项所述的处理系统, 其特征在于緩存 管理设备获取所有 SSD緩存设备的使用以及配置信息, 以根据所有 SSD 緩存设备的使用以及配置信息在所述所有 SSD緩存设备中选取其中空闲 存储空间最大的 SSD緩存设备作为所述至少两个地址所指向的 SSD緩存 设备.
36、 如权利要求 27至 30任一项所述的处理系统, 其特征在于, 所 述 SSD緩存设备的存储介质类型包括 f lash SSD和 PCM SSD中的一种或 多种。
37、 如权利要求 27至 30任一项所述的处理系统, 其特征在于, 所 迷处理系统包括磁盘, 而所述至少两个 SSD緩存设备的数据对应来自磁 盘; 在所述磁盘的数据被请求读取时, 所述緩存管理设备依据该请求读 更正页 (细则第 91条) 取緩存块信息;通过所述至少两个地址读取所述至少两 SSD緩存设备的数 据, 将所述至少两个 SSD緩存设备的数据对应替代所述磁盘上的数据。
38、 如权利要求 27至 30任一项所述的处理系统, 其特征在于緩存 管理设备解析緩存块信息,以得到所述至少两个地址。
39、 如权利要求 27所迷的处理系统, 其特征在于, 所述緩存管理设 备根据緩存块信息初始化块输入输出数据 bio,提交 bio到所述至少两个 SSD緩存设备。
更正页 (细则第 91条)
PCT/CN2011/084359 2011-12-21 2011-12-21 提供多设备镜像和条带功能的磁盘缓存方法、设备和系统 WO2013091192A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201180004852.2A CN102713828B (zh) 2011-12-21 2011-12-21 提供多设备镜像和条带功能的磁盘缓存方法、设备和系统
PCT/CN2011/084359 WO2013091192A1 (zh) 2011-12-21 2011-12-21 提供多设备镜像和条带功能的磁盘缓存方法、设备和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/084359 WO2013091192A1 (zh) 2011-12-21 2011-12-21 提供多设备镜像和条带功能的磁盘缓存方法、设备和系统

Publications (1)

Publication Number Publication Date
WO2013091192A1 true WO2013091192A1 (zh) 2013-06-27

Family

ID=46903937

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/084359 WO2013091192A1 (zh) 2011-12-21 2011-12-21 提供多设备镜像和条带功能的磁盘缓存方法、设备和系统

Country Status (2)

Country Link
CN (1) CN102713828B (zh)
WO (1) WO2013091192A1 (zh)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
HUE035390T2 (en) 2013-09-24 2018-05-02 Huawei Tech Co Ltd Data migration process, data migration device and storage device
CN103645859B (zh) * 2013-11-19 2016-04-13 华中科技大学 一种虚拟ssd与ssd异构镜像的磁盘阵列缓存方法
CN105376269B (zh) * 2014-08-11 2019-11-26 中国电信股份有限公司 虚拟机存储系统及其实现方法和装置
CN104484287B (zh) * 2014-12-19 2017-05-17 北京麓柏科技有限公司 一种非易失性缓存实现方法及装置
CN106557264B (zh) * 2015-09-25 2019-11-08 伊姆西公司 针对固态硬盘的存储方法及设备
CN107506314B (zh) * 2016-06-14 2021-05-28 伊姆西Ip控股有限责任公司 用于管理存储系统的方法和装置
CN106897231B (zh) * 2017-02-28 2021-01-12 苏州浪潮智能科技有限公司 一种基于高性能存储介质的数据缓存方法及系统
CN108255414B (zh) * 2017-04-14 2020-04-03 新华三信息技术有限公司 固态硬盘访问方法及装置
CN107506139B (zh) * 2017-08-14 2020-09-08 上海交通大学 一种面向相变存储器的写请求优化装置
CN109491609B (zh) * 2018-11-02 2022-04-22 郑州云海信息技术有限公司 一种缓存数据处理方法、装置、设备及可读存储介质
CN110377536B (zh) * 2019-07-12 2023-05-12 深信服科技股份有限公司 数据处理方法、装置、设备及计算机可读存储介质
CN111124943B (zh) * 2019-12-29 2022-04-22 北京浪潮数据技术有限公司 一种数据处理方法、装置、设备及存储介质
CN112214178B (zh) * 2020-11-13 2022-08-19 新华三大数据技术有限公司 一种存储系统、数据读取方法及数据写入方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1201233C (zh) * 2000-03-31 2005-05-11 英特尔公司 带有可编程存储体选择的具有不同数据缓冲区容量的多层存储体
CN100470508C (zh) * 2004-05-03 2009-03-18 微软公司 用于非易失性存储器高速缓存性能改进的系统和方法
US20100228919A1 (en) * 2009-03-03 2010-09-09 Econnectix Corporation System and method for performing rapid data snapshots
CN102279802A (zh) * 2010-06-13 2011-12-14 中兴通讯股份有限公司 提高同步动态随机存储控制器的读操作效率的方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1201233C (zh) * 2000-03-31 2005-05-11 英特尔公司 带有可编程存储体选择的具有不同数据缓冲区容量的多层存储体
CN100470508C (zh) * 2004-05-03 2009-03-18 微软公司 用于非易失性存储器高速缓存性能改进的系统和方法
US20100228919A1 (en) * 2009-03-03 2010-09-09 Econnectix Corporation System and method for performing rapid data snapshots
CN102279802A (zh) * 2010-06-13 2011-12-14 中兴通讯股份有限公司 提高同步动态随机存储控制器的读操作效率的方法和装置

Also Published As

Publication number Publication date
CN102713828A (zh) 2012-10-03
CN102713828B (zh) 2015-07-08

Similar Documents

Publication Publication Date Title
WO2013091192A1 (zh) 提供多设备镜像和条带功能的磁盘缓存方法、设备和系统
US10936503B2 (en) Device access point mobility in a scale out storage system
Byan et al. Mercury: Host-side flash caching for the data center
JP4278445B2 (ja) ネットワークシステム及びスイッチ
US11347428B2 (en) Solid state tier optimization using a content addressable caching layer
US8874850B1 (en) Hierarchically tagged cache
US9710383B1 (en) Caching techniques
US7676628B1 (en) Methods, systems, and computer program products for providing access to shared storage by computing grids and clusters with large numbers of nodes
US8549222B1 (en) Cache-based storage system architecture
US8190823B2 (en) Apparatus, system and method for storage cache deduplication
US9158673B2 (en) Use of differing granularity heat maps for caching and migration
US10296255B1 (en) Data migration techniques
WO2017216887A1 (ja) 情報処理システム
US8856443B2 (en) Avoiding duplication of data units in a cache memory of a storage system
US8407437B1 (en) Scalable metadata acceleration with datapath metadata backup
US20140122796A1 (en) Systems and methods for tracking a sequential data stream stored in non-sequential storage blocks
WO2022095346A1 (zh) 一种区块链数据存储方法、系统、设备及可读存储介质
US20130024618A1 (en) Log structure array
US20180307440A1 (en) Storage control apparatus and storage control method
JP2019028954A (ja) ストレージ制御装置、プログラム、及び重複排除方法
US11281390B2 (en) Techniques for data migration
US20210286768A1 (en) Techniques for data deduplication
CN116194900A (zh) 高速缓存技术
WO2019127490A1 (zh) 一种数据访问方法及存储阵列
JP5141234B2 (ja) 階層記憶制御装置、階層記憶制御システム及びそれらに用いる階層記憶制御方法及びそのプログラム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180004852.2

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11877873

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11877873

Country of ref document: EP

Kind code of ref document: A1