WO2018176804A1 - 数据的写入方法及装置 - Google Patents

数据的写入方法及装置 Download PDF

Info

Publication number
WO2018176804A1
WO2018176804A1 PCT/CN2017/106831 CN2017106831W WO2018176804A1 WO 2018176804 A1 WO2018176804 A1 WO 2018176804A1 CN 2017106831 W CN2017106831 W CN 2017106831W WO 2018176804 A1 WO2018176804 A1 WO 2018176804A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
storage module
data set
cache
disk
Prior art date
Application number
PCT/CN2017/106831
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 US16/499,162 priority Critical patent/US11119919B2/en
Publication of WO2018176804A1 publication Critical patent/WO2018176804A1/zh

Links

Images

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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • 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/0877Cache access modes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • G06F2212/1024Latency reduction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/31Providing disk cache in a specific location of a storage system
    • G06F2212/312In storage controller

Definitions

  • the present disclosure relates to the field of computers, and in particular, to a method and an apparatus for writing data.
  • the cache device when the cache device reaches the cache update threshold, that is, the cache device stores more cache data and cannot read more data, some data in the cache device that is used less frequently needs to be flushed out from the cache device.
  • the cache device can send the data to be flushed to the disk device to write data, and the disk device writes the data to the destination storage address of each data by moving the magnetic head.
  • the main purpose of embodiments of the present disclosure is to provide a data writing method and device thereof, to implement a data writing method for improving the flashing speed of a cache device.
  • An aspect of the present disclosure provides a data writing method, including: a first storage module generates a data set to be written into a second storage module, wherein the first data in the data set is sorted according to a destination storage address thereof And the first storage module sends the first data in the data set to the second storage module in sequence.
  • the first storage module is a cache device
  • the generating the data set to be written into the second storage module includes: the first storage module selects a plurality of first data from its own cached data set; and the foregoing A storage module generates the data set according to the plurality of first data.
  • the foregoing data set includes one or more subsets of data; and the foregoing first storage module selects the plurality of first data from the cache data set of the first storage module, where the first storage module selects at least the set of the disk regions. a disk area, wherein each of the at least one disk area stores at least two second data; and the first storage module selects, in the cache data set, corresponding to each disk area in the at least one disk area Cache data as the first data in the one or more data subsets, the destination storage address of the cache data is attributed to the at least one disk area; and the first storage module generates the data set according to the plurality of first data, including : generating one or more of the above according to the first data of each selected data subset and the order of its own destination storage address in the corresponding disk area Data subsets; and generating the data sets based on one or more of the data subsets described above.
  • the at least one disk area is a disk area in the set of the disk areas whose activity level is lower than a first threshold.
  • the method further includes: the first storage module generates a disk area queue, wherein the disk area in the disk area queue stores the address according to the respective destination. Sorting, each of the at least one disk area storing at least two second data; and the first storage module generating the data set according to the plurality of first data, comprising: selecting, according to the selected plurality of first data, and corresponding The above data set is generated by the order of the disk areas in the above-mentioned disk area queue.
  • the first data in each of the foregoing extents is sorted according to a respective destination storage address.
  • the generating the data set to be written into the second storage module includes: generating, when the first storage module has reached the update cache condition, a data set to be written into the second storage module, where the update cache condition is The amount of data for the above cached data set reaches the cache saturation threshold.
  • An aspect of the present disclosure further provides another method for writing data, including: a first storage module generates a data set to be written into a second storage module, wherein a destination storage address of the first data in the data set belongs to a preset address range; and the first storage module sends the data set to the second storage module.
  • An aspect of the present disclosure further provides a data writing apparatus, including: a processing module, configured to generate a data set to be written into a second storage module, wherein the first data in the data set is stored according to a purpose thereof And an sending module, configured to send the first data in the data set to the second storage module in sequence.
  • a processing module configured to generate a data set to be written into a second storage module, wherein the first data in the data set is stored according to a purpose thereof
  • an sending module configured to send the first data in the data set to the second storage module in sequence.
  • An aspect of the present disclosure further provides another data writing apparatus, including: a processing module, configured to generate a data set to be written into the second storage module, wherein a destination storage address of the first data of the data set belongs to a preset address range; and a sending module, configured to send the foregoing data set to the second storage module.
  • a processing module configured to generate a data set to be written into the second storage module, wherein a destination storage address of the first data of the data set belongs to a preset address range
  • a sending module configured to send the foregoing data set to the second storage module.
  • an embodiment of the present invention provides a data writing method, including: a first storage module generates a data set to be written into a second storage module; and a first data in the data set stores an address according to a destination thereof. Sorting; the first storage module sends the first data in the data set to the second storage module in sequence.
  • the first storage module is a cache device
  • the generating the data set to be written into the second storage module includes: the first storage module selects a plurality of first data from the cache data set of the first storage module; The first storage module generates the data set according to the plurality of first data.
  • the data set includes one or more data subsets; the first storage module selects a plurality of first data from its own cache data set, including: the first storage module is from the disk region set Selecting at least one disk area, wherein the disk area stores at least two second data; the first storage module selects, in the cache data set, cache data corresponding to each disk area in the at least one disk area as a plurality of first data in the one or more data subsets, the destination storage address of the cache data being attributed to the at least one disk area.
  • the first storage module generates the data set according to the plurality of first data, including: generating, according to the first data of the selected data subsets and the order of the destination storage addresses in the corresponding disk area. Depicting one or more subsets of data; generating the set of data based on the one or more subsets of data.
  • the at least one disk area is a disk area in the set of disk areas whose activity is lower than a first threshold.
  • the method before the generating the data set to be written into the second storage module, the method further includes: the first storage module generates a disk area queue, and the disk areas in the disk area queue are sorted according to respective destination storage addresses. Each of the disk areas stores at least two second data.
  • generating, by the first storage module, the data set according to the plurality of first data including: generating the data set according to the selected plurality of first data and an order of the corresponding disk area in the disk area queue .
  • the first data in each of the disk areas is sorted according to a respective destination storage address.
  • the plurality of first data is cache data in which the activity level in the cache data set is lower than a second threshold.
  • the generating the data set to be written into the second storage module includes: the first storage module has reached an update cache condition, and the update cache condition is that the data amount of the cached data set reaches a cache saturation threshold. .
  • the method before the generating the data set to be written into the second storage module, the method includes: receiving a second storage module access request, where the second storage module access request includes a destination storage address of the second data to be accessed; Determining whether the second data to be accessed has been synchronized; if the second data to be accessed is not synchronized, determining whether the first storage module reaches an update cache condition; if the first storage module has reached an update A cache condition that performs the step of generating the data set.
  • the method further includes: if the first storage module does not reach the update cache condition, synchronizing the second data to be accessed in the first storage module, to obtain the second to be accessed
  • the cached data corresponding to the data, the destination storage address of the cached data is the same as the destination storage address of the second data to be accessed, and the activity of the cached data corresponding to the second data to be accessed is recorded.
  • the method further includes: if the second data to be accessed has been synchronized, updating the activity of the cached data corresponding to the second data to be accessed.
  • the present invention provides a data writing method, including: a first storage module generates a data set to be written into a second storage module; and a destination storage address of the first data in the data set belongs to a preset An address range; the first storage module sends the data set to the second storage module.
  • the first storage module is a cache device
  • the generating the data set to be written into the second storage module includes: the first storage module selects a plurality of first data from the cache data set of the first storage module; The first storage module generates the data set according to the plurality of first data.
  • the data set includes one or more subsets of data;
  • the plurality of first data includes First data of one or more subsets of data;
  • the first storage module Selecting, by the first storage module, the plurality of first data from the cache data set of the first storage module, the first storage module selects at least one disk area from the set of disk areas, and each disk area has an address range of a preset length.
  • the disk area stores at least two second data; the first storage module selects, in the cache data set, cache data corresponding to the at least one disk area as the one or more data subsets
  • the first data, the destination storage address of the cached data is attributed to the at least one disk area.
  • the at least one disk area is a disk area in the set of disk areas whose activity is lower than a first threshold.
  • the method before the generating the data set to be written into the second storage module, the method further includes: the first storage module generates a disk area queue, and the disk areas in the disk area queue are sorted according to respective destination storage addresses. Each of the disk areas stores at least two second data.
  • generating, by the first storage module, the data set according to the plurality of first data including: generating the data set according to the selected plurality of first data and an order of the corresponding disk area in the disk area queue .
  • the first data in each of the disk areas is sorted according to a respective destination storage address.
  • the plurality of first data is cache data in which the activity level in the cache data set is lower than a second threshold.
  • the generating the data set to be written into the second storage module includes: the first storage module has reached an update cache condition, and the update cache condition is that the data amount of the cached data set reaches a cache saturation threshold. .
  • the method before the generating the data set to be written into the second storage module, the method includes: receiving a second storage module access request, where the second storage module access request includes a destination storage address of the second data to be accessed; Determining whether the second data to be accessed has been synchronized; if the second data to be accessed is not synchronized, determining whether the first storage module reaches an update cache condition; if the first storage module has reached an update A cache condition that performs the step of generating the data set.
  • the method further includes: if the first storage module does not reach the update cache condition, synchronizing the second data to be accessed in the first storage module, to obtain the second to be accessed
  • the cached data corresponding to the data, the destination storage address of the cached data is the same as the destination storage address of the second data to be accessed, and the activity of the cached data corresponding to the second data to be accessed is recorded.
  • the method further includes: if the second data to be accessed has been synchronized, updating the activity of the cached data corresponding to the second data to be accessed.
  • an embodiment of the present invention provides a data writing apparatus, including: a processing module, configured to generate a data set to be written into a second storage module; and the first data in the data set is stored according to a purpose thereof And an sending module, configured to send the first data in the data set to the second storage module in sequence.
  • the processing module is configured to select a plurality of first data from a set of cached data of its own; Generating the data set according to the plurality of first data.
  • the first processing module is specifically configured to select at least one disk area from the set of disk areas, where the disk area stores at least two second data; and, in the cache data set, select and The cache data corresponding to the at least one disk area is used as the plurality of first data, and the destination storage address of the cache data is attributed to the at least one disk area.
  • the processing module is further configured to generate a disk area queue, wherein the disk areas in the disk area queue are sorted according to respective destination storage addresses; each of the disk areas stores at least two second data; And generating the data set according to the selected plurality of first data and an order of the corresponding disk area in the disk area queue.
  • the device further includes: a receiving module, configured to receive a second storage module access request, where the second storage module access request includes a destination storage address of the second data to be accessed; and the processing module further uses Determining whether the second data to be accessed has been synchronized; and determining whether the first storage module reaches an update cache condition when the second data to be accessed is not synchronized, the update cache condition is The amount of data of the cached data set reaches a cache saturation threshold; and is configured to perform the step of generating the data set when the first storage module has reached an update cache condition.
  • the processing module is further configured to: when the first storage module does not reach the update cache condition, synchronize the second data to be accessed in the first storage module to obtain the to-be-accessed
  • the cached data corresponding to the second data, the destination storage address of the cached data is the same as the destination storage address of the second data to be accessed, and the activity of the cached data corresponding to the second data to be accessed is recorded.
  • the processing module is further configured to update the activity of the cached data corresponding to the second data to be accessed when the second data to be accessed has been synchronized.
  • the present invention provides a data writing apparatus, including: a processing module, configured to generate a data set to be written into a second storage module; and a destination storage address of the first data in the data set belongs to a preset An address range; a sending module, configured to send the data set to the second storage module.
  • Embodiment 1 is a schematic flow chart of a data writing method in Embodiment 1 of the present disclosure
  • FIG. 2 is a schematic flowchart of a data writing method in Embodiment 2 of the present disclosure
  • FIG. 3 is a flow chart of an alternative embodiment of the data writing method shown in FIG. 2;
  • FIG. 5 is a schematic diagram of an optional implementation manner of a disk area queue in a data writing method according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a data writing apparatus according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a data writing apparatus according to Embodiment 2 of the present disclosure.
  • the techniques of this disclosure may be implemented in the form of hardware and/or software (including firmware, microcode, etc.). Additionally, the techniques of this disclosure may take the form of a computer program product on a computer readable medium storing instructions for use by or in connection with an instruction execution system.
  • a computer A readable medium can be any medium that can contain, store, communicate, propagate or transport the instructions.
  • a computer readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium.
  • the computer readable medium include: a magnetic storage device such as a magnetic tape or a hard disk (HDD); an optical storage device such as a compact disk (CD-ROM); a memory such as a random access memory (RAM) or a flash memory; and/or a wired /Wireless communication link.
  • a magnetic storage device such as a magnetic tape or a hard disk (HDD)
  • an optical storage device such as a compact disk (CD-ROM)
  • a memory such as a random access memory (RAM) or a flash memory
  • RAM random access memory
  • An embodiment of the present disclosure provides a data writing method, including: a first storage module generates a data set to be written into a second storage module, wherein the first data in the data set is sorted according to a destination storage address thereof And the first storage module sends the first data in the data set to the second storage module in sequence.
  • FIG. 1 is a schematic flowchart of a data writing method in the first embodiment of the present disclosure. As shown in FIG. 1 , the data writing method provided in this embodiment includes:
  • Operation S101 The first storage module generates a data set to be written into the second storage module, wherein the first data in the data set is sorted according to its own destination storage address.
  • Operation S102 The first storage module sends the first data in the data set to the second storage module in sequence.
  • the first storage module and the second storage module may include a plurality of storage units, such as a sector or a block.
  • the size of the first data may be an integer multiple of the storage unit.
  • the destination storage address of the first data may be a physical storage address of the first data in the second storage module to be written.
  • the second storage module may be a device having a function of storing data, such as a disk device, a network server, or the like.
  • the data writing method provided by the embodiment of the present disclosure may be applied to a scenario in which a cache device writes data to a disk device.
  • the data set by generating a data set to be written into the second storage module, and the data set is sorted according to the destination storage address of the first data, and transmitting the first data in the data set to the second storage module in sequence, when When the second storage module sequentially writes the first data, the total write path corresponding to each first data is written in the order in which the destination storage addresses are sorted, which is necessarily shorter than the total write path corresponding to the other sort writes. Therefore, by generating a data set with a short write time, the technical effect of increasing the speed at which the first storage module writes data to the second storage module can be achieved.
  • the first storage module may be a cache device
  • the second storage module may be a disk device.
  • operation S101 may include:
  • the first storage module selects a plurality of first data from its own cached data set
  • the first storage module generates a data set according to the plurality of first data.
  • the destination storage addresses of the plurality of first data may belong to the same second storage module or multiple
  • the second storage module may send the first data in the data set to the second storage module to which the destination storage address belongs.
  • the cache device can send the data set to the disk drive of the corresponding disk device.
  • the cache device may perform the step of generating a data set to be written to the second storage module when the update cache threshold condition is reached.
  • the update cache threshold condition may be that the amount of data of the cached data set of the cache device reaches a cache saturation threshold, that is, the cache device is about to be full.
  • the cache device when the cache device cannot read new data from the disk device due to being full, it needs to select one or more first data to be written into the disk device from the cache data currently stored by itself, so as to replace part of the storage. space. Therefore, based on the application scenario, the data writing method provided by the embodiment of the present disclosure can improve the speed of the cache device performing the cache update operation, thereby releasing the storage space in the cache device more quickly.
  • the plurality of first data may be cached data in the cached data set whose activity is lower than the second threshold.
  • the plurality of first data may be a plurality of cached data having the lowest activity among the cached data sets.
  • the processor when the processor sends an access request to the cache device to request access to the second data on the disk device, if the second data has been synchronized from the disk device to the cache device, that is, the cache data set of the cache device.
  • the cache data corresponding to the second data is stored, and the processor can directly access the cache data corresponding to the second data in the cache device, and the operation result can be referred to as a hit.
  • the data hit rate of the period of time can be calculated according to whether the request is accessed multiple times in a period of time. Since the selected first data is the cache data with lower activity, the method of selecting the first data to be replaced by the cache device according to the activity level can improve the data hit rate of the cache data set remaining on the cache device. , thereby increasing the average access speed of the processor.
  • the plurality of first data in the data set may be sorted by far and near according to the destination storage address, or may be sorted by near and far.
  • the data set sorted by these two methods corresponds to the same total write path length. Therefore, the disclosure does not limit this, and details are not described herein again.
  • the method for writing data provided by the embodiment of the present disclosure, by generating a data set to be written into the second storage module, the data set is sorted according to the destination storage address of the first data, and sequentially sent to the second storage module in the data set.
  • the first data when the second storage module sequentially writes the first data, writes the total write path corresponding to each first data according to the order in which the destination storage addresses are sorted, and is inevitably written to the corresponding total write path according to other sorts. Shorter. Therefore, the embodiment of the present disclosure can increase the speed at which the first storage module writes data to the second storage module by generating a data set with a short write time.
  • Embodiment 2 is a schematic flowchart of a data writing method in Embodiment 2 of the present disclosure.
  • the embodiment of the present disclosure further provides a method for generating a data set with a short writing time to improve writing of data by the first storage module to the second storage module. The method of writing the speed of the data.
  • the steps of the embodiments of the present disclosure include:
  • the first storage module generates a data set to be written into the second storage module, where the destination storage address of the first data in the data set belongs to a preset address range.
  • S202 The first storage module sends the data set to the second storage module.
  • the preset address range may be a continuous storage space on the second storage module.
  • the preset address range can have a preset length. Then, when two or more first data are included in one data set, the distance of the destination storage addresses of any two first data is less than a preset length.
  • the destination storage address of the first data in the data set generated in this way is distributed in the second storage module, and the distance that the second storage module needs to move when performing the write operation is compared to the data that is more discretely distributed.
  • the distance that needs to be moved when writing is short, so the second memory module writes the data set generated in this way faster than the data set of the far-distributed data set.
  • the first data in the data set to be written into the second storage module may be sorted according to its own destination storage address and each first data belongs to a preset address range.
  • the technical effects of the embodiment shown in Fig. 1 can be simultaneously achieved.
  • the writing speed of the second storage module can be improved at the same time from the above two aspects.
  • the first storage module may be a cache device
  • the second storage module may be a disk device.
  • the cache device may perform the step of generating a data set to be written to the second storage module when the update cache threshold condition is reached.
  • the data writing method provided by the embodiment of the present disclosure can also improve the speed of the cache device performing the cache update operation, thereby releasing the storage space in the cache device more quickly.
  • a preset length address range may be defined as a zone, and each disk zone may include multiple storage units. Wherein each storage unit can be a sector or a block.
  • S201 can specifically include:
  • the first storage module selects a disk area from the set of disk areas, and the disk area stores at least two second data.
  • the first storage module selects the cached data corresponding to the disk area as the first data in the data set in the cache data set of the first storage module, and the destination storage address of the cached data belongs to the disk area.
  • the first storage module generates a data set according to the plurality of first data.
  • the second storage module may be divided into multiple disk areas, and the disk area set may include identifiers of multiple disk areas.
  • the first storage module can be conveniently selected to quickly select the first data generation data set that is closer.
  • the selected volume may be a volume in the collection of extents whose activity is lower than the first threshold.
  • the selected volume can be the least active extent in the extent collection. Similar to the method shown in FIG. 1, since the selected first data is the cache data corresponding to the disk area with lower activity, the method of selecting the first data to be replaced by the cache device according to the activity level can improve the retention. The data hit rate of the cached data collection on the cache device, which in turn increases The average access speed of the processor.
  • a method for writing data provided by an embodiment of the present disclosure by generating a data set including at least one data subset, wherein a destination storage address of the first data in the data subset belongs to an address range having a preset length, due to the data set
  • the distribution of the write addresses of the first data in the respective subsets in the second storage device is relatively concentrated. Therefore, the distance that the second storage module needs to move when performing the write operation is compared to when the write operation is performed on the data with more discrete distribution.
  • the distance that needs to be moved is short, and therefore, the embodiment of the present disclosure can increase the speed at which the first storage module writes data to the second storage module.
  • the data set to be written into the second storage module in the method shown in FIG. 2 may include at least one data subset, and the first data in any data subset may belong to an address range having a preset length. That is, the first data in one data subset may belong to one address range, and different data subsets may correspond to different address ranges.
  • S201 may be specifically implemented by using S301-S303 described below, and S202 may be implemented by using S304 described below.
  • the first storage module selects at least two disk areas from the set of disk areas.
  • the at least one of the at least two extents stores at least two second data.
  • the first storage module selects, in its own cache data set, cache data corresponding to at least two disk areas as the first data in each data subset in the data set, and the destination storage address of the cache data corresponding to any disk area. Belongs to the disk area.
  • the first storage module generates a data set according to the plurality of data subsets.
  • S304 The first storage module separately sends the data subset in the data set to the second storage module.
  • the second storage module can separately write and distribute the distributions when writing the first data in one data set.
  • the first data in the subset of data therefore, the second storage module writes the data set generated in this manner faster than the write speed of the data written over the address range repeatedly.
  • At least one extent is a volume in the collection of extents whose activity is lower than a first threshold.
  • at least one of the extents is at least one of the least active extents in the collection of extents.
  • each disk area can be obtained according to the activity of the cache data corresponding to the disk area.
  • the activity S of the disk area may be the sum of a, b, and c.
  • non-volatile dual inline memory modules in non-volatile memory chips Non-volatile Dual Inline Memory Module
  • NVDIMM Non-volatile Dual Inline Memory Module
  • the cache device is slowed down.
  • the time interval T for storing the update threshold condition will be relatively long.
  • the processor requests for access to the disk device in a certain period of time in the past will be aggregated in one or more disk areas of the disk device, for example, The processor accesses a program that is involved in a file that is usually located near the storage address of the disk device, for example, belonging to a disk area.
  • the cache area data of the disk area can be replaced by the cache device by selecting the disk area from the disk area set, that is, the cache data corresponding to one program is replaced by the cache device.
  • the data hit rate of the cache device does not decrease because the cached data corresponding to the selected disk area includes a part of the cache data with higher activity. Therefore, the speed of the update operation of the cache device can be improved on the basis of ensuring the data hit ratio of the cache device.
  • the extents in the set of extents can be sorted according to their respective destination storage addresses.
  • the generating the data set according to the plurality of data subsets in operation S303 may specifically include: generating a data set according to an order of the disk areas corresponding to the plurality of data subsets in the disk area set, wherein each data subset in the data set Sort by destination storage address.
  • first data in each data subset may also be sorted according to its own destination storage address.
  • generating the data set according to the plurality of data subsets may further include: corresponding first data according to the plurality of first data.
  • a data set is generated, wherein each data subset in the data set is sorted according to a destination storage address, and the cache data in each data subset is sorted according to a destination storage address.
  • the two methods shown in FIG. 1 and FIG. 2 are actually merged, that is, the destination storage address of the first data in the generated data set to be written belongs to a preset address range and The first data in the data set is sorted according to the destination storage address. Therefore, this method can simultaneously have the technical effects that the method shown in FIGS. 1 and 2 can bring. That is, the distribution of the first data to be written is relatively concentrated, and the write operation can be prevented from detouring, so that the total write path is shorter, and the write speed of the second storage module can be greatly improved.
  • FIG. 4 is a schematic flowchart of a data writing method in Embodiment 3 of the present disclosure
  • FIG. 5 is a schematic diagram of an optional implementation manner of a disk area queue in a data writing method according to an embodiment of the present disclosure.
  • the method of an embodiment of the present disclosure provides an implementation that triggers a cache update operation when a cache device reaches an update cache threshold condition.
  • the method of the embodiment of the present disclosure may be used to obtain the activity of the cached data in the cached data set of the first storage module, so that the cached data with lower activity is selected as the second write when the cache update operation is triggered.
  • the data of the storage module may be used to obtain the activity of the cached data in the cached data set of the first storage module, so that the cached data with lower activity is selected as the second write when the cache update operation is triggered. The data of the storage module.
  • step 101 (not shown in FIG. 4) in the method of FIG. 1 or S201 (not shown in FIG. 4) in the method of FIG. 2:
  • the first storage module receives a data access request, where the data access request includes the purpose of the second data to be accessed. Storage address.
  • the data access request may be sent by the processor to the first storage module.
  • the first storage module determines whether the second data to be accessed has been synchronized. If the second data to be accessed is not synchronized, perform S403. If the second data to be accessed has been synchronized, perform 406.
  • S403 Determine whether the first storage module reaches the update cache condition. If the first storage module has reached the update cache condition, execute S404. If the first storage module does not reach the update cache condition, perform S405.
  • the cache update operation may include: generating a data set to be written into the second storage module, and sending the first data in the data set to the second in order Storage module. It should be noted that the method for generating a data set to be written into the second storage module may adopt any one of the methods shown in FIG. 1 .
  • the cache update operation may be: generating a data set to be written into the second storage module, and sending the data set to the second storage module. It should be noted that the method for generating a data set to be written into the second storage module may adopt any one of the methods shown in FIG. 2 to FIG.
  • S405 Synchronize the second data to be accessed in the first storage module, obtain the cache data corresponding to the second data to be accessed, and record the activity of the cache data corresponding to the second data to be accessed, and execute S406.
  • the destination storage address of the cached data is the same as the destination storage address of the second data to be accessed.
  • S406 Update the activity level of the cached data corresponding to the second data to be accessed, and perform the processing step after the data hit.
  • the method may include:
  • the first storage module generates a disk area queue.
  • the disk area queue may record the attribute information and the order of all the disk areas in the form of a linked list or an array.
  • the attribute information of each disk area may include: the identifier of the disk area, the activity of the disk area, and the cached data in the disk area.
  • the disk area queue can also be used as a set of disk areas in the embodiment shown in FIG. 2.
  • the activeness of the cached data corresponding to the second data to be accessed in S405 may specifically include:
  • the identifier of the cache data corresponding to the second data to be accessed is added to the cache data queue of the corresponding disk area in the disk area queue.
  • the cache data queue may record the attribute information and the order of the first cache data of the disk area in the form of a linked list or the array.
  • the attribute information of each cached data may include: identifier of the cached data, activity of the cached data, and the like. For at least one of them, refer to Figure 5.
  • the disk area uses a linked list or an array to record the disk area queue, the disk area set, and the cache data team corresponding to each disk area.
  • the information of the column can save the sorting information of the cache data corresponding to each disk area and the sorting information of the disk area with less storage space.
  • FIG. 6 is a schematic structural diagram of a data writing apparatus according to an embodiment of the present disclosure. As shown in FIG. 6, the writing device of the embodiment may be located in the first storage module, and the device 60 of the embodiment of the present disclosure includes:
  • the first processing module 601 is configured to generate a data set to be written into the second storage module; the first data in the data set is sorted according to its own destination storage address;
  • the first sending module 602 is configured to send the first data in the data set to the second storage module in sequence.
  • the first processing module 601 can be configured to select a plurality of first data from its own cached data set, and can also be configured to generate a data set according to the plurality of first data.
  • the first processing module 601 is specifically configured to select at least one disk area from the set of disk areas, where the disk area stores at least two second data, and may be used to select at least one of the cache data sets.
  • the cache data corresponding to the disk area is used as a plurality of first data, and the destination storage address of the cache data belongs to at least one disk area.
  • the first processing module 601 is further configured to generate a disk area queue, where the disk areas in the disk area queue are sorted according to respective destination storage addresses; each disk area stores at least two second data; and A data set is generated according to the selected plurality of first data and the order of the corresponding disk areas in the disk area queue.
  • FIG. 7 is a schematic structural diagram of a data writing apparatus according to Embodiment 2 of the present disclosure. As shown in FIG. 7, the writing device of this embodiment may be located in a first storage module, and the device 70 of the embodiment of the present disclosure includes:
  • the second processing module 701 is configured to generate a data set to be written into the second storage module; the destination storage address of the first data in the data set belongs to an address range of a preset length;
  • the second sending module 702 is configured to send the data set to the second storage module.
  • the second processing module may be configured to select a plurality of first data from its own cached data set, and may also be configured to generate a data set according to the plurality of first data.
  • the second processing module 701 is specifically configured to select at least one disk area from the set of disk areas, where the disk area stores at least two second data, and may be used to select at least one of the cache data sets.
  • the cache data corresponding to the disk area is used as a plurality of first data, and the destination storage address of the cache data belongs to at least one disk area.
  • the second processing module 701 is further configured to generate a disk area queue, wherein the disk areas in the disk area queue are sorted according to respective destination storage addresses; each disk area stores at least two second data; and A data set is generated according to the selected plurality of first data and the order of the corresponding disk areas in the disk area queue.
  • embodiments of the present disclosure can be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware aspects. Moreover, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

一种数据的写入方法,所述方法包括:第一存储模块生成待写入第二存储模块的数据集合,其中,所述数据集合中的第一数据根据自身的目的存储地址排序(S101);以及所述第一存储模块将所述数据集合中的第一数据按顺序发送给所述第二存储模块(S102)。还提供了另一种数据的写入方法,一种数据的写入装置以及另一种数据的写入装置。

Description

数据的写入方法及装置 技术领域
本公开涉及计算机领域,尤其涉及一种数据的写入方法及装置。
背景技术
随着计算机硬件性能的飞速发展,计算机缓存设备的容量和缓存设备的访问速度均获得大幅提升。
目前,当缓存设备达到缓存更新阈值,即缓存设备存储的缓存数据较多,无法读入更多数据时,需要将缓存设备中的一些使用频率较低的数据从缓存设备刷出。缓存设备可以将待刷出的数据发送给磁盘设备以写入数据,磁盘设备通过移动磁头将数据写入各个数据的目的存储地址。
但是,当待写入的各个数据的目的存储地址的距离较远时,磁头的移动范围大,磁盘设备的写入速度慢,进而导致缓存设备的刷出速度慢。
发明内容
有鉴于此,本公开实施例的主要目的在于提供一种数据的写入方法及其装置,以实现一种提高缓存设备的刷出速度的数据写入方法。
本公开的一个方面提供了一种数据的写入方法,包括:第一存储模块生成待写入第二存储模块的数据集合,其中,上述数据集合中的第一数据根据自身的目的存储地址排序;以及上述第一存储模块将上述数据集合中的第一数据按顺序发送给上述第二存储模块。
可选地,上述第一存储模块为缓存设备,上述生成待写入第二存储模块的数据集合,包括:上述第一存储模块从自身的缓存数据集合中选择多个第一数据;以及上述第一存储模块根据上述多个第一数据,生成上述数据集合。
可选地,上述数据集合包括一个或多个数据子集;以及上述第一存储模块从自身的缓存数据集合中选择多个第一数据,包括:上述第一存储模块从磁盘区集合中选择至少一个磁盘区,其中,上述至少一个磁盘区中的每个存储有至少两个第二数据;以及上述第一存储模块在上述缓存数据集合中选择与上述至少一个磁盘区中的各个磁盘区对应的缓存数据作为上述一个或多个数据子集中的第一数据,上述缓存数据的目的存储地址归属于上述至少一个磁盘区;以及上述第一存储模块根据上述多个第一数据生成上述数据集合,包括:根据选中的各个数据子集的第一数据及自身的目的存储地址在对应的磁盘区中的顺序,生成上述一个或多 个数据子集;以及根据上述一个或多个数据子集生成上述数据集合。
可选地,上述至少一个磁盘区为上述磁盘区集合中活跃度低于第一阈值的磁盘区。
可选地,在上述生成待写入第二存储模块的数据集合之前,上述方法还包括:上述第一存储模块生成磁盘区队列,其中,上述磁盘区队列中的磁盘区按照各自的目的存储地址排序,上述至少一个磁盘区中的每个存储有至少两个第二数据;以及上述第一存储模块根据上述多个第一数据生成上述数据集合,包括:根据选中的多个第一数据以及对应的磁盘区在上述磁盘区队列中的顺序,生成上述数据集合。
可选地,上述每个磁盘区中的第一数据按照各自的目的存储地址排序。
可选地,上述生成待写入第二存储模块的数据集合,包括:在上述第一存储模块已达到更新缓存条件时,生成待写入第二存储模块的数据集合,其中,上述更新缓存条件为上述缓存数据集合的数据量达到缓存饱和阈值。
本公开的一个方面还提供了另一种数据的写入方法,包括:第一存储模块生成待写入第二存储模块的数据集合,其中,上述数据集合中的第一数据的目的存储地址属于预设的地址范围;以及上述第一存储模块将上述数据集合发送给第二存储模块。
本公开的一个方面还提供了一种数据的写入装置,包括:处理模块,用于生成待写入第二存储模块的数据集合,其中,上述数据集合中的第一数据根据自身的目的存储地址排序;以及发送模块,用于将上述数据集合中的第一数据按顺序发送给第二存储模块。
本公开的一个方面还提供了另一种数据的写入装置,包括:处理模块,用于生成待写入第二存储模块的数据集合,其中,上述数据集合的第一数据的目的存储地址属于预设的地址范围;以及发送模块,用于将上述数据集合发送给第二存储模块。
第一方面,本发明实施例提供一种数据的写入方法,包括:第一存储模块生成待写入第二存储模块的数据集合;所述数据集合中的第一数据根据自身的目的存储地址排序;所述第一存储模块将所述数据集合中的第一数据按顺序发送给所述第二存储模块。
上述方案中,所述第一存储模块为缓存设备,所述生成待写入第二存储模块的数据集合,包括:所述第一存储模块从自身的缓存数据集合中选择多个第一数据;所述第一存储模块根据所述多个第一数据,生成所述数据集合。
上述方案中,所述数据集合包括一个或多个数据子集;所述第一存储模块从自身的缓存数据集合中选择多个第一数据,包括:所述第一存储模块从磁盘区集合中选择至少一个磁盘区,所述磁盘区存储有至少两个第二数据;所述第一存储模块在所述缓存数据集合中选择与所述至少一个磁盘区中的各个磁盘区对应的缓存数据作为所述一个或多个数据子集中的多个第一数据,所述缓存数据的目的存储地址归属于所述至少一个磁盘区。
所述第一存储模块根据所述多个第一数据生成所述数据集合,包括:根据选中的各个数据子集的第一数据及自身的目的存储地址在对应的磁盘区中的顺序,生成所述一个或多个数据子集;根据所述一个或多个数据子集生成所述数据集合。
上述方案中,所述至少一个磁盘区为所述磁盘区集合中活跃度低于第一阈值的磁盘区。
上述方案中,在所述生成待写入第二存储模块的数据集合之前,还包括:所述第一存储模块生成磁盘区队列,所述磁盘区队列中的磁盘区按照各自的目的存储地址排序;每个所述磁盘区存储有至少两个第二数据。
所述第一存储模块根据所述多个第一数据生成所述数据集合,包括:根据选中的多个第一数据以及对应的磁盘区在所述磁盘区队列中的顺序,生成所述数据集合。
上述方案中,所述每个磁盘区中的第一数据按照各自的目的存储地址排序。
上述方案中,所述多个第一数据为所述缓存数据集合中活跃度低于第二阈值的缓存数据。
上述方案中,所述生成待写入第二存储模块的数据集合,包括:所述第一存储模块已达到更新缓存条件,所述更新缓存条件为所述缓存数据集合的数据量达到缓存饱和阈值。
上述方案中,在所述生成待写入第二存储模块的数据集合之前,包括:接收第二存储模块访问请求,所述第二存储模块访问请求包括待访问的第二数据的目的存储地址;判断所述待访问的第二数据是否已经同步;若所述待访问的第二数据未被同步,则判断所述第一存储模块是否达到更新缓存条件;若所述第一存储模块已达到更新缓存条件,执行生成所述数据集合的步骤。
上述方案中,所述方法还包括:若所述第一存储模块未达到更新缓存条件,则在所述第一存储模块中同步所述待访问的第二数据,得到所述待访问的第二数据对应的缓存数据,所述缓存数据的目的存储地址与所述待访问的第二数据的目的存储地址相同,并记录所述待访问的第二数据对应的缓存数据的活跃度。
上述方案中,所述方法还包括:若所述待访问的第二数据已经同步,则更新所述待访问的第二数据对应的缓存数据的活跃度。
第二方面,本发明提供一种数据的写入方法,包括:第一存储模块生成待写入第二存储模块的数据集合;所述数据集合中的第一数据的目的存储地址属于预设的地址范围;所述第一存储模块将所述数据集合发送给所述第二存储模块。
上述方案中,所述第一存储模块为缓存设备,所述生成待写入第二存储模块的数据集合,包括:所述第一存储模块从自身的缓存数据集合中选择多个第一数据;所述第一存储模块根据所述多个第一数据,生成所述数据集合。
上述方案中,所述数据集合包括一个或多个数据子集;所述多个第一数据包括属于所述 一个或多个数据子集的第一数据;
所述第一存储模块从自身的缓存数据集合中选择多个第一数据,包括:所述第一存储模块从磁盘区集合中选择至少一个磁盘区,每个磁盘区具有预设长度的地址范围,所述磁盘区存储有至少两个第二数据;所述第一存储模块在所述缓存数据集合中选择与所述至少一个磁盘区对应的缓存数据作为所述一个或多个数据子集中的第一数据,所述缓存数据的目的存储地址归属于所述至少一个磁盘区。
上述方案中,所述至少一个磁盘区为所述磁盘区集合中活跃度低于第一阈值的磁盘区。
上述方案中,在所述生成待写入第二存储模块的数据集合之前,还包括:所述第一存储模块生成磁盘区队列,所述磁盘区队列中的磁盘区按照各自的目的存储地址排序;每个所述磁盘区存储有至少两个第二数据。
所述第一存储模块根据所述多个第一数据生成所述数据集合,包括:根据选中的多个第一数据以及对应的磁盘区在所述磁盘区队列中的顺序,生成所述数据集合。
上述方案中,所述每个磁盘区中的第一数据按照各自的目的存储地址排序。
上述方案中,所述多个第一数据为所述缓存数据集合中活跃度低于第二阈值的缓存数据。
上述方案中,所述生成待写入第二存储模块的数据集合,包括:所述第一存储模块已达到更新缓存条件,所述更新缓存条件为所述缓存数据集合的数据量达到缓存饱和阈值。
上述方案中,在所述生成待写入第二存储模块的数据集合之前,包括:接收第二存储模块访问请求,所述第二存储模块访问请求包括待访问的第二数据的目的存储地址;判断所述待访问的第二数据是否已经同步;若所述待访问的第二数据未被同步,则判断所述第一存储模块是否达到更新缓存条件;若所述第一存储模块已达到更新缓存条件,执行生成所述数据集合的步骤。
上述方案中,所述方法还包括:若所述第一存储模块未达到更新缓存条件,则在所述第一存储模块中同步所述待访问的第二数据,得到所述待访问的第二数据对应的缓存数据,所述缓存数据的目的存储地址与所述待访问的第二数据的目的存储地址相同,并记录所述待访问的第二数据对应的缓存数据的活跃度。
上述方案中,所述方法还包括:若所述待访问的第二数据已经同步,则更新所述待访问的第二数据对应的缓存数据的活跃度。
第三方面,本发明实施例提供一种数据的写入装置,包括:处理模块,用于生成待写入第二存储模块的数据集合;所述数据集合中的第一数据根据自身的目的存储地址排序;发送模块,用于将所述数据集合中第一数据按顺序发送给第二存储模块。
上述方案中,所述处理模块,用于从自身的缓存数据集合中选择多个第一数据;还用于 根据所述多个第一数据,生成所述数据集合。
上述方案中,所述第一处理模块,具体用于从磁盘区集合中选择至少一个磁盘区,所述磁盘区存储有至少两个第二数据;以及,在所述缓存数据集合中选择与所述至少一个磁盘区对应的缓存数据作为所述多个第一数据,所述缓存数据的目的存储地址归属于所述至少一个磁盘区。
上述方案中,所述处理模块,还用于生成磁盘区队列,所述磁盘区队列中的磁盘区按照各自的目的存储地址排序;每个所述磁盘区存储有至少两个第二数据;以及用于根据选中的多个第一数据以及对应的磁盘区在所述磁盘区队列中的顺序,生成所述数据集合。
上述方案中,所述装置还包括:接收模块,用于接收第二存储模块访问请求,所述第二存储模块访问请求包括待访问的第二数据的目的存储地址;所述处理模块,还用于判断所述待访问的第二数据是否已经同步;以及用于在所述待访问的第二数据未被同步时,判断第一存储模块是否达到更新缓存条件,所述更新缓存条件为所述缓存数据集合的数据量达到缓存饱和阈值;以及用于在所述第一存储模块已达到更新缓存条件时,执行所述生成所述数据集合的步骤。
上述方案中,所述处理模块,还用于在所述第一存储模块未达到更新缓存条件时,在所述第一存储模块中同步所述待访问的第二数据,得到所述待访问的第二数据对应的缓存数据,所述缓存数据的目的存储地址与所述待访问的第二数据的目的存储地址相同,并记录所述待访问的第二数据对应的缓存数据的活跃度。
上述方案中,所述处理模块,还用于在所述待访问的第二数据已经同步时,更新所述待访问的第二数据对应的缓存数据的活跃度。
第四方面,本发明提供一种数据的写入装置,包括:处理模块,用于生成待写入第二存储模块的数据集合;所述数据集合中的第一数据的目的存储地址属于预设的地址范围;发送模块,用于将所述数据集合发送给第二存储模块。
附图说明
为了更完整地理解本公开及其优势,现在将参考结合附图的以下描述,其中:
图1为本公开实施例一中数据写入方法的流程示意图;
图2为本公开实施例二中数据写入方法的流程示意图;
图3为图2所示数据写入方法的一种可选实施方式的流程图;
图4为本公开实施例三中数据写入方法的流程示意图;
图5为本公开实施例数据写入方法中磁盘区队列的一种可选的实施方式的示意图;
图6为本公开实施例一数据写入装置的结构示意图;以及
图7为本公开实施例二数据写入装置的结构示意图。
具体实施方式
以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。
在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。
在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。
在此使用的所有术语(包括技术和科学术语)具有本领域技术人员通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。
在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。在使用类似于“A、B或C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B或C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。本领域技术人员还应理解,实质上任意表示两个或更多可选项目的转折连词和/或短语,无论是在说明书、权利要求书还是附图中,都应被理解为给出了包括这些项目之一、这些项目任一方、或两个项目的可能性。例如,短语“A或B”应当被理解为包括“A”或“B”、或“A和B”的可能性。
附图中示出了一些方框图和/或流程图。应理解,方框图和/或流程图中的一些方框或其组合可以由计算机程序指令来实现。这些计算机程序指令可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器,从而这些指令在由该处理器执行时可以创建用于实现这些方框图和/或流程图中所说明的功能/操作的装置。
因此,本公开的技术可以硬件和/或软件(包括固件、微代码等)的形式来实现。另外,本公开的技术可以采取存储有指令的计算机可读介质上的计算机程序产品的形式,该计算机程序产品可供指令执行系统使用或者结合指令执行系统使用。在本公开的上下文中,计算机 可读介质可以是能够包含、存储、传送、传播或传输指令的任意介质。例如,计算机可读介质可以包括但不限于电、磁、光、电磁、红外或半导体系统、装置、器件或传播介质。计算机可读介质的具体示例包括:磁存储装置,如磁带或硬盘(HDD);光存储装置,如光盘(CD-ROM);存储器,如随机存取存储器(RAM)或闪存;和/或有线/无线通信链路。
本公开的实施例提供了一种数据的写入方法,包括:第一存储模块生成待写入第二存储模块的数据集合,其中,上述数据集合中的第一数据根据自身的目的存储地址排序;以及上述第一存储模块将上述数据集合中的第一数据按顺序发送给上述第二存储模块。
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述。
实施例一
图1为本公开实施例一中数据写入方法的流程示意图,如图1所示,本实施例提供的数据的写入方法,包括:
操作S101:第一存储模块生成待写入第二存储模块的数据集合,其中,该数据集合中的第一数据根据自身的目的存储地址排序。
操作S102:第一存储模块将数据集合中的第一数据按顺序发送给第二存储模块。
在本公开实施例中,第一存储模块和第二存储模块上可以包括多个存储单元,例如,扇区(sector)或块(block)。第一数据的大小可以为存储单元的整数倍。第一数据的目的存储地址可以为第一数据在待写入的第二存储模块中的物理存储地址。
可选地,第二存储模块可以是具备存储数据功能的设备,例如,磁盘设备、网络服务器等。例如,本公开实施例提供的数据写入方法可以应用于缓存设备向磁盘设备写入数据的场景。
根据本公开实施例,通过生成待写入第二存储模块的数据集合,且数据集合按照第一数据的目的存储地址排序,并按照顺序向第二存储模块发送数据集合中的第一数据,当第二存储模块依次写入第一数据时,按照目的存储地址排序的顺序写入各个第一数据对应的总写入路径,必然比按照其他排序写入对应的总写入路径较短。因此,通过生成写入时间较短的数据集合,可以实现提升第一存储模块向第二存储模块写入数据的速度的技术效果。
作为一种可选的实施例,第一存储模块可以为缓存设备,第二存储模块可以为磁盘设备。当第一存储模块为缓存设备,且第二存储模块为磁盘设备时,操作S101可以包括:
第一存储模块从自身的缓存数据集合中选择多个第一数据;以及
第一存储模块根据多个第一数据,生成数据集合。
需要说明的是,多个第一数据的目的存储地址可以归属于同一第二存储模块或者多个第 二存储模块,则第一存储模块可以将数据集合中的第一数据发送给其目的存储地址归属的第二存储模块。示例性的,缓存设备可以将数据集合发送给对应的磁盘设备的磁盘驱动器。
可选的,缓存设备可以在达到更新缓存阈值条件时,执行生成待写入第二存储模块的数据集合的步骤。例如,更新缓存阈值条件可以是缓存设备的缓存数据集合的数据量达到缓存饱和阈值,即缓存设备即将存满。
需要说明的是,缓存设备在由于即将存满无法从磁盘设备读入新的数据时,需要从自身当前存储的缓存数据中选择一个或多个第一数据写入磁盘设备,以置换出部分存储空间。因此,基于该应用场景,本公开实施例提供的数据写入方法,能够提高缓存设备进行缓存更新操作时的速度,从而更快的释放缓存设备中的存储空间。
可选的,多个第一数据可以为缓存数据集合中活跃度低于第二阈值的缓存数据。或者,多个第一数据可以为缓存数据集合中活跃度最低的多个缓存数据。
需要说明的是,当处理器向缓存设备发送访问请求,请求访问磁盘设备上的第二数据时,若该第二数据已经从磁盘设备上同步至缓存设备上,即在缓存设备的缓存数据集合中存储与第二数据对应的缓存数据,则处理器可以直接访问缓存设备中与第二数据对应的缓存数据,该操作结果可称为一次命中。相应的,可以根据一段时间内多次访问请求是否命中计算该段时间的数据命中率。由于选择的第一数据为活跃度较低的缓存数据,因而采用这种根据活跃度选择待置换出缓存设备的第一数据的方式,能够提高留存在缓存设备上的缓存数据集合的数据命中率,进而提高处理器的平均访问速度。
可选的,数据集合中的多个第一数据可以按照目的存储地址由远及近排序,也可以按照由近及远排序。这两种方式排序的数据集合对应的总的写入路径长度相同。因此,本公开对此不做限制,此处不再赘述。
本公开实施例提供的数据的写入方法,通过生成待写入第二存储模块的数据集合,数据集合按照第一数据的目的存储地址排序,并按照顺序向第二存储模块发送数据集合中的第一数据,当第二存储模块依次写入第一数据时,按照目的存储地址排序的顺序写入各个第一数据对应的总写入路径,必然比按照其他排序写入对应的总写入路径较短。因此,本公开实施例可以通过生成写入时间较短的数据集合,提升第一存储模块向第二存储模块写入数据的速度。
实施例二
图2为本公开实施例二中数据写入方法的流程示意图,本公开实施例还提供一种通过生成写入时间较短的数据集合,以提升第一存储模块向第二存储模块写入数据的速度的数据的写入方法。
如图2所示,本公开实施例的步骤包括:
S201:第一存储模块生成待写入第二存储模块的数据集合,数据集合中的第一数据的目的存储地址属于预设的地址范围。
S202:第一存储模块将数据集合发送给第二存储模块。
在本公开实施例中,预设的地址范围可以为第二存储模块上一段连续的存储空间。预设的地址范围可以具有一预设长度。则当一个数据集合中包括两个或两个以上第一数据时,任意两个第一数据的目的存储地址的距离小于预设长度。
采用这种方式生成的数据集合中的第一数据的目的存储地址在第二存储模块中的分布较近,第二存储模块进行写入操作时需要移动的距离相比于对分布较离散的数据进行写入操作时需要移动的距离较短,因此,第二存储模块对这种方式生成的数据集合的写入速度比分布较远的数据集合的写入速度更快。
可选的,待写入第二存储模块的数据集合中的第一数据可以既按照自身的目的存储地址排序且各个第一数据均属于预设的地址范围。采用这种方式可以同时具有图1所示实施例的技术效果。则第二存储模块的写入速度可以从上述两个方面同时得到提升。
需要说明的是,与图1所示方法类似,第一存储模块可以为缓存设备,第二存储模块可以为磁盘设备。可选的,缓存设备可以在达到更新缓存阈值条件时,执行生成待写入第二存储模块的数据集合的步骤。基于该应用场景,本公开实施例提供的数据写入方法,同样能够提高缓存设备进行缓存更新操作时的速度,从而更快的释放缓存设备中的存储空间。
可选的,一个预设长度的地址范围可以定义为一个磁盘区(zone),每个磁盘区可以包括多个存储单元。其中,每个存储单元可以为扇区或块。
则S201可以具体包括:
第一存储模块从磁盘区集合中选择一个磁盘区,磁盘区存储有至少两个第二数据。第一存储模块在自身的缓存数据集合中选择与磁盘区对应的缓存数据作为数据集合中的第一数据,缓存数据的目的存储地址归属于磁盘区。第一存储模块根据多个第一数据,生成数据集合。
其中,需要说明的是,第二存储模块可以划分为多个磁盘区,磁盘区集合可以包括多个磁盘区的标识。采用该选择磁盘区的方式,能够方便第一存储模块快速选择距离较近的第一数据生成数据集合。
可选的,选中的磁盘区可以为磁盘区集合中活跃度低于第一阈值的磁盘区。或者,选中的磁盘区可以为磁盘区集合中活跃度最低的磁盘区。与图1所示方法类似,由于选择的第一数据为活跃度较低的磁盘区对应的缓存数据,因而采用这种根据活跃度选择待置换出缓存设备的第一数据的方式,能够提高留存在缓存设备上的缓存数据集合的数据命中率,进而提高 处理器的平均访问速度。
本公开实施例提供的数据的写入方法,通过生成包含至少一个数据子集的数据集合,其中,数据子集中的第一数据的目的存储地址属于具有预设长度的地址范围,由于数据集合中各个子集中的第一数据在第二存储设备中写入地址的分布比较集中,因此,第二存储模块进行写入操作时需要移动的距离相比于对分布较离散的数据进行写入操作时需要移动的距离较短,因此,本公开实施例可以提升第一存储模块向第二存储模块写入数据的速度。
图3为图2所示数据写入方法的一种可选实施方式的流程图。可选的,图2所示方法中的待写入第二存储模块的数据集合可以包括至少一个数据子集,任一数据子集中的第一数据可以属于具有预设长度的地址范围。即,一个数据子集中的第一数据可以属于一个地址范围,不同的数据子集可以对应不同的地址范围。
则在图2所示方法的基础上,如图3所示,在本实施方式中,S201可以具体采用下述的S301-S303实现,S202可以采用下述S304实现。
S301:第一存储模块从磁盘区集合中选择至少两个磁盘区。
其中,至少两个磁盘区中的至少一个磁盘区存储有至少两个第二数据。
S302:第一存储模块在自身的缓存数据集合中选择与至少两个磁盘区对应的缓存数据作为数据集合中的各个数据子集中的第一数据,任一磁盘区对应的缓存数据的目的存储地址归属于磁盘区。
S303:第一存储模块根据多个数据子集,生成数据集合。
S304:第一存储模块分别将数据集合中的数据子集发送给第二存储模块。
在本实施方式中,由于每个数据子集中的第一数据之间的距离较近,使得第二存储模块在写入一个数据集合中的各个第一数据时,可以分别集中写入分布较接近的数据子集中的第一数据,因此,第二存储模块对这种方式生成的数据集合的写入速度比反复跨越地址范围写入数据的写入速度更快。
可选的,至少一个磁盘区为磁盘区集合中活跃度低于第一阈值的磁盘区。或者,至少一个磁盘区为磁盘区集合中活跃度最低的至少一个磁盘区。
需要说明的是,每个磁盘区的活跃度可以根据该磁盘区对应的缓存数据的活跃度得到。例如,该磁盘区对应的三个缓存数据的活跃度分别为a、b和c,则该磁盘区的活跃度S可以为a、b和c的和。
特别要说明的是,随着存储技术的飞速发展,缓存设备的容量大幅度提升,例如,非易失性内存芯片中的非易失性双列直插内存模块(Non-volatile Dual Inline Memory Module,NVDIMM)最高甚至可达256G。当缓存设备的存储容量达到一定程度时,缓存设备达到缓 存更新阈值条件的时间间隔T将比较长,在该较长的时间间隔T内,处理器在过去某一段时间对磁盘设备的访问请求会聚集在磁盘设备的一个或多个磁盘区内,例如,处理器访问一个程序,这个程序所涉及的文件在磁盘设备的存储地址通常位置较近,例如属于一个磁盘区。因此,当缓存设备需要进行缓存更新操作时,从磁盘区集合中选择磁盘区的方式,可以将该磁盘区对应的缓存数据一齐置换出缓存设备,即将一个程序对应的缓存数据置换出缓存设备。这样,缓存设备的数据命中率不会因为被选中的磁盘区对应的缓存数据中包括部分活跃度较高的缓存数据而下降。从而能够在保证缓存设备的数据命中率的基础上提高缓存设备的进行更新操作的速度。
可选的,磁盘区集合中的磁盘区可以按照各自的目的存储地址排序。则操作S303中根据多个数据子集,生成数据集合可以具体包括:按照多个数据子集对应的磁盘区在磁盘区集合中的顺序,生成数据集合,其中,数据集合中的各个数据子集按照目的存储地址排序。
进一步的,各个数据子集中的第一数据也可以按照自身的目的存储地址排序,S303中根据多个数据子集,生成数据集合还可以具体包括:按照多个第一数据在对应的第一数据子集中的顺序,生成数据集合,其中,数据集合中的各个数据子集按照目的存储地址排序,每个数据子集中的缓存数据按照目的存储地址排序。
需要说明的是,采用这种方式,实际上是融合了图1和图2所示的两种方法,即生成的待写入数据集合中第一数据的目的存储地址属于预设的地址范围且数据集合中的第一数据按照目的存储地址排序。因而这种方式能够同时具有图1和图2所示方法所能够带来的技术效果。即,待写入的第一数据的分布比较集中,且能够避免写入操作走弯路,从而使得总的写入路径更短,进而能够大幅提升第二存储模块的写入速度。
本实施方式的其他技术方案细节和技术效果与图2所示方法类似,此处不再赘述。
实施例三
图4为本公开实施例三中数据写入方法的流程示意图,图5为本公开实施例数据写入方法中磁盘区队列的一种可选的实施方式的示意图。本公开实施例的方法提供一种在缓存设备达到更新缓存阈值条件时触发缓存更新操作的实施方式。并且,本公开实施例的方法可以用于获取第一存储模块自身的缓存数据集合中的缓存数据的活跃度,从而能够在触发缓存更新操作时选择活跃度较低的缓存数据作为写入第二存储模块的数据。
本实施例的步骤可以包括:
在图1方法中步骤101(图4中未示出)或者图2方法中S201(图4中未示出)之前执行如下步骤:
S401:第一存储模块接收数据访问请求,该数据访问请求包括待访问的第二数据的目的 存储地址。
其中,数据访问请求可以是处理器发送给第一存储模块的。
S402:第一存储模块判断待访问的第二数据是否已经同步,若待访问的第二数据未被同步,执行S403,若待访问的第二数据已经同步,执行406。
S403:判断第一存储模块是否达到更新缓存条件,若第一存储模块已达到更新缓存条件,执行S404,若第一存储模块未达到更新缓存条件,执行S405。
S404:执行缓存更新操作,执行S405。
其中,若本实施例的步骤在图1步骤101之前执行,则缓存更新操作可以包括:生成待写入第二存储模块的数据集合,并将数据集合中的第一数据按顺序发送给第二存储模块。需要说明的是,生成待写入第二存储模块的数据集合的方法可以采用图1所示方法中任一实施方式。
若本实施例的步骤在S201之前执行,则缓存更新操作可以为:生成待写入第二存储模块的数据集合,并将数据集合发送给第二存储模块。需要说明的是,生成待写入第二存储模块的数据集合的方法可以采用图2至图3所示方法中任一实施方式。
S405:在第一存储模块中同步待访问的第二数据,得到待访问的第二数据对应的缓存数据,并记录待访问的第二数据对应的缓存数据的活跃度,执行S406。
其中,缓存数据的目的存储地址与待访问的第二数据的目的存储地址相同。
S406:更新待访问的第二数据对应的缓存数据的活跃度,执行数据命中后的处理步骤。
可选的,在S401之前,可以包括:
S400:第一存储模块生成磁盘区队列。
其中,磁盘区队列可以采用链表或者数组的形式记录所有磁盘区的属性信息和顺序,每个磁盘区的属性信息可以包括:磁盘区的标识、磁盘区的活跃度、磁盘区中的缓存数据的长度和个数以及该磁盘区对应的缓存数据队列等中至少一项,可参考图5。可选的,该磁盘区队列也可以作为图2所示实施例中的磁盘区集合。
则S405中记录待访问的第二数据对应的缓存数据的活跃度可以具体包括:
将待访问的第二数据对应的缓存数据的标识加入到磁盘区队列中对应的磁盘区的缓存数据队列中。
其中,缓存数据队列可以采用链表或这数组的形式记录该磁盘区的各个第一缓存数据的属性信息和顺序,每个缓存数据的属性信息可以包括:缓存数据的标识、缓存数据的活跃度等中至少一项,可参考图5。
磁盘区采用链表或数组记录磁盘区队列、磁盘区集合以及各个磁盘区对应的缓存数据队 列的信息,能够使用较少的存储空间保存各个磁盘区对应的缓存数据的排序信息以及磁盘区的排序信息。在实现第一存储模块向第二存储模块快速写入数据的基础上,开销极少、且查询缓存数据的速度较快。
本公开实施例的其他技术方案细节和技术效果与图1至图3所示方法类似,此处不再赘述。
图6为本公开实施例一数据写入装置的结构示意图。如图6所示,本实施例的写入装置可以位于第一存储模块,本公开实施例的装置60包括:
第一处理模块601,用于生成待写入第二存储模块的数据集合;数据集合中的第一数据根据自身的目的存储地址排序;
第一发送模块602,用于将数据集合中第一数据按顺序发送给第二存储模块。
其中,第一处理模块601,可以用于从自身的缓存数据集合中选择多个第一数据;还可以用于根据多个第一数据,生成数据集合。
可选的,第一处理模块601,可以具体用于从磁盘区集合中选择至少一个磁盘区,磁盘区存储有至少两个第二数据;以及,可以用于在缓存数据集合中选择与至少一个磁盘区对应的缓存数据作为多个第一数据,缓存数据的目的存储地址归属于至少一个磁盘区。
可选的,第一处理模块601,还可以用于生成磁盘区队列,磁盘区队列中的磁盘区按照各自的目的存储地址排序;每个磁盘区存储有至少两个第二数据;以及用于根据选中的多个第一数据以及对应的磁盘区在磁盘区队列中的顺序,生成数据集合。
本实施例的其他技术方案细节及其技术效果与图1、图4所示实施例类似,此处不再赘述。
图7为本公开实施例二数据写入装置的结构示意图。如图7所示,本实施例的写入装置可以位于第一存储模块,本公开实施例的装置70包括:
第二处理模块701,用于生成待写入第二存储模块的数据集合;数据集合中的第一数据的目的存储地址属于预设长度的地址范围;
第二发送模块702,用于将数据集合发送给第二存储模块。
其中,第二处理模块,可以用于从自身的缓存数据集合中选择多个第一数据;还可以用于根据多个第一数据,生成数据集合。
可选的,第二处理模块701,可以具体用于从磁盘区集合中选择至少一个磁盘区,磁盘区存储有至少两个第二数据;以及,可以用于在缓存数据集合中选择与至少一个磁盘区对应的缓存数据作为多个第一数据,缓存数据的目的存储地址归属于至少一个磁盘区。
可选的,第二处理模块701,还可以用于生成磁盘区队列,磁盘区队列中的磁盘区按照各自的目的存储地址排序;每个磁盘区存储有至少两个第二数据;以及用于根据选中的多个第一数据以及对应的磁盘区在磁盘区队列中的顺序,生成数据集合。
本实施例的其他技术方案细节及其技术效果与图1、图4所示实施例类似,此处不再赘述。
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。
本领域内的技术人员应明白,本公开的实施例可提供为方法、系统、或计算机程序产品。因此,本公开可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本公开是参照根据本公开实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合或/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。
尽管已经参照本公开的特定示例性实施例示出并描述了本公开,但是本领域技术人员应 该理解,在不背离所附权利要求及其等同物限定的本公开的精神和范围的情况下,可以对本公开进行形式和细节上的多种改变。因此,本公开的范围不应该限于上述实施例,而是应该不仅由所附权利要求来进行确定,还由所附权利要求的等同物来进行限定。
以上所述,仅为本公开的较佳实施例而已,并非用于限定本公开的保护范围。

Claims (10)

  1. 一种数据的写入方法,其中包括:
    第一存储模块生成待写入第二存储模块的数据集合,其中,所述数据集合中的第一数据根据自身的目的存储地址排序;以及
    所述第一存储模块将所述数据集合中的第一数据按顺序发送给所述第二存储模块。
  2. 根据权利要求1所述的方法,其中,所述第一存储模块为缓存设备,所述生成待写入第二存储模块的数据集合,包括:
    所述第一存储模块从自身的缓存数据集合中选择多个第一数据;以及
    所述第一存储模块根据所述多个第一数据,生成所述数据集合。
  3. 根据权利要求2所述的方法,其中:
    所述数据集合包括一个或多个数据子集;以及
    所述第一存储模块从自身的缓存数据集合中选择多个第一数据,包括:
    所述第一存储模块从磁盘区集合中选择至少一个磁盘区,其中,所述至少一个磁盘区中的每个存储有至少两个第二数据;以及
    所述第一存储模块在所述缓存数据集合中选择与所述至少一个磁盘区中的各个磁盘区对应的缓存数据作为所述一个或多个数据子集中的第一数据,所述缓存数据的目的存储地址归属于所述至少一个磁盘区;以及
    所述第一存储模块根据所述多个第一数据生成所述数据集合,包括:
    根据选中的各个数据子集的第一数据及自身的目的存储地址在对应的磁盘区中的顺序,生成所述一个或多个数据子集;以及
    根据所述一个或多个数据子集生成所述数据集合。
  4. 根据权利要求3所述的方法,其中,所述至少一个磁盘区为所述磁盘区集合中活跃度低于第一阈值的磁盘区。
  5. 根据权利要求2所述的方法,其中,在所述生成待写入第二存储模块的数据集合之前,所述方法还包括:
    所述第一存储模块生成磁盘区队列,其中,所述磁盘区队列中的磁盘区按照各自的目的存储地址排序,所述至少一个磁盘区中的每个存储有至少两个第二数据;以及
    所述第一存储模块根据所述多个第一数据生成所述数据集合,包括:
    根据选中的多个第一数据以及对应的磁盘区在所述磁盘区队列中的顺序,生成所述数据集合。
  6. 根据权利要求5所述的方法,其中,所述每个磁盘区中的第一数据按照各自的目的存储地址排序。
  7. 根据权利要求2-6中任一项所述的方法,其中,所述生成待写入第二存储模块的数据集合,包括:
    在所述第一存储模块已达到更新缓存条件时,生成待写入第二存储模块的数据集合,其中,所述更新缓存条件为所述缓存数据集合的数据量达到缓存饱和阈值。
  8. 一种数据的写入方法,包括:
    第一存储模块生成待写入第二存储模块的数据集合,其中,所述数据集合中的第一数据的目的存储地址属于预设的地址范围;以及
    所述第一存储模块将所述数据集合发送给第二存储模块。
  9. 一种数据的写入装置,包括:
    处理模块,用于生成待写入第二存储模块的数据集合,其中,所述数据集合中的第一数据根据自身的目的存储地址排序;以及
    发送模块,用于将所述数据集合中的第一数据按顺序发送给第二存储模块。
  10. 一种数据的写入装置,包括:
    处理模块,用于生成待写入第二存储模块的数据集合,其中,所述数据集合的第一数据的目的存储地址属于预设的地址范围;以及
    发送模块,用于将所述数据集合发送给第二存储模块。
PCT/CN2017/106831 2017-03-29 2017-10-19 数据的写入方法及装置 WO2018176804A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/499,162 US11119919B2 (en) 2017-03-29 2017-10-19 Method and apparatus with improved speed in data write-in

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710196462.9 2017-03-29
CN201710196462.9A CN107168892A (zh) 2017-03-29 2017-03-29 一种数据的写入方法及装置

Publications (1)

Publication Number Publication Date
WO2018176804A1 true WO2018176804A1 (zh) 2018-10-04

Family

ID=59848782

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/106831 WO2018176804A1 (zh) 2017-03-29 2017-10-19 数据的写入方法及装置

Country Status (3)

Country Link
US (1) US11119919B2 (zh)
CN (1) CN107168892A (zh)
WO (1) WO2018176804A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111177142A (zh) * 2018-11-13 2020-05-19 深圳市中兴微电子技术有限公司 一种数据转换方法及装置、设备和存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168892A (zh) 2017-03-29 2017-09-15 联想(北京)有限公司 一种数据的写入方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030212855A1 (en) * 2002-05-10 2003-11-13 Hitachi, Ltd. Disk drive system and method for controlling a cache memory
CN1617110A (zh) * 2003-11-12 2005-05-18 华为技术有限公司 磁盘阵列结构中进行回写的方法
CN101727299A (zh) * 2010-02-08 2010-06-09 北京同有飞骥科技有限公司 连续数据存储中面向raid5的写操作优化设计方法
CN102662459A (zh) * 2012-04-22 2012-09-12 复旦大学 利用固态硬盘与机械硬盘混合存储减少服务器能源消耗的方法
CN105573668A (zh) * 2015-12-11 2016-05-11 浪潮(北京)电子信息产业有限公司 一种数据存储方法及装置
CN107168892A (zh) * 2017-03-29 2017-09-15 联想(北京)有限公司 一种数据的写入方法及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4545043A (en) * 1982-05-21 1985-10-01 At&T Bell Laboratories Announcement system message playback arrangement
US7418531B2 (en) * 2005-05-04 2008-08-26 Pillar Data Systems, Inc. Quality of service for data storage volumes
CN102067591B (zh) * 2008-06-26 2014-03-19 松下电器产业株式会社 再现装置、记录装置、再现方法及记录方法
KR20110063615A (ko) * 2008-09-30 2011-06-13 파나소닉 주식회사 3d 영상이 기록된 기록매체, 3d 영상을 재생하는 재생장치 및 시스템 lsi
US9588886B2 (en) * 2013-03-15 2017-03-07 Seagate Technology Llc Staging sorted data in intermediate storage
US9870281B1 (en) * 2015-03-20 2018-01-16 Western Digital Technologies, Inc. Power loss mitigation for data storage device
US10599352B2 (en) * 2015-08-14 2020-03-24 Samsung Electronics Co., Ltd. Online flash resource allocation manager based on a TCO model
US9836369B2 (en) * 2015-10-29 2017-12-05 Netapp, Inc. Storage system to recover and rewrite overwritten data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030212855A1 (en) * 2002-05-10 2003-11-13 Hitachi, Ltd. Disk drive system and method for controlling a cache memory
CN1617110A (zh) * 2003-11-12 2005-05-18 华为技术有限公司 磁盘阵列结构中进行回写的方法
CN101727299A (zh) * 2010-02-08 2010-06-09 北京同有飞骥科技有限公司 连续数据存储中面向raid5的写操作优化设计方法
CN102662459A (zh) * 2012-04-22 2012-09-12 复旦大学 利用固态硬盘与机械硬盘混合存储减少服务器能源消耗的方法
CN105573668A (zh) * 2015-12-11 2016-05-11 浪潮(北京)电子信息产业有限公司 一种数据存储方法及装置
CN107168892A (zh) * 2017-03-29 2017-09-15 联想(北京)有限公司 一种数据的写入方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111177142A (zh) * 2018-11-13 2020-05-19 深圳市中兴微电子技术有限公司 一种数据转换方法及装置、设备和存储介质
CN111177142B (zh) * 2018-11-13 2024-03-01 深圳市中兴微电子技术有限公司 一种数据转换方法及装置、设备和存储介质

Also Published As

Publication number Publication date
US20200327053A1 (en) 2020-10-15
CN107168892A (zh) 2017-09-15
US11119919B2 (en) 2021-09-14

Similar Documents

Publication Publication Date Title
US9128855B1 (en) Flash cache partitioning
US9021189B2 (en) System and method for performing efficient processing of data stored in a storage node
CN104850358B (zh) 一种磁光电混合存储系统及其数据获取和存储方法
US9311252B2 (en) Hierarchical storage for LSM-based NoSQL stores
US8996799B2 (en) Content storage system with modified cache write policies
US8966143B2 (en) Method for controlling storages and storage control apparatus
US20130318196A1 (en) Storage system and storage control method for using storage area based on secondary storage as cache area
WO2012126317A1 (zh) 文件存储方法和装置
KR20100092590A (ko) 고속 저장 장치를 캐쉬로 사용하는 스토리지 시스템
WO2019085769A1 (zh) 一种数据分层存储、分层查询方法及装置
JP2013531296A (ja) ハイブリッド・メモリ・サーバにおけるデータ・アクセス管理
TW201339870A (zh) 檔案系統提示
CN110268391A (zh) 用于缓存数据的系统和方法
JP6402647B2 (ja) データ配置プログラム、データ配置装置およびデータ配置方法
JP2014519650A (ja) ストレージのためのトラックのキャッシュ管理するプログラム、システム、および方法
US20130290343A1 (en) Multiple variable coverage memory for database indexing
US20160055195A1 (en) Method and system for providing concurrent buffer pool and page cache
KR20170002866A (ko) 분산 환경에서 사용자 애플리케이션의 액세스 특성에 따른 적응형 캐시 관리 방법
WO2018176804A1 (zh) 数据的写入方法及装置
CN104158863A (zh) 基于事务级别全程高速缓冲的云存储机制
JP2017027301A (ja) ストレージ制御装置、階層化ストレージ制御プログラム、階層化ストレージ制御方法
WO2019047842A1 (zh) 一种固态硬盘的逻辑分区方法及装置
US20180165018A1 (en) Partial storage of large files in distinct storage systems
US9588898B1 (en) Fullness control for media-based cache operating in a steady state
US20150212949A1 (en) Storage control device and storage control method

Legal Events

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

Ref document number: 17903853

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: 17903853

Country of ref document: EP

Kind code of ref document: A1