WO2017091984A1 - 数据缓存方法、存储控制装置、及存储设备 - Google Patents

数据缓存方法、存储控制装置、及存储设备 Download PDF

Info

Publication number
WO2017091984A1
WO2017091984A1 PCT/CN2015/096176 CN2015096176W WO2017091984A1 WO 2017091984 A1 WO2017091984 A1 WO 2017091984A1 CN 2015096176 W CN2015096176 W CN 2015096176W WO 2017091984 A1 WO2017091984 A1 WO 2017091984A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache
data block
data
stored
determining
Prior art date
Application number
PCT/CN2015/096176
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 CN202010983144.9A priority Critical patent/CN112231242A/zh
Priority to CN202010981446.2A priority patent/CN112214420A/zh
Priority to CN201580054160.7A priority patent/CN107430551B/zh
Priority to PCT/CN2015/096176 priority patent/WO2017091984A1/zh
Publication of WO2017091984A1 publication Critical patent/WO2017091984A1/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

Definitions

  • the present invention relates to the field of data storage technologies, and in particular, to a data caching technology.
  • the application server's access requirements to the storage server are also greatly increased, which requires speeding up the processing of I/O requests to access the storage server to quickly Respond to the user's access needs.
  • the prior art generally adopts a caching method to speed up the processing capability of an I/O request, that is, a cache is set in both an application server and a storage server.
  • the cache of the application server stores the hot data determined by the application server, and the cache of the storage server stores the data read from the hard disk.
  • the application server When the application server receives the I/O request, first accessing the data block in the cache of the application server, if not, transmitting the I/O request to the storage server, and if there is no hit in the storage server , you need to read data from the hard disk.
  • the data cached in the upper cache may be quickly eliminated, so that the data block requested by the I/O request is used by the application server. After the cache is eliminated, it can be hit in the cache of the storage server, so that it can respond quickly to I/O requests.
  • the application provides a data caching method, a storage device, and a data processing system to provide a multi-level caching cooperative operation mechanism.
  • a first aspect of the present invention provides a data caching method, where the method is applied to a storage server, where the storage device includes a first cache, a second cache, and a storage unit, where the A cache provides a data cache for the application server, and the second cache is used to provide a data cache for the storage unit. And acquiring, by the storage server, the first trigger condition, acquiring feature information of the first data block buffered in the first cache, and then determining the first data block according to the feature information of the first data block. Whether it is stored in the second cache; in the case of determining that the first data block is stored in the second cache, adjusting a level of the elimination priority of the first data block in the second cache .
  • the feature information of the first data block is determined by the data content of the first data block.
  • the first triggering condition is: the storage server receives a data write request, and writes the first data block included in the data write request into the first cache, or Cache time of a data block in the first cache exceeds a predetermined time, and in the trigger condition, when determining that the first data block is stored in the second cache, the first data block may be The level of the elimination priority in the second cache is increased.
  • the level of the elimination priority of the same data block in the second cache is preferentially eliminated, thereby reducing the repeatedly stored data blocks in the first cache and the second cache, and increasing the total data cached by the first cache and the second cache. Quantity, saving storage resources.
  • the first triggering condition is: the storage server receives a deletion request for deleting the first data block from the first cache; and in the triggering condition, determining the first data When the block is stored in the second cache, the level of the elimination priority of the first data block in the second cache is lowered.
  • the elimination priority of the data block to be deleted in the second cache is lowered.
  • the data deleted in the first cache can be saved in the second cache for a longer time, and the next time there is an IO request to access the data block,
  • the second cache hits without being fetched from the hard disk, so the response speed of the IO request is increased.
  • the storage device stores an index record of the second cache, where the index record of the second cache includes a data feature identifier of the saved data block in the second cache, where the second cache is saved.
  • the size of the data block is equal to the size of the first data block, and the data feature of the data block saved in each of the second caches identifies data content of the data block saved in each of the second caches Determining; the feature information of the first data block is obtained according to the data content of each first data block; and the index record of the second cache is queried according to the data feature identifier of the first data block to determine each of the Whether the first data block is stored in the second cache.
  • the storage device stores an address table, where the feature identifier and the storage address of the second data block buffered in the second cache are recorded in the address table, and determining that the first data block is stored in After the second cache, the first data block is found in the address table according to the feature identifier of the first data block, and then the first data block is eliminated in the second cache. Level adjustments. By establishing an address table, the location of the first data block in the second cache can be quickly found, thereby adjusting the level of the elimination priority of the first data block in the second cache.
  • the second cache index record records only the data identifier of the data block written to the second cache in the latest time period. This can reduce the space occupied by the second cache index record and reduce the time for table lookup.
  • the storage server detects the second trigger condition, acquiring feature information of the second data block buffered in the second cache, and then determining, according to the feature information of the second data block, Whether the second data block is stored in the first cache; and in the case of determining that the second data block is stored in the first cache, adjusting the second data block in the second cache
  • the level of priority is eliminated.
  • the data situation in the second cache can be monitored, and whether the data cached in the second cache is cached in the first cache is determined to adjust the elimination priority level of the data block buffered in the second cache, thereby controlling the second The order in which the data cached in the cache is eliminated, from The duplicate data cached in the first cache and the second cache is reduced.
  • the second triggering condition is: the buffering time of the second data block in the second cache exceeds a predetermined time; under the trigger condition, determining that the second data block is stored in the When the first cache is described, the second data block is increased from the level of the elimination priority in the second cache.
  • the level of the elimination priority of the data block in the second cache is increased, so that priority is eliminated, thereby reducing
  • the repeatedly stored data blocks in the first cache and the second cache increase the total amount of data buffered by the first cache and the second cache, thereby improving the response speed of the IO request.
  • the second triggering condition is: deleting the second data block in the second cache, where the method further includes:
  • the level of the elimination priority of the second data in the second cache is lowered.
  • the deletion priority of the deleted data block is increased, that is, the data block is not deleted, so that When there is an IO request to access the data block, it can be hit in the second cache, and the response speed of the IO request is increased.
  • the second triggering condition is: writing data that includes the second data block to the second cache; in this condition, determining that the second data block is stored in the first In the case of the cache, the level of the elimination priority of the second data block in the second cache is increased.
  • the level of the elimination priority of the new cache data block is increased, thereby phasing out the new cache to the data block of the second cache as soon as possible. , reduce the duplicate data in the first cache and the second cache, increase the cache data, and improve the IO request hit rate.
  • the storage device stores an index record of the first cache, where the index record of the first cache includes a data feature identifier of at least one data block saved in the first cache, where each data block The size is a predetermined size, and the data feature identifier of each data block is determined by the data content included in each data block; the second data block The feature identifier is obtained according to the data content included in the second data block; when determining whether the second data block is stored in the first cache, the query is performed according to the data feature identifier of each of the second data blocks The first cached index record is determined.
  • the first cache index record records only the data identifier of the data block written in the first cache for a recent period of time. This can reduce the space occupied by the first cache index record and reduce the time for table lookup.
  • a second aspect of the present invention provides a data caching method, which is applied to a storage device, where the storage device includes a first cache, a second cache, and a storage unit, where the first cache provides a data cache for the application server, and the second The cache is configured to provide a data cache for the storage unit, and if the storage server detects the second trigger condition, acquiring feature information of the second data block buffered in the second cache; The feature information determines whether the second data block is stored in the first cache; and in the case of determining that the second data block is stored in the first cache, adjusting the second data block in the first The level of the elimination priority in the second cache.
  • the data situation in the second cache can be monitored, and whether the data cached in the second cache is cached in the first cache is determined to adjust the elimination priority level of the data block buffered in the second cache, thereby controlling the second The order of elimination of the cached data in the cache, thereby reducing duplicate data cached in the first cache and the second cache or delaying the elimination of data not stored in the first cache in the second cache, increasing the response speed of the IO request.
  • the second triggering condition is: a buffering time of the second data block in the second cache exceeds a predetermined time, and determining that the second data block is stored in the first cache And increasing the level of the elimination priority of the second data block in the second cache.
  • the level of the elimination priority of the data block in the second cache is increased, so that priority is eliminated, thereby reducing
  • the repeatedly stored data blocks in the first cache and the second cache increase the total amount of data buffered by the first cache and the second cache, thereby saving storage resources.
  • the second triggering condition is: deleting the second in the second cache And the data storage, if the storage server determines that the second data is not stored in the first cache, lowering a level of the elimination priority of the second data in the second cache.
  • the deletion priority of the deleted data block is increased, that is, the data block is not deleted, so that When there is an IO request to access the data block, it can be hit in the second cache, and the response speed of the IO request is increased.
  • the second triggering condition is: writing data that includes the second data block to the second cache;
  • the level of the elimination priority of the second data block in the second cache is increased.
  • the priority level of the newly cached data block in the second cache is increased, thereby eliminating the new cache as soon as possible.
  • the second cached data block reduces duplicate data in the first cache and the second cache, increases cached data, and saves storage resources.
  • the storage device stores an index record of the first cache, where the index record of the first cache includes a data feature identifier of a data block saved in the first cache, where the first cache is saved.
  • the size of the data block is equal to the size of the second data block, and the data feature of the data block saved in each of the second caches identifies data of the data block saved by each of the second buffers Content determining; querying the index record of the first cache according to the data feature identifier of each second data block to determine whether the second data block is stored in the first cache.
  • the first cache index record records only the data identifier of the data block written in the first cache for a recent period of time. This can reduce the space occupied by the first cache index record and reduce the time for table lookup.
  • a third aspect of the present invention provides a storage control apparatus, configured to control data storage of a storage device, where the storage device includes a first cache, a second cache, and a storage unit, where the first cache provides a data cache for the application server.
  • the second cache is used for the storage order Providing a data cache, the first monitoring unit, the first obtaining unit, the first determining unit, and the first adjusting unit, where the first monitoring unit monitors the first triggering condition, the first acquiring unit acquires Cache feature information of the first data block in the first cache; the first determining unit determines, according to the feature information of the first data block, whether the first data block is stored in the second cache, And determining, by the first determining unit, that the first data block is stored in the second cache, and adjusting a level of the elimination priority of the first data block in the second cache.
  • the level of the elimination priority of the data block buffered by the second cache is adjusted, thereby controlling the elimination sequence of the cached data in the second cache, and improving the IO.
  • the response speed of the request is adjusted.
  • the first triggering condition is: writing, to the first cache, data to be written that includes at least one of the first data blocks according to a first data write request, Or the buffering time of the first data in the first cache exceeds a predetermined time; if it is determined that the first data block is stored in the second cache, the first adjusting unit The level of the elimination priority of the first data block in the second cache is increased.
  • the The level of the elimination priority of the same data block in the second cache is preferentially eliminated, thereby reducing the repeatedly stored data blocks in the first cache and the second cache, and increasing the total data cached by the first cache and the second cache. Amount, thereby increasing the responsiveness of IO requests.
  • the first triggering condition is: receiving a deletion request that deletes the first data block in the first cache;
  • the first adjusting unit sets a phase-out priority of the first data block in the second cache The level is reduced.
  • the storage device stores an index record of the second cache, where the index record of the second cache includes a data feature identifier of at least one second data block saved in the second cache, where The size of the two data blocks is equal to the size of the first data block, and the data feature identifier of each of the second data blocks is determined by the data content included in each of the second data blocks;
  • the first determining unit queries the index record of the second cache according to the data feature identifier of the first data block, and determines whether each of the first data blocks is stored in the second cache. By establishing an index table, it can be quickly determined whether the first data block is stored in the second cache.
  • the storage device stores an address table, where the feature identifier and a storage address of the second data block buffered in the second cache are recorded in the address table. After determining that the first data block is stored in the second cache, the first data block is found in the address table according to a feature identifier of the first data block, and then the first data is further The block is adjusted in the elimination level in the second cache. By establishing an address table, the location of the first data block in the second cache can be quickly found, thereby adjusting the level of the elimination priority of the first data block in the second cache.
  • the second cache index record records only the data identifier of the data block written to the second cache in the latest time period. This can reduce the space occupied by the second cache index record and reduce the time for table lookup.
  • the storage control device further includes a second monitoring unit, a second obtaining unit, a second determining unit, and a second adjusting unit,
  • the second acquiring unit acquires feature information of the second data block buffered in the second cache, where the second monitoring unit detects the second triggering condition; Determining, by the feature information of the second data block, whether the second data block is stored in the first cache, in a case where the second determining unit determines that the second data block is stored in the first cache, The second adjustment unit adjusts the second The level of the prioritization of the data block in the second cache.
  • the priority level of the data block buffered in the second cache is adjusted, thereby controlling the The elimination order of the data cached in the second cache improves the response speed of the IO request.
  • the second trigger condition monitored by the second monitoring unit is: a buffering time of the second data block in the second cache exceeds a predetermined time; determining, by the second determining unit In the case where the second data block is stored in the first cache, the second adjustment unit
  • the second data block is increased from the level of the elimination priority in the second cache.
  • the level of the elimination priority of the data block in the second cache is increased, so that priority is eliminated, thereby reducing
  • the repeatedly stored data blocks in the first cache and the second cache increase the total amount of data buffered by the first cache and the second cache, thereby improving the response speed of the IO request.
  • the second trigger condition monitored by the second monitoring unit is: deleting the second data block in the second cache, when the second determining unit is determining the second In the case where the data is not stored in the first cache, the second adjustment unit reduces the level of the elimination priority of the second data in the second cache.
  • the deletion priority of the deleted data block is increased, that is, the data block is not deleted, so that When there is an IO request to access the data block, it can be hit in the second cache, and the response speed of the IO request is increased.
  • the second trigger condition monitored by the second monitoring unit is: writing data including the second data block to the second cache; determining, by the second determining unit, In a case where the second data block is stored in the first cache, the second adjusting unit increases the level of the elimination priority of the second data block in the second cache.
  • the level of the elimination priority of the newly cached data block is increased, thereby eliminating the new cache as soon as possible.
  • Up to the second cached data block reducing duplicate data in the first cache and the second cache, increasing cached data, and improving IO request hit rate.
  • the storage device stores an index record of the first cache, where the index record of the first cache includes a data feature identifier of a data block saved in the first cache, and each of the first caches
  • the size of the data block saved in is equal to the size of the second data block, and the data feature identifier of each data block is determined by the data content of each data block;
  • the second confirmation unit of the unit queries the index record of the first cache according to the data feature identifier of each second data block, and determines whether the second data block is stored in the first cache.
  • the first cache index record records only the data identifier of the data block written in the first cache for a recent period of time. This can reduce the space occupied by the first cache index record and reduce the time for table lookup.
  • a fourth aspect of the present invention provides a storage control device, configured to control data storage of a storage device, where the storage device includes a first cache, a second cache, and a storage unit, where the first cache provides a data cache for the application server.
  • the second cache is configured to provide a data cache for the storage unit
  • the storage control device includes: a second monitoring unit, a second obtaining unit, a second determining unit, and a second adjusting unit.
  • the second monitoring unit detects the second trigger condition
  • the second acquiring unit acquires feature information of the second data block buffered in the second cache
  • the second determining unit is configured according to Determining, by the feature information of the second data block, whether the second data block is stored in the first cache;
  • the second adjusting unit when the second determining unit determines that the second data block is stored in the first cache, adjust an elimination priority of the second data block in the second cache Level.
  • the data situation in the second cache can be monitored, and whether the data cached in the second cache is cached in the first cache is determined to adjust the elimination priority level of the data block buffered in the second cache, thereby controlling the second
  • the elimination order of the cached data in the cache improves the response speed of the IO request.
  • the second trigger condition monitored by the second monitoring unit is: the buffering time of the second data block in the second cache exceeds a predetermined time;
  • the second adjusting unit removes the second data block from the second cache. The level is improved.
  • the level of the elimination priority of the data block in the second cache is increased, so that priority is eliminated, thereby reducing
  • the repeatedly stored data blocks in the first cache and the second cache increase the total amount of data buffered by the first cache and the second cache, thereby improving the response speed of the IO request.
  • the second trigger condition monitored by the second monitoring unit is: deleting the second data block in the second cache
  • the second adjusting unit sets a phase-out priority of the second data in the second cache The level is reduced.
  • the deletion priority of the deleted data block is increased, that is, the data block is not deleted, so that When there is an IO request to access the data block, it can be hit in the second cache, and the response speed of the IO request is increased.
  • the second trigger condition monitored by the second monitoring unit is: writing data including the second data block to the second cache;
  • the second adjusting unit sets a phase-out priority of the second data block in the second cache The level is improved.
  • the level of the elimination priority of the new cache data block is increased, thereby phasing out the new cache to the data block of the second cache as soon as possible. , reducing duplicate data in the first cache and the second cache, increasing cache data, and saving cache resources.
  • the storage device stores an index record of the first cache, where the index record of the first cache includes a data feature of a data block saved in the first cache.
  • the size of the data block stored in each first cache is equal to the size of the two data blocks, and the data feature identifier of each data block is determined by the data content of each data block;
  • the second confirming unit queries the index record of the first cache according to the data feature identifier of each second data block, and determines whether the second data block is stored in the first cache.
  • the first cache index record records only the data identifier of the data block written in the first cache for a recent period of time. This can reduce the space occupied by the first cache index record and reduce the time for table lookup.
  • a fifth aspect of the present invention provides a storage device, where the storage device includes a processor, a memory, a first cache, a second cache, and a storage unit, where the first cache provides a data cache for the application server, and the second cache Providing a data cache for the storage unit, the memory for storing a computer execution instruction, when the storage device is running, the processor executing the computer-executed instruction stored in the memory to cause the storage device
  • the data caching method provided by the first aspect or the data caching method provided by the second aspect is performed.
  • the embodiment of the present invention sets a first cache on the storage server side to buffer data in the application cache from the application server, and then determines whether the same data in the first cache is stored in the second cache, and according to the judgment As a result, the data elimination priority level in the second cache is adjusted.
  • the data elimination priority level in the second cache is adjusted. In this way, by coordinating the data cached in the first cache and the second cache, reducing duplicate data in the first cache and the second cache, saving cache resources, and temporarily phasing out the second cache is not the same as the data in the first cache.
  • FIG. 1 is a structural diagram of a data processing system in which a storage server in the prior art provides a storage service for an application server.
  • FIG. 2 is a structural diagram of a data processing system in which a storage server provides a storage service for an application server according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for performing data block coordination between a first cache and a second cache under a trigger condition according to an embodiment of the present invention.
  • 4A and 4B are schematic diagrams of index records of the second cache.
  • FIG. 5 is a schematic diagram of data block coordination between a first cache and a second cache in the embodiment shown in FIG. 3.
  • FIG. 6 is a flowchart of a method for performing data block coordination between a first cache and a second cache under another trigger condition according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of data block coordination between a first cache and a second cache in the embodiment shown in FIG. 6.
  • FIG. 8 is a flowchart of a method for performing data block coordination between a first cache and a second cache under another trigger condition according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of data block coordination between a first cache and a second cache in the embodiment shown in FIG. 8.
  • FIG. 10 is a flowchart of a method for performing data block coordination between a first cache and a second cache under another trigger condition according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of data block coordination between a first cache and a second cache in the embodiment shown in FIG. 10.
  • FIG. 12 is a flowchart of a method for performing data block coordination between a first cache and a second cache under another trigger condition according to an embodiment of the present invention.
  • FIG. 13 is a schematic diagram of data block coordination between a first cache and a second cache in the embodiment shown in FIG.
  • FIG. 14 is a flowchart of a method for performing data block coordination between a first cache and a second cache under another trigger condition according to an embodiment of the present invention.
  • FIG. 15 is a schematic diagram of data block coordination between a first cache and a second cache in the embodiment shown in FIG. 14.
  • FIG. 16 is a structural diagram of a storage control apparatus according to an embodiment of the present invention.
  • FIG. 17 is a structural diagram of another storage control apparatus according to an embodiment of the present invention.
  • FIG. 1 an architectural diagram of a data processing system 100 that provides storage services for the application server 120 by the storage server 110 in the prior art.
  • the application server 120 may be a shared server for multiple users to access at the same time, such as a database server, a virtual machine management server, a desktop cloud server, and the like.
  • the storage server 110 provides a data storage service for the application server 120.
  • the application server 120 includes an application processor 121, an application cache 122, an expansion cache 123, and other components.
  • the storage server 110 includes a storage processor 111, a storage cache 112, a storage unit 113, and other components.
  • the application cache 122 provides a data cache for the application server 120, which is generally a cache such as a dynamic random access memory (DRAM). However, since the price of the DRAM is relatively expensive, the general capacity is small.
  • the extended cache 123 is generally a solid state memory (SSD). Since the price of the SSD memory is relatively cheaper than that of the DRAM, but the speed is relatively low, it is generally used as an extended cache of the application cache 122, that is, for storing from the The data that is cached by the application cache 122. Since the capacity of the application cache 122 is relatively small, the data cached to the application cache 122 may be quickly eliminated. Therefore, by expanding the cache 123 to cache the data of the application cache 122, the response speed of the IO request can be increased.
  • SSD solid
  • the storage cache 112 provides a data cache for the storage unit 113, such as a hard disk, and is also generally a DRAM.
  • the data read from the storage unit 113 can be cached, and the data written by the application server 100 to the storage server 110 can also be cached. Because the data cache 112 of the storage server 110 and the application cache 122 of the application server 120 are simultaneously slowed down when the data is cached. The same data is stored, and the storage server 110 cannot perceive the data cached in the application cache 122 of the application server 120, which causes the application cache 122 in the application server 120 and the data cached in the expansion cache 123 and the storage server 110.
  • the storage cache 112 caches the same data.
  • the same data as the eliminated data block buffered in the storage buffer 112 may also be in a position that is quickly eliminated, so that the data that is eliminated in the extended cache 123 is After the storage cache 112 is also quickly eliminated, when an IO requests access to the eliminated data, it needs to be called from the storage unit 113, thereby affecting the response speed of the IO request.
  • the embodiment of the present invention is configured to set the cache of the application server on the side of the storage server, for example, the first cache on the storage server, to cache the data of the application cache of the application server, and then determine the second cache of the storage server. Whether the same data is stored in the first cache, and the elimination priority level of the data in the second cache is adjusted according to different determination results, for example, if it is determined that the cache is cached in the first cache If the data of the cached data is the same, the data in the second cache that is the same as the cached data is preferentially eliminated. If it is determined that the second cache has the same data as the data deleted from the first cache, The same data is stored in the second cache with the same data as the deleted data.
  • the second from the second is not deleted. Cache data to be deleted.
  • the duplicate data in the first cache and the second cache is reduced, and the second cache is not deleted in the same manner as the data cached in the first cache. Deleting data, or the same data as the data to be deleted in the first cache, can increase the response speed of the IO request.
  • FIG. 2 it is an architectural diagram of a data processing system 200 in which the storage server 210 provides services to the application server 220 in the embodiment of the present invention.
  • the application server 220 includes an application processor 221, an application cache 222, and other components, such as a memory, etc., since other components are not involved in the embodiments of the present invention, Not shown in the figure.
  • the storage server 210 includes a storage processor 211, a first cache 212, a second cache 213, a storage unit 214, a memory 215, and other components. Other components are not involved in the embodiments of the present invention and are not shown in the figure.
  • the extended cache 123 in the application server 120 is removed, and the first cache 212 is added to the storage server 210.
  • the application cache 222 is also disposed in the application server in the embodiment of the present invention.
  • the first cache 212 in the storage server 210 is only used in place of the extended cache 123 in FIG. 1, but in other embodiments of the present invention, the application is actually applied.
  • the server may also not include the application cache 222.
  • the first cache 212 of the storage server 210 may completely replace the various caches of the application server, as the above-mentioned extended embodiments are fully understood by those skilled in the art, and the specific implementation manners are not described herein. .
  • the first cache 212 is provided to the application server 220 for the storage server 210 to cache data in the application server 220, for example, to cache data deleted from the application cache 222, in the application cache 222.
  • the application processor 221 of the application server 220 sends a data cache request to the storage server 210, so that the storage server 210 caches the data deleted from the application cache 222 into the first cache 212.
  • the storage processor 211 After the deletion data is cached to the first cache 212, the storage processor 211 returns an address of the data buffered to the first cache 212 to the application processor 221 of the application server 200, The application processor 221 can control the data in the first cache according to the returned data address, and the control can be to read, eliminate, and the like of the data block in the first cache 212.
  • the application processor 221 When the application processor 221 is to retire the data in the first cache 212, the application processor 221 sends a data elimination request to the storage server 210, where the data elimination request includes an address to be phased out. After receiving the phase-out request, the storage server 210 finds the data that needs to be eliminated in the first cache according to the address of the phase-out data included in the phase-out request, and then performs the phase-out.
  • the second cache 213 provides a data cache for the storage unit 214.
  • the storage server 210 may pass the The data cached in the first cache 212 is used to learn the data previously cached to the application cache 222, so that the storage processor 211 can learn the data cached by the first cache 212 and coordinate the first cache 212 and the The data blocks stored in the second cache 213 are described to improve the response speed of the IO request, and the method of coordinating the data in the first cache 212 and the second cache 213 will be described in detail below.
  • the storage processor 211 and the application processor 111 may be a single core or multi-core central processing unit, or a specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
  • the memory 215 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory for storing computer execution instructions 2151. Specifically, the program code may be included in the computer execution instruction 2151.
  • the storage processor 211 runs the computer execution instruction 2151, and the first cache 212 and the second cache 213 described in FIG. 3, FIG. 6, FIG. 8, FIG. 10, FIG. 12 and FIG. The process of the data coordination method.
  • the situation that the cached data in the first cache 212 is detected triggers the coordination of the data cached by the first cache 212 and the second cache 213.
  • the coordination of the data cached by the first cache 212 and the second cache 213 is triggered.
  • only the data coordination method in the first case may be implemented, or the data coordination method in the second case may be implemented, or the data coordination method in the two cases may be simultaneously implemented.
  • the data coordination method of the first cache 212 and the second cache 213 is performed in the first case.
  • the data of the first cache 212 and the second cache 213 are coordinated at the first.
  • the first trigger condition may be: the storage processor 211 receives the data cache request sent by the application server 220, and caches the data included in the data cache request according to the data cache request. Caching to the first cache 212; the storage processor 211 receives a data deletion request sent by the application server 220; the storage processor 211 detects that the cache is in the first cache The time in the data exceeds a threshold.
  • the first trigger condition detected by the storage processor 211 is that the storage processor 211 receives the data cache request sent by the application server 220, and according to the data cache request, When the data included in the data cache request is cached in the first cache 212, a flowchart of a method for data block coordination between the first cache 212 and the second cache 212 is performed.
  • Step S301 the storage processor 211 receives the data cache request sent by the application server 220, and caches the data included in the data cache request to the first cache 212 according to the data cache request, and obtains the location.
  • the acquiring, by the storage processor 211, the feature identifier of the first data includes: obtaining a data feature identifier of the first data block according to the data content included in the first data block.
  • the feature identifier of the first data block is a code that can be uniquely identified according to the data content included in the first data block and that can uniquely identify the first data block.
  • the specific parsing method may be performing a hash operation on the first data block itself, using the calculated hash value as the feature identifier of the first data block, or according to the data block set by the application running by the application server 220.
  • the feature identified by the feature can uniquely identify the first data block data feature identifier, for example, when the application server runs the data block library application, the fifth data block can be passed through the first data block.
  • the relative data block address (RDBA) of the byte uniquely identifies the first data block.
  • Step S302 the storage processor 211 determines, according to the feature identifier of the first data block, whether the first data block is stored in the second cache 213.
  • the second cached index record 2153 is further stored in the memory 215, and the second cached index record 2153 includes a feature identifier of the at least one second data block saved in the second cache, the second The size of the data block is equal to the size of the first data block, and the method for obtaining the feature identifier of the second data block is also consistent with the method for obtaining the feature identifier of the first data block, and details are not described herein again.
  • the second cache index record 2153 may be queried according to the feature identifier of each of the first data blocks to determine whether each of the first data blocks is stored in the second buffer. Save 213.
  • the data block identifier stored in the second cache index record 2153 may be a feature identifier of all the second data blocks buffered by the second cache 213, or may be a feature identifier of a portion of the second data block. Since the number of the second data blocks buffered in the second cache 213 is relatively large, if the data feature identifiers of all the second data blocks in the second cache 213 are recorded in the second cache index record 2153, The storage space is wasted, and the time of the table lookup is increased, thereby affecting the performance. Therefore, the index record 2153 of the second cache in the embodiment only maintains the data cached to the second cache 213 in the preset time period.
  • the data block identifier of the block for example, within 10 minutes, as shown in FIG.
  • the feature identifier of the second data block stored in the index record of the second cache (eg, An, An-1, ... An) -6) arranging the time when the second data block is buffered to the second cache, and the feature identifier of each second data block has a time stamp (eg, 12:01, 12:02, . . . 12) : 10), for recording the time when the second data block corresponding to the feature identifier of the second data block is buffered to the second cache 213, the time period may be 10 minutes, as shown in FIG.
  • the storage The processor 211 acquires the feature identifier (An+1) of the second data block, and adds the acquired data identifier to the header location in the second cache index record 2153, and adds a timestamp (12:00) ) and start timing. As shown in FIG. 4B, if the current time is 12:10, the time of the feature identifier (An-6) of the second data block b in the second cache index record 2153 reaches a preset time period (10 minutes). Then, it is deleted from the second cache index record 2153.
  • the data buffered in the second cache is recorded in the second cache index record, and when the second cache index record 2153 is recorded with the first data block
  • the feature identifies the same feature identifier, it is determined that the first data block is stored in the second cache 213.
  • the second cache index record 2153 may also be a hash table.
  • the key of the hash table is the second data block identifier, and the value is 0 or 1, and 0 indicates that the second data block corresponding to the data feature identifier does not exist.
  • 1 indicates that a data block corresponding to the data feature identifier exists in the index record.
  • Step S303 when it is determined that the first data block is stored in the second cache 213, the storage processor 211 is in the second cache 213 according to the data feature identifier and the address table of the first data block. The first data block is found, and when it is determined that the first data block is not stored in the second cache 213, the process returns to step S301.
  • the feature identifier and the storage address of the second data block buffered in the second cache are recorded in the address table.
  • the storage processor 211 acquires a data feature identifier of the second data block, and establishes a data feature identifier and a storage address of the second data block.
  • the mapping relationship between the forms forms the address table.
  • the storage processor 211 acquires a data block identifier of the second data block, and then identifies a mapping relationship corresponding to the second data block identifier.
  • the address table is deleted from the address table such that the address table is updated as the data block buffered in the second cache 213 changes.
  • Step S304 after the storage processor 211 finds the first data block in the second cache 213, the level of the elimination priority of the first data block in the second cache 213 is increased. It may be raised to the highest level, or may be raised to a preset priority level, and if increased to the highest level, the first data block may be deleted from the second cache 213.
  • the elimination sequence of each second data block is set by eliminating the queue.
  • the elimination queue may be a Least Recently Used (LRU) queue, or may be a frequently used algorithm in the near future. Used, LFU) queue, or other algorithm queue that eliminates data in the cache.
  • LRU Least Recently Used
  • LFU Used, LFU
  • the storage processor 211 determines that the feature identifier of the first data block a is An+1, and then in the The feature identifier An+1 is found in the second cache index record 2153, and the address of the data a corresponding to the feature identifier An+1 is obtained in the address table 2154, and finally the data a is adjusted in the LRU queue.
  • the location is prioritized to be eliminated, and the priority eliminated position may be the tail of the LRU queue or the position close to the tail.
  • the first trigger condition is that the storage processor 211 receives the data deletion request sent by the application server 220
  • the first buffer 212 and the second cache 212 perform data block coordination.
  • Step S601 the storage processor 211 receives the first data block deletion request sent by the application server 220, and finds the content in the first cache according to the address of the first data block included in the deletion request. a first data block, and acquiring a feature identifier of the first data block.
  • Step S602 the storage processor 211 determines, according to the feature identifier of the first data block, whether the first data block is stored in the second cache 213.
  • Step S603 when it is determined that the first data block is stored in the second cache 213, the storage processor 211 is in the second cache 213 according to the feature identifier of the first data block and the address table 2154. The first data block is found, and when it is determined that the first data block is not stored in the second cache 213, no operation is performed, and the data condition in the first cache 212 is continuously detected. .
  • Step S604 after the storage processor 211 finds the first data block in the second cache 213, lowering the level of the elimination priority of the first data block in the second cache, It is reduced to the lowest level, or it can be lowered to the preset priority level.
  • the storage processor 211 determines the first data block constituting the first data (this In the embodiment, the first data includes only one data block identifier An+1 of the first data block, and then the data feature identifier An+1 is found in the second cache index record 2153, and then the address is The address of the data f corresponding to the data feature identifier An+1 is obtained in the table 2154, and finally the position of the data f in the LRU queue is adjusted to the location where the priority is stored, and the priority stored location may be the LRU queue.
  • the head of the team can also be close to the head.
  • the data block is performed between the first cache 212 and the second cache 212.
  • step S801 the storage processor 211 acquires the feature identifier of the first data block when detecting that the first data block buffered in the first cache 212 exceeds a threshold.
  • Step S802 the storage processor 211 determines, according to the feature identifier of the first data block, whether the first data block is stored in the second cache 213.
  • Step S803 when it is determined that the first data block is stored in the second cache 213, the storage processor 211 is in the second cache 213 according to the feature identifier of the first data block and the address table 2154. The first data block is found, and when it is determined that the first data block is not stored in the second cache 213, the process returns to step S301.
  • Step S804 after the storage processor 211 finds the first data block in the second cache 213, the level of the elimination priority of the first data block in the second cache is improved, and It is raised to the highest level, and can also be raised to the preset priority level.
  • the storage processor 211 determines the data feature identifier An of the first data block d, and then in the The data feature identifier An is found in the second cache index record, and the address of the data block d corresponding to the data feature identifier An is obtained in the address table, and finally the position of the data d in the LRU queue is adjusted to be preferentially In the eliminated position, the priority eliminated position may be the tail of the LRU queue or the position close to the tail.
  • the situation in which the cached data in the first cache 212 is detected triggers data coordination between the first cache 212 and the second cache 213.
  • the second case namely, the detection, is described below.
  • the method of measuring the cached data in the second cache 213 triggers a method of coordinating the data of the first cache 212 and the second cache 213.
  • the data coordination between the first cache 212 and the second cache 213 is triggered under a second trigger condition
  • the second trigger condition may be: when the data is cached in the second cache; When the data in the second cache is; or the time in which the data block in the second cache is stored in the second cache exceeds a threshold.
  • FIG. 10 a flowchart of a method for coordinating data of the first cache and the second cache when the second trigger condition is buffered data in the second cache.
  • Step S1001 The storage processor 211 caches data to the second cache according to the data cache request, and the buffered data is divided into at least one second data block of a predetermined size, and then acquires characteristics of the second data block. logo.
  • the manner of obtaining the feature identifier of the second data block is the same as the manner of acquiring the data feature of the first data block, and details are not described herein again.
  • Step S1002 The storage processor 211 determines, according to the feature identifier of the second data, whether the second data is stored in the first cache.
  • the memory 215 further includes an index record 2152 of the first cache, where the first cache index record 2152 includes a data feature identifier of at least one first data block saved in the first cache 212.
  • the size of the first data block is equal to the size of the second data block.
  • the index record 2152 of the first cache may be queried according to the feature identifier of each of the second data blocks to determine whether each of the second data blocks is stored in the first cache 212.
  • the data block identifier stored in the index record of the first cache 212 may be a feature identifier of all the first data blocks buffered by the first cache 212, or may be a feature identifier of a portion of the first data block. Since the number of the first data blocks buffered in the first cache 212 is relatively large, if the data feature identifiers of all the first data blocks in the first cache 212 are stored in the first cache index record, The storage space is wasted, and the time for checking the table is increased, thereby affecting the performance. Therefore, the first cache index record 2153 in the embodiment only maintains the first data cached to the first cache 212 in the preset time period. Block feature identification, such as within 10 minutes.
  • the data buffered in the first cache 212 is recorded in the first cache index record 2152, and the first data is recorded in the first cache index record 2152.
  • the features of the block identify the same feature identifier, it is determined that the first data block is stored in the first cache 212.
  • the first cache index record 2152 may also be a hash table.
  • the key of the hash table is the first data block identifier, and the value is 0 or 1, and 0 indicates a data feature identifier.
  • the first data block corresponding to the identifier does not exist in the first cache 212, and 1 indicates that the data block corresponding to the data feature identifier exists in the index record.
  • the value is set to 1, and when the first data block corresponding to the feature identifier is deleted from the first cache, Setting the value of the feature identifier corresponding to the deleted data block to 0.
  • Step S1003 When the storage processor 211 determines that the second data is stored in the first cache 212 according to the feature identifier of the second data, the second data is in the second cache 213. The level of the elimination priority is increased, and the improvement may be to the highest level or a preset priority level. When the storage processor 211 determines that the second data is not stored in the first cache 212, the priority level of the second data is not adjusted.
  • the feature identifier of the second data block a1 buffered to the second cache 213 is Bn+1, the first cache index record 2152 is queried, and the first cache index record 2152 is found in the first cache index record 2152.
  • the feature identifier of the data block a1 indicates that the second data a1 is stored in the first cache 212, and the second data block a1 may be adjusted to the tail position of the LRU queue, or may be adjusted to Close to the position of the tail.
  • FIG. 12 a flowchart of a method for coordinating data of the first cache 212 and the second cache 213 when the storage processor 211 deletes data from the second cache 213.
  • step S1201 the storage processor 211 determines the feature identifier of the second data block after determining the second data block to be deleted from the second cache 213.
  • Step S1202 The storage processor 211 determines, according to the feature identifier of the second data, whether the second data block is stored in the first cache 212.
  • Step S1203 When the storage processor 211 determines that the second data is stored in the first cache 212, deleting the second data block.
  • Step S1204 when the storage processor 211 determines that the second data is not stored in In the first cache 212, the level of the elimination priority of the second data in the second cache 213 is increased, and the improvement may be increased to the highest level or may be a preset priority. Level level. However, when the data block to be deleted is selected as the data block to be deleted again, the second data block to be deleted is directly deleted.
  • the second data block f1 is the determined data block to be deleted from the second cache, and the acquired feature identifier of the second data block f1 is Bn-3, and the feature identifier is Bn-3 is not recorded in the first cache index record, indicating that the second data block may not be stored in the first cache, then adjusting the second data block f1 to the second cache
  • FIG. 14 a flowchart of a method for coordinating data of the first cache and the second cache when a time in which the second data block in the second cache is stored in the second cache exceeds a threshold.
  • Step S1401 When it is determined that the time that the second data block in the second cache is stored in the second cache exceeds a threshold, acquiring the feature identifier of the second data block.
  • Step S1402 The storage processor 211 determines, according to the feature identifier of the second data, whether the second data is stored in the first cache.
  • Step S1403 When the storage processor 211 determines that the second data is stored in the first cache 212, the level of the elimination priority of the second data in the second cache 213 is increased.
  • Step S1404 when the storage processor 211 determines that the second data is not stored in the first cache 212, lowering the level of the elimination priority of the second data in the second cache 213 .
  • the second data block c1 is adjusted to the tail of the LRU queue, or near the end of the queue s position.
  • the second data block d1 is adjusted to the head of the LRU queue, or to the position near the head of the queue.
  • the application server may be application software in an electronic device, the application cache provides a data cache for the application software, and the storage server is a storage device of the electronic device, and the application is The software provides storage services.
  • FIG. 16 is a structural diagram of a storage control apparatus according to an embodiment of the present invention.
  • the storage control device includes a first monitoring unit 1601, a first obtaining unit 1602, a first determining unit 1603, and a first adjusting unit 1604.
  • the first monitoring unit 1601 is configured to detect the cached data in the first cache 212 to trigger data coordination between the first cache 212 and the second cache 213. There are three triggering conditions for the data of the first cache 212 and the second cache 213 to be coordinated, and the first monitoring unit 1601 receives the data cache request sent by the application server 220, and caches according to the data. Requesting to cache the first data included in the data cache request to the first cache 212; the first monitoring unit 1601 receives a data deletion request sent by the application server 220; the first monitoring unit 1601 detects The time to buffer the data in the first cache exceeds a preset threshold.
  • the acquiring unit 1602 acquires the feature identifier of the first data block that constitutes the first data, and the manner of obtaining the feature identifier of the first data block has been previously described, and details are not described herein again.
  • the determining unit 1603 determines, according to the feature identifier of the first data, whether the first data is stored in the second cache. That is, the determining unit 1603 queries the index record of the second cache according to the data feature identifier of each of the first data blocks to determine whether each of the first data blocks is stored in the second cache 213. When there is a second data block index record in the index record of the second cache that is the same as the data feature identifier of the first data block, it is determined that the first data block is stored in the second cache 213.
  • the adjusting unit 1604 is in the second cache 213 according to the feature identifier and the address table of the first data block. Finding the first data block, and then the first data The level of the elimination priority of the block in the second cache is lowered, and may be lowered to the lowest level or lowered to a preset priority level.
  • the feature identifier of the first data block is acquired.
  • the determining unit 1603 determines, according to the feature identifier of the first data, whether the first data is stored in the second cache.
  • the adjusting unit 1604 finds the first data block in the second cache 213 according to the feature identifier and the address table of the first data block, and eliminates the first data block in the second cache.
  • the level of priority is increased, either to the highest level or to the priority level set to the preset.
  • the storage control device further includes a second monitoring unit 1605, a second obtaining unit 1606, a second determining unit 1607, and a second adjusting unit 1608.
  • the second monitoring unit 1605 is configured to detect the data condition of the second cache to trigger coordination of the data cached by the first cache and the second cache. There are three triggering conditions for the data of the first cache 212 and the second cache 213 to be coordinated, when the data is cached in the second cache, when the data in the second cache is deleted, or in the second cache. The data block is stored in the second cache for a time exceeding a threshold.
  • the second monitoring unit 1605 After the second monitoring unit 1605 detects that the data is buffered to the second cache, and the buffered data is divided into at least one second data block of a predetermined size, the feature identifier of the second data block is acquired.
  • the second determining unit 1603 is configured to determine, according to the feature identifier of the second data, whether the second data is stored in the first cache.
  • the determining unit 1602 queries the index record of the first cache according to the feature identifier of the second data block to determine whether each of the second data blocks is stored in the first cache 212.
  • the adjusting unit 1604 is configured to: prioritize the second data in the second cache 213
  • the level of the improvement may be increased to the highest level or may be a preset priority level.
  • the storage processor 211 determines the second data When not stored in the first cache 212, the priority level of the second data is not adjusted.
  • the second monitoring unit 1605 After the second monitoring unit 1605 reaches the second data block to be deleted from the second cache 213, the feature identifier of the second data block is acquired.
  • the second determining unit 1605 determines, according to the feature identifier of the second data, whether the second data is stored in the first cache.
  • the second adjusting unit 1605 When the second determining unit 1605 determines that the second data is stored in the first cache, the second adjusting unit deletes the second data block, and when the second determining unit 1605 determines the first When the second data is not stored in the first cache, the second adjusting unit increases the level of the elimination priority of the second data in the second cache 213.
  • the second acquiring unit 1606 acquires the feature identifier of the second data block.
  • the second determining unit 1607 determines, according to the feature identifier of the second data, whether the second data is stored in the first cache.
  • the adjusting unit 1608 deletes the second data block.
  • the adjusting unit sets the second data to the level of the elimination priority in the second cache 213. improve.
  • the second monitoring unit 1605 detects that the second data block in the second cache is stored in the second cache by a threshold
  • the second acquiring unit 1606 acquires the second data block. Feature identification.
  • the second determining unit 1606 determines, according to the feature identifier of the second data, whether the second data is stored in the first cache.
  • the adjusting unit 1608 sets the second data to the level of the elimination priority in the second cache 213. improve.
  • the adjusting unit 1608 prioritizes the second data in the second cache 213 The level is reduced.
  • the embodiment of the present invention further provides a computer readable medium, comprising computer execution instructions, when the processor of the computer executes the computer execution instruction, the computer executes FIG. 3, FIG. 6, FIG. 8, FIG. 10, FIG. And the method flow described in FIG.
  • the first and second in the second data block are only used to distinguish the data blocks respectively stored in the first cache and the second cache, and the first and the second do not include different levels.
  • the meaning of the order is different, and the meaning of the quantity is not included.
  • the first data block and the second data block may both be one data block, and may also refer to multiple data blocks.
  • the first and second of the first trigger condition and the second trigger condition in the embodiment of the present invention are only used to distinguish whether the data in the first cache or the data in the second cache is used for distinguishing detection, and the first and second There is no meaning of different levels and different order, and there is no meaning of quantity.
  • the program may be stored in a computer readable storage medium, and the storage medium may include: ROM, RAM, disk or CD.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

一种应用于存储设备的数据的缓存方法、存储设备的控制装置及存储设备。所述存储设备包括第一缓存(212)和第二缓存(213)。在所述存储设备监测到所述第一缓存(212)中缓存了第一数据块(S301)、待删除第一数据块(S601)、或者第一数据块在第一缓存(212)中缓存的时间超过了阈值时(S801),获取所述第一数据块的特征信息,然后根据所述第一数据块的特征信息确定所述第一数据块是否存储在所述第二缓存(213)中,在确定所述第一数据块存储在所述第二缓存(213)中(S303,S603,S803)的情况下,调整所述第一数据块在所述第二缓存(213)中的淘汰优先级的级别(S304,S604,S804)。通过对存储设备中的第一缓存(212)及第二缓存(213)中的数据协调,提高了IO请求的响应速度。

Description

数据缓存方法、存储控制装置、及存储设备 技术领域
本发明涉及数据存储技术领域,特别涉及数据缓存技术。
背景技术
随着大数据、移动互联、和云服务等技术和应用的快速发展,应用服务器对存储服务器的访问需求也大大增加,这就需要加快对访问存储服务器的I/O请求的处理能力,以快速响应用户的访问需求。
现有技术一般是采用缓存的方法来加快I/O请求的处理能力,即在应用服务器和存储服务器中都设置缓存。应用服务器的缓存存储应用服务器决定的热数据,存储服务器的缓存存储从硬盘中读取的数据。
在应用服务器接收到I/O请求时,首先在应用服务器的缓存中访问数据块,若未命中,则将所述I/O请求传输至所述存储服务器,若在所述存储服务器也没有命中,则需要从硬盘中读取数据。
由于应用服务器的缓存的存储空间比存储服务器的缓存的存储空间小,所以缓存在上级缓存中的数据可能很快就会被淘汰掉,这样,在I/O请求所请求的数据块被应用服务器的缓存淘汰掉后,可在存储服务器的缓存中命中,从而可以快速响应I/O请求。
然而,应用服务器中的缓存和存储服务器的缓存之间缺乏协同操作的机制,可能会经常出现相同的数据在两个缓存都分别缓存而造成的存储资源浪费的问题,也有可能经常出现某热数据在两个缓存都没有缓存而需要到硬盘读取该数据而造成的数据读取速度延迟的问题。
发明内容
本申请提供数据缓存方法、存储设备、及数据处理系统,以提供多级缓存的协同操作机制。
本发明第一方面提供一种数据的缓存方法,所述方法应用于存储服务器,所述存储设备包括第一缓存、第二缓存和存储单元,所述第 一缓存为应用服务器提供数据缓存,所述第二缓存用于为所述存储单元提供数据缓存。在所述存储服务器监测到第一触发条件的情况下,获取缓存在所述第一缓存中第一数据块的特征信息,然后根据所述第一数据块的特征信息确定所述第一数据块是否存储在所述第二缓存中;在确定所述第一数据块存储在所述第二缓存中的情况下,调整所述第一数据块在所述第二缓存中的淘汰优先级的级别。所述第一数据块的特征信息由所述第一数据块的数据内容决定。
根据一级缓存和二级缓存所缓存数据的情况,调整对所述第二缓存所缓存的数据块的淘汰优先级的级别,从而控制第二缓存中所缓存数据的淘汰顺序,减少第一缓存和第二缓存中所缓存的重复数据,或者延长热数据的在二级缓存中的缓存时间,提高IO请求的响应速度
可选地,所述第一触发条件为:所述存储服务器接收到数据写请求,且将所述数据写请求中包括的第一数据块写入所述第一缓存中,或者,所述第一数据块在所述第一缓存中的缓存时间超过预定时间,在这种触发条件下,在确定所述第一数据块存储在所述第二缓存中时,可以将所述第一数据块在所述第二缓存中的淘汰优先级的级别提高。
这样,在确定所述第二缓存中存在新写入所述第一缓存中的数据块相同的数据块,或者存在与所述第一缓存中的热数据相同的数据块时,则提高所述第二缓存中的相同数据块的淘汰优先级的级别,使其优先淘汰,从而减少第一缓存和第二缓存中重复存储的数据块,增加了第一缓存和第二缓存所缓存数据的总量,节省存储资源。
可选地,所述第一触发条件为:所述存储服务器接收到从所述第一缓存中删除所述第一数据块的删除请求;在这种触发条件下,在确定所述第一数据块存储在所述第二缓存中时,将所述第一数据块在所述第二缓存中的淘汰优先级的级别降低。
这样,当从所述第一缓存中删除数据块时,若所要删除的数据块也存储在所述第二缓存中,则将若所要删除的数据块在第二缓存中的淘汰优先级降低,这样,可以使在第一缓存中删除的数据在第二缓存中保存的时间更长一些,当下次有IO请求访问所述数据块时,可以在 第二缓存中命中,而不需要从硬盘中获取,所以提高IO请求的响应速度。
可选地,所述存储设备保存有所述第二缓存的索引记录,所述第二缓存的索引记录包括所述第二缓存中保存数据块的数据特征标识,所述第二缓存中保存的数据块的大小等于所述第一数据块的大小,所述每个所述第二缓存中保存的数据块的数据特征标识由所述每个所述第二缓存中保存的数据块的数据内容决定;所述第一数据块的特征信息为根据每个第一数据块的数据内容获得;根据所述第一数据块的数据特征标识查询所述第二缓存的索引记录来确定所述每个第一数据块是否存储在所述第二缓存中。
通过建立索引表的方式,可以快速的确定所述第一数据块是否存储在所述第二缓存中。
可选地,所述存储设备保存有地址表,所述地址表中记录了缓存在所述第二缓存中的第二数据块的特征标识及存储地址,在确定所述第一数据块存储在所述第二缓存中后,根据所述第一数据块的特征标识在所述地址表中找到所述第一数据块,然后再对所述第一数据块在所述第二缓存中的淘汰级别进行调整。通过建立地址表,可以快速的找到所述第一数据块在所述第二缓存中的位置,从而对所述第一数据块在所述第二缓存中的淘汰优先级的级别进行调整。
可选地,所述第二缓存索引记录只记录最近一段时间写入所述第二缓存的数据块的数据标识。这样可以减少第二缓存索引记录所占用的空间,减少查表的时间。
可选地,在所述存储服务器监测到第二触发条件的情况下,获取缓存在所述第二缓存中的第二数据块的特征信息,然后根据所述第二数据块的特征信息确定所述第二数据块是否存储在所述第一缓存中;在确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据块在所述第二缓存中的淘汰优先级的级别。
这样,可以监测第二缓存中的数据情况,通过判断缓存在第二缓存中数据是否缓存在第一缓存中,来调整缓存在第二缓存中的数据块的淘汰优先级级别,从而控制第二缓存中所缓存数据的淘汰顺序,从 而减少第一缓存及第二缓存中所缓存的重复数据。
可选地,所述第二触发条件为:所述第二数据块在所述第二缓存中的缓存时间超过预定时间;在这种触发条件下,在确定所述第二数据块存储在所述第一缓存中时,将所述第二数据块从所述第二缓存中的淘汰优先级的级别提高。
这样,在确定所述第一缓存中存在与所述第二缓存中的数据相同的数据块时,则提高所述第二缓存中数据块的淘汰优先级的级别,使其优先淘汰,从而减少第一缓存和第二缓存中重复存储的数据块,增加了第一缓存和第二缓存所缓存数据的总量,从而提高IO请求的响应速度。
可选地,所述第二触发条件为:删除所述第二缓存中的所述第二数据块,则所述方法还包括:
在确定所述第二数据未存储在所述第一缓存中的情况下,将所述第二数据在所述第二缓存中的淘汰优先级的级别降低。
这样,在删除第二缓存中的数据块时,若所删除的数据块没有存储在所述第一缓存中,则提高所删除的数据块的淘汰优先级,即不删除所述数据块,这样,当有IO请求访问所述数据块时,可在第二缓存中命中,则提高的IO请求的响应速度。
可选地,所述第二触发条件为:将包含所述第二数据块的数据写入所述第二缓存;在这种条件下,在确定所述第二数据块存储在所述第一缓存中的情况下,将所述第二数据块在所述第二缓存中的淘汰优先级的级别提高。
这样,如果新缓存至所述第二缓存的数据块,也存储在第一缓存中,则提高新缓存数据块的淘汰优先级的级别,从而尽快淘汰新缓存至所述第二缓存的数据块,减少第一缓存和第二缓存中的重复数据,增加缓存数据,提高IO请求命中率。
可选地,所述存储设备保存有所述第一缓存的索引记录,所述第一缓存的索引记录包括所述第一缓存中保存的至少一个数据块的数据特征标识,每个数据块的大小为预定大小,所述每个数据块的数据特征标识由所述每个数据块包含的数据内容决定;所述第二数据块的 特征标识是根据第二数据块包含的数据内容获得的;在确定所述第二数据块是否存储在所述第一缓存中时,是根据所述每个第二数据块的数据特征标识查询所述第一缓存的索引记录来确定。
这样,通过设置所述第一缓存索引记录,可以在所述第一缓存中快速的找到与所述第二缓存中的数据相同的数据。
可选地,所述第一缓存索引记录只记录最近一段时间写入所述第一缓存的数据块的数据标识。这样可以减少第一缓存索引记录所占用的空间,减少查表的时间。
本发明第二方面提供一种数据的缓存方法,应用于存储设备,所述存储设备包括第一缓存、第二缓存和存储单元,所述第一缓存为应用服务器提供数据缓存,所述第二缓存用于为所述存储单元提供数据缓存,在存储服务器监测到第二触发条件的情况下,获取缓存在所述第二缓存中的第二数据块的特征信息;根据所述第二数据的特征信息确定所述第二数据块是否存储在所述第一缓存中;在确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据块在所述第二缓存中的淘汰优先级的级别。
这样,可以监测第二缓存中的数据情况,通过判断缓存在第二缓存中数据是否缓存在第一缓存中,来调整缓存在第二缓存中的数据块的淘汰优先级级别,从而控制第二缓存中所缓存数据的淘汰顺序,从而减少第一缓存及第二缓存中所缓存的重复数据或者延迟淘汰第二缓存中没有存储在所述第一缓存中的数据,增加IO请求的响应速度。
可选地,所述第二触发条件为:所述第二数据块在所述第二缓存中的缓存时间超过预定时间,在确定所述第二数据块存储在所述第一缓存中的情况下,将所述第二数据块在所述第二缓存中的淘汰优先级的级别提高。
这样,在确定所述第一缓存中存在与所述第二缓存中的数据相同的数据块时,则提高所述第二缓存中数据块的淘汰优先级的级别,使其优先淘汰,从而减少第一缓存和第二缓存中重复存储的数据块,增加了第一缓存和第二缓存所缓存数据的总量,节省存储资源。
可选地,所述第二触发条件为:删除所述第二缓存中的所述第二 数据块,则所述存储服务器在确定所述第二数据未存储在所述第一缓存中的情况下,将所述第二数据在所述第二缓存中的淘汰优先级的级别降低。
这样,在删除第二缓存中的数据块时,若所删除的数据块没有存储在所述第一缓存中,则提高所删除的数据块的淘汰优先级,即不删除所述数据块,这样,当有IO请求访问所述数据块时,可在第二缓存中命中,则提高的IO请求的响应速度。
可选地,若所述第二触发条件为:将包含所述第二数据块的数据写入所述第二缓存;
在确定所述第二数据块存储在所述第一缓存中的情况下,将所述第二数据块在所述第二缓存中的淘汰优先级的级别提高。
这样,如果新缓存至所述第二缓存的数据块,也存储在第一缓存中,则提高新缓存数据块的在所述第二缓存中淘汰优先级的级别,从而尽快淘汰新缓存至所述第二缓存的数据块,减少第一缓存和第二缓存中的重复数据,增加缓存数据,节省存储资源。
可选地,所述存储设备保存有所述第一缓存的索引记录,所述第一缓存的索引记录包括所述第一缓存中保存的数据块的数据特征标识,所述第一缓存中保存的数据块的大小等于所述第二数据块的大小,所述每个所述第二缓存中保存的数据块的数据特征标识由所述每个所述第二缓存中保存的数据块的数据内容决定;根据所述每个第二数据块的数据特征标识查询所述第一缓存的索引记录来确定所述第二数据块是否存储在所述第一缓存中。
这样,通过设置所述第一缓存索引记录,可以在所述第一缓存中快速的找到与所述第二缓存中的数据相同的数据。
可选地,所述第一缓存索引记录只记录最近一段时间写入所述第一缓存的数据块的数据标识。这样可以减少第一缓存索引记录所占用的空间,减少查表的时间。
本发明第三方面提供一种存储控制装置,用于控制存储设备的数据存储,所述存储设备包括第一缓存、第二缓存和存储单元,所述第一缓存为应用服务器提供数据缓存,所述第二缓存用于为所述存储单 元提供数据缓存,第一监测单元、第一获取单元、第一确定单元、第一调整单元,在所述第一监测单元监测所述第一触发条件的情况下,所述第一获取单元获取缓存在所述第一缓存中第一数据块的特征信息;所述第一确定单元根据所述第一数据块的特征信息确定所述第一数据块是否存储在所述第二缓存中,在所述第一确定单元确定所述第一数据块存储在所述第二缓存中的情况下,调整所述第一数据块在所述第二缓存中的淘汰优先级的级别。
这样,根据一级缓存和二级缓存所缓存数据的情况,调整对所述第二缓存所缓存的数据块的淘汰优先级的级别,从而控制第二缓存中所缓存数据的淘汰顺序,提高IO请求的响应速度。
在第三方面的第一种实现方式中,所述第一触发条件为:根据第一数据写请求将包括至少一个所述第一数据块的待写入数据写入所述第一缓存中,或者,所述第一数据在所述第一缓存中的缓存时间超过预定时间;在确定所述第一数据块存储在所述第二缓存中的情况下,所述第一调整单元将所述第一数据块在所述第二缓存中的淘汰优先级的级别提高。
这样,在确定所述第二缓存中存在新写入所述第一缓存中的数据块相同的数据块,或者存在与所述第一缓存中的热数据相同的数据块时,则提高所述第二缓存中的相同数据块的淘汰优先级的级别,使其优先淘汰,从而减少第一缓存和第二缓存中重复存储的数据块,增加了第一缓存和第二缓存所缓存数据的总量,从而提高IO请求的响应速度。
可选地,所述第一触发条件为:接收到在所述第一缓存中删除所述第一数据块的删除请求;
在所述第一确定单元确定所述第一数据块存储在所述第二缓存中的情况下,所述第一调整单元将所述第一数据块在所述第二缓存中的淘汰优先级的级别降低。
这样,当从所述第一缓存中删除数据块时,若所要删除的数据块也存储在所述第二缓存中,则将若所要删除的数据块在第二缓存中的淘汰优先级降低,这样,可以使在第一缓存中删除的数据在第二缓存 中保存的时间更长一些,当下次有IO请求访问所述数据块时,可以在第二缓存中命中,而不需要从硬盘中获取,所以提高了IO请求的响应速度。
可选地,所述存储设备保存有所述第二缓存的索引记录,所述第二缓存的索引记录包括所述第二缓存中保存的至少一个第二数据块的数据特征标识,所述第二数据块的大小等于所述第一数据块的大小,所述每个第二数据块的数据特征标识由所述每个第二数据块包含的数据内容决定;
所述第一确定单元根据所述第一数据块的数据特征标识查询所述第二缓存的索引记录,确定所述每个第一数据块是否存储在所述第二缓存中。通过建立索引表的方式,可以快速的确定所述第一数据块是否存储在所述第二缓存中。
在所述第三方面的第四种实现方式中,所述存储设备保存有地址表,所述地址表中记录了缓存在所述第二缓存中的第二数据块的特征标识及存储地址,在确定所述第一数据块存储在所述第二缓存中后,根据所述第一数据块的特征标识在所述地址表中找到所述第一数据块,然后再对所述第一数据块在所述第二缓存中的淘汰级别进行调整。通过建立地址表,可以快速的找到所述第一数据块在所述第二缓存中的位置,从而对所述第一数据块在所述第二缓存中的淘汰优先级的级别进行调整。
可选地,所述第二缓存索引记录只记录最近一段时间写入所述第二缓存的数据块的数据标识。这样可以减少第二缓存索引记录所占用的空间,减少查表的时间。
可选地,所述存储控制装置还包括第二监测单元、第二获取单元、第二确定单元及第二调整单元,
在所述第二监测单元监测到所述第二触发条件的情况下,所述第二获取单元获取缓存在所述第二缓存中第二数据块的特征信息;所述第二确定单元根据所述第二数据块的特征信息确定所述第二数据块是否存储在所述第一缓存中在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,所述第二调整单元调整所述第二 数据块在所述第二缓存中的淘汰优先级的级别。
这样,可以通过监测第二缓存中的数据情况,通过判断缓存在第二缓存中数据是否缓存在第一缓存中,来调整缓存在第二缓存中的数据块的淘汰优先级级别,从而控制第二缓存中所缓存数据的淘汰顺序,提高IO请求的响应速度。
可选地,所述第二监测单元所监测到的所述第二触发条件为:所述第二数据块在所述第二缓存中的缓存时间超过预定时间;在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,所述第二调整单元
将所述第二数据块从所述第二缓存中的淘汰优先级的级别提高。
这样,在确定所述第一缓存中存在与所述第二缓存中的数据相同的数据块时,则提高所述第二缓存中数据块的淘汰优先级的级别,使其优先淘汰,从而减少第一缓存和第二缓存中重复存储的数据块,增加了第一缓存和第二缓存所缓存数据的总量,从而提高IO请求的响应速度。
可选地,所述第二监测单元所监测到的所述第二触发条件为:删除所述第二缓存中的所述第二数据块,当所述第二确定单元在确定所述第二数据未存储在所述第一缓存中的情况下,所述第二调整单元将所述第二数据在所述第二缓存中的淘汰优先级的级别降低。
这样,在删除第二缓存中的数据块时,若所删除的数据块没有存储在所述第一缓存中,则提高所删除的数据块的淘汰优先级,即不删除所述数据块,这样,当有IO请求访问所述数据块时,可在第二缓存中命中,则提高的IO请求的响应速度。
可选地,所述第二监测单元所监测到的所述第二触发条件为:将包含所述第二数据块的数据写入所述第二缓存;在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,所述第二调整单元将所述第二数据块在所述第二缓存中的淘汰优先级的级别提高。
这样,如果新缓存至所述第二缓存的数据块,也存储在第一缓存中,则提高新缓存数据块的淘汰优先级的级别,从而尽快淘汰新缓存 至所述第二缓存的数据块,减少第一缓存和第二缓存中的重复数据,增加缓存数据,提高IO请求命中率。
可选地,所述存储设备保存有所述第一缓存的索引记录,所述第一缓存的索引记录包括所述第一缓存中保存的数据块的数据特征标识,每个所述第一缓存中保存的数据块的大小等于所述第二数据块的大小,所述每个数据块的数据特征标识由所述每个数据块的数据内容决定;
单元所述第二确认单元根据所述每个第二数据块的数据特征标识查询所述第一缓存的索引记录,确定所述第二数据块是否存储在所述第一缓存中。
这样,通过设置所述第一缓存索引记录,可以在所述第一缓存中快速的找到与所述第二缓存中的数据相同的数据。
可选地,所述第一缓存索引记录只记录最近一段时间写入所述第一缓存的数据块的数据标识。这样可以减少第一缓存索引记录所占用的空间,减少查表的时间。
本发明第四方面提供一种存储控制装置,用于控制存储设备的数据存储,所述存储设备包括第一缓存、第二缓存和存储单元,所述第一缓存为应用服务器提供数据缓存,所述第二缓存用于为所述存储单元提供数据缓存,所述存储控制装置包括:第二监测单元、第二获取单元,第二确定单元及第二调整单元。在所述第二监测单元监测到所述第二触发条件的情况下,所述第二获取单元获取缓存在所述第二缓存中的第二数据块的特征信息;所述第二确定单元根据所述第二数据块的特征信息确定所述第二数据块是否存储在所述第一缓存中;
所述第二调整单元在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据块在所述第二缓存中的淘汰优先级的级别。
这样,可以监测第二缓存中的数据情况,通过判断缓存在第二缓存中数据是否缓存在第一缓存中,来调整缓存在第二缓存中的数据块的淘汰优先级级别,从而控制第二缓存中所缓存数据的淘汰顺序,提高IO请求的响应速度。
可选地,所述第二监测单元所监测到的所述第二触发条件为:所述第二数据块在所述第二缓存中的缓存时间超过预定时间;
在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,所述第二调整单元将所述第二数据块从所述第二缓存中的淘汰优先级的级别提高。
这样,在确定所述第一缓存中存在与所述第二缓存中的数据相同的数据块时,则提高所述第二缓存中数据块的淘汰优先级的级别,使其优先淘汰,从而减少第一缓存和第二缓存中重复存储的数据块,增加了第一缓存和第二缓存所缓存数据的总量,从而提高IO请求的响应速度。
可选地,所述第二监测单元所监测到的所述第二触发条件为:删除所述第二缓存中的所述第二数据块,
当所述第二确定单元在确定所述第二数据未存储在所述第一缓存中的情况下,所述第二调整单元将所述第二数据在所述第二缓存中的淘汰优先级的级别降低。
这样,在删除第二缓存中的数据块时,若所删除的数据块没有存储在所述第一缓存中,则提高所删除的数据块的淘汰优先级,即不删除所述数据块,这样,当有IO请求访问所述数据块时,可在第二缓存中命中,则提高的IO请求的响应速度。
可选地,所述第二监测单元所监测到的所述第二触发条件为:将包含所述第二数据块的数据写入所述第二缓存;
在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,所述第二调整单元将所述第二数据块在所述第二缓存中的淘汰优先级的级别提高。
这样,如果新缓存至所述第二缓存的数据块,也存储在第一缓存中,则提高新缓存数据块的淘汰优先级的级别,从而尽快淘汰新缓存至所述第二缓存的数据块,减少第一缓存和第二缓存中的重复数据,增加缓存数据,节省缓存资源。
可选地,所述存储设备保存有所述第一缓存的索引记录,所述第一缓存的索引记录包括所述第一缓存中保存的数据块的数据特征标 识,每个第一缓存中存储的数据块的大小等于与所述二数据块的大小,所述每个数据块的数据特征标识由所述每个数据块的数据内容决定;
所述第二确认单元根据所述每个第二数据块的数据特征标识查询所述第一缓存的索引记录,确定所述第二数据块是否存储在所述第一缓存中。
这样,通过设置所述第一缓存索引记录,可以在所述第一缓存中快速的找到与所述第二缓存中的数据相同的数据。
可选地,所述第一缓存索引记录只记录最近一段时间写入所述第一缓存的数据块的数据标识。这样可以减少第一缓存索引记录所占用的空间,减少查表的时间。
本发明第五方面提供一种存储设备,所述存储设备包括处理器、内存、第一缓存、第二缓存和存储单元,所述第一缓存为应用服务器提供数据缓存,所述第二缓存用于为所述存储单元提供数据缓存,所述内存用于存储计算机执行指令,当所述存储设备运行时,所述处理器执行所述内存存储的所述计算机执行指令,以使所述存储设备执行第一方面所提供的数据缓存方法或者第二方面所提供的数据缓存方法。
本发明的实施例通过在存储服务器一侧设置第一缓存以缓存从所述应用服务器的应用缓存中的数据,然后判断第二缓存中是否存储有与第一缓存中相同的数据,并根据判断结果调整所述第二缓存中的数据淘汰优先级级别。如此,通过协调第一缓存及第二缓存中缓存的数据,减少第一缓存及第二缓存中的重复数据,节省缓存资源,还能暂缓淘汰第二缓存中不与第一缓存中的数据相同的数据,或者与第一缓存中的待删除数据相同的数据,从而增加IO请求的响应速度。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域 普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为现有技术中的存储服务器为应用服务器提供存储服务的数据处理系统的架构图。
图2为本发明实施例中存储服务器为应用服务器提供存储服务的数据处理系统的架构图。
图3为本发明一实施例中,在一种触发条件下,第一缓存与第二缓存之间进行数据块协调的方法的流程图。
图4A及图4B为第二缓存的索引记录的示意图。
图5为图3所示的实施例中,第一缓存与第二缓存之间进行数据块协调的示意图。
图6为本发明一实施例中,在另一种触发条件下,第一缓存与第二缓存之间进行数据块协调的方法的流程图。
图7为图6所示的实施例中,第一缓存与第二缓存之间进行数据块协调的示意图。
图8为本发明一实施例中,在另一种触发条件下,第一缓存与第二缓存之间进行数据块协调的方法的流程图。
图9为图8所示的实施例中,第一缓存与第二缓存之间进行数据块协调的示意图。
图10为本发明一实施例中,在另一种触发条件下,第一缓存与第二缓存之间进行数据块协调的方法的流程图。
图11为图10所示的实施例中,第一缓存与第二缓存之间进行数据块协调的示意图。
图12为本发明一实施例中,在另一种触发条件下,第一缓存与第二缓存之间进行数据块协调的方法的流程图。
图13为图12所示的实施例中,第一缓存与第二缓存之间进行数据块协调的示意图。
图14为本发明一实施例中,在另一种触发条件下,第一缓存与第二缓存之间进行数据块协调的方法的流程图。
图15为图14所示的实施例中,第一缓存与第二缓存之间进行数据块协调的示意图。
图16为本发明实施例提供的一种存储控制装置的结构图。
图17为本发明实施例提供的另一种存储控制装置的结构图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。如图1所示,为现有技术中的存储服务器110为应用服务器120提供存储服务的数据处理系统100的架构图。
所述应用服务器120可以为供多个用户同时访问的共享服务器,例如数据库服务器、虚拟机管理服务器、桌面云服务器等。所述存储服务器110为所述应用服务器120提供数据存储服务。
所述应用服务器120包括应用处理器121、应用缓存122、扩展缓存123及其他元件。所述存储服务器110包括存储处理器111、存储缓存112、存储单元113及其他元件。所述应用缓存122为所述应用服务器120提供数据缓存,一般为高速缓存如动态随机存储器(Dynamic Random Access Memory,DRAM),但是由于DRAM的价格比较贵,所以一般容量较小。所述扩展缓存123一般为固态存储器(Solid State Disk,SSD),由于SSD存储器的价格相对DRAM比较便宜,但是速度比较低,所以一般用作应用缓存122的扩展缓存,即用于存储从所述应用缓存122淘汰的数据。由于应用缓存122的容量比较小,所以缓存至所述应用缓存122的数据可能很快被淘汰掉,所以通过扩展缓存123缓存应用缓存122淘汰的数据,可增加IO请求的响应速度。
所述存储缓存112为所述存储单元113如硬盘提供数据缓存,一般也为DRAM。可以缓存从存储单元113读取的数据,也可以缓存应用服务器100写入存储服务器110的数据。由于在缓存数据时,会在存储服务器110的存储缓存112与应用服务器120的应用缓存122中同时缓 存相同的数据,而存储服务器110又无法感知应用服务器120的应用缓存122中所缓存的数据,这就会造成应用服务器120中的应用缓存122与扩展缓存123中缓存的数据与存储服务器110的存储缓存112缓存相同的数据。另外,在扩展缓存123中的数据被淘汰时,缓存在存储缓存112中的与所述淘汰数据块相同的数据可能也处于很快被淘汰的位置,这样,在扩展缓存123中淘汰的数据在存储缓存112中也很快被淘汰后,当有IO请求访问所述淘汰数据时,又需要从存储单元113中调用,从而影响IO请求的响应速度。
可见,由于现有技术中存储服务器110无法获知应用服务器120中的扩展缓存123中所缓存的数据,缺乏两个缓存的协同操作机制,所以影响IO请求的响应速度或者导致存储资源的浪费。
本发明实施例通过在将应用服务器的缓存设置在存储服务器一侧设置,例如存储服务器上的第一缓存,用以缓存所述应用服务器的应用缓存的数据,然后判断存储服务器的第二缓存中是否存储有与第一缓存中相同的数据,并根据不同的判断结果调整所述第二缓存中的数据的淘汰优先级级别,例如,如果确定第二缓存中缓存有与缓存在所述第一缓存的数据相同的数据,则将所述二级缓存中与所述缓存数据相同的数据优先淘汰,如果确定第二缓存中缓存有与从所述第一缓存删除的数据相同的数据,则将所述第二缓存中与所述删除数据相同数据优先存储,如果所述第一缓存中没有缓存与所述二级缓存中待删除的数据相同的数据,则不删除所述从所述第二缓存待删除数据。如此,通过协调第一缓存及第二缓存中缓存的数据,减少第一缓存及第二缓存中的重复数据,还能暂缓删除第二缓存中不与第一缓存中所缓存的数据相同的待删除数据,或者与第一缓存中的待删除数据相同的数据,即可增加IO请求的响应速度。
下面结合具体实施例对本发明的技术方案做详细描述。
如图2所示,为本发明实施例中的存储服务器210为应用服务器220提供服务的数据处理系统200的架构图。
本实施例中,所述应用服务器220包括应用处理器221、应用缓存222、及其他元件,如内存等,由于其他元件本发明实施例未涉及, 在图中并未示出。
所述存储服务器210包括存储处理器211、第一缓存212、第二缓存213、存储单元214、内存215,及其他元件,其他元件本发明实施例未涉及,在图中并未示出。
与图1中的数据处理系统100相比,本实施例中去掉应用服务器120中的扩展缓存123,而是在所述存储服务器210中增加了第一缓存212。本发明实施例中应用服务器中还设置有该应用缓存222,存储服务器210中的第一缓存212仅用于替代图1中的扩展缓存123,但实际上在本发明的其他实施例中,应用服务器也可以不再包括应用缓存222,设置在存储服务器210的第一缓存212可以完全替代应用服务器的各种缓存,因本领域技术人员完全可以理解上述扩展实施例,具体实现方式在此不赘述。
所述第一缓存212为所述存储服务器210提供给应用服务器220使用,用于缓存应用服务器220中的数据,例如,缓存从所述应用缓存222中删除的数据,当所述应用缓存222中的数据被删除时,所述应用服务器220的应用处理器221发送数据缓存请求至所述存储服务器210,使所述存储服务器210缓存从应用缓存222删除的数据至所述第一缓存212中,在所述删除数据缓存至所述第一缓存212后,所述存储处理器211将缓存至所述第一缓存212的数据的地址返回给所述应用服务器200的应用处理器221,则所述应用处理器221即可根据返回的数据地址对所述第一缓存中的数据进行控制,所述控制可以为对第一缓存212中的数据块进行读取、淘汰等。当所述应用处理器221要淘汰所述第一缓存212中的数据时,所述应用处理器221发送数据淘汰请求至所述存储服务器210,所述数据淘汰请求中包括要淘汰数据的地址,所述存储服务器210接收到所述淘汰请求后,根据所述淘汰请求中包含的淘汰数据的地址,在所述第一缓存中找到需要淘汰的数据后进行淘汰。
所述第二缓存213为所述存储单元214提供数据缓存。
这样,由于所述第一缓存212中所缓存的数据块为所述应用服务器的应用缓存222所淘汰的数据块,则所述存储服务器210可通过所述 第一缓存212中缓存的数据获知之前缓存至所述应用缓存222的数据,这样,所述存储处理器211即可获知第一缓存212所缓存的数据,并协调所述第一缓存212与所述第二缓存213中所存储的数据块,以提高IO请求的响应速度,第一缓存212与第二缓存213中的数据的协调方法将在下文中做详细描述。
所述存储处理器211及应用处理器111可能为单核或多核中央处理单元,或者为特定集成电路,或者为被配置成实施本发明实施例的一个或多个集成电路。
所述内存215可以为高速RAM存储器,也可以为非易失性存储器(non-volatile memory),例如至少一个磁盘存储器,用于存储计算机执行指令2151。具体的,计算机执行指令2151中可以包括程序代码。
当存储服务器210运行时,所述存储处理器211运行计算机执行指令2151,可以执行图3、图6、图8、图10、图12及图14所述的第一缓存212及第二缓存213中的数据协调方法的流程。
图3、图6、图8、图10、图12及图14的协调方法将在下文做详细介绍。
本实施例中,包括两种情况,第一种情况为侦测所述第一缓存212中的所缓存数据的情况触发所述第一缓存212与第二缓存213所缓存数据的协调,第二种情况为侦测所述第二缓存213中的所缓存数据的情况触发所述第一缓存212与第二缓存213所缓存数据的协调。在实际产品中,可以只实施第一种情况下的数据协调方法,也可以只实施第二种情况下的数据协调方法,也可以同时实施两种情况下的数据协调方法。
下面将首先描述第一种情况下进行所述第一缓存212与第二缓存213的数据协调方法,在第一种情况下,所述第一缓存212与第二缓存213的数据协调在第一触发条件下触发,所述第一触发条件可以为:所述存储处理器211接收到所述应用服务器220发送的数据缓存请求,并根据所述数据缓存请求将所述数据缓存请求中包含的数据缓存至所述第一缓存212;所述存储处理器211接收到所述应用服务器220发送的数据删除请求;所述存储处理器211侦测到缓存在所述第一缓存 中的数据的时间超过一阈值。
如图3所示,为所述存储处理器211侦测到的第一触发条件为所述存储处理器211接收到所述应用服务器220发送的数据缓存请求,并根据所述数据缓存请求将所述数据缓存请求中包含的数据缓存至所述第一缓存212时,所述第一缓存212与第二缓存212之间进行数据块协调的方法的流程图。
步骤S301,所述存储处理器211接收到所述应用服务器220发送的数据缓存请求,并根据所述数据缓存请求将所述数据缓存请求中包含的数据缓存至所述第一缓存212,获取所述缓存请求对应的至少一个第一数据块的特征标识。
本实施例中,所述存储处理器211获取所述第一数据的特征标识包括:根据第一数据块包含的数据内容获得所述第一数据块的数据特征标识。
所述第一数据块的特征标识为根据第一数据块包含的数据内容解析出的能够唯一标识所述第一数据块的代码。具体解析方法可以为对所述第一数据块本身做哈希运算,将计算的哈希值作为所述第一数据块的特征标识,也可以根据应用服务器220所运行应用所设定的数据块的特征识别出的能够唯一标识所述第一数据块数据特征标识,例如,在所述应用服务器所运行的为数据块库应用时,则可以通过所述第一数据块的第五到第八字节的相对数据块地址(relative data block address,RDBA)来唯一标识所述第一数据块。
步骤S302,所述存储处理器211根据所述第一数据块的特征标识确定所述第一数据块是否存储在所述第二缓存213中。
所述内存215中还存储有所述第二缓存的索引记录2153,所述第二缓存的索引记录2153包括所述第二缓存中保存的至少一个第二数据块的特征标识,所述第二数据块的大小等于所述第一数据块的大小,且所述第二数据块的特征标识的获取方法也与所述第一数据块的特征标识的获取方法一致,在此不再赘述。
如此,则可根据所述每个第一数据块的特征标识查询所述第二缓存索引记录2153来确定所述每个第一数据块是否存储在所述第二缓 存213中。
所述第二缓存索引记录2153中所存储的数据块标识可以是所述第二缓存213所缓存的所有第二数据块的特征标识,也可以为部分第二数据块的特征标识。由于所述第二缓存213中所缓存的第二数据块数量比较多,所以如果将第二缓存213中的所有第二数据块的数据特征标识都记录在所述第二缓存索引记录2153中,则会浪费存储空间,且会增加查表的时间,从而影响性能,所以本实施例中所述第二缓存的索引记录2153只维护预设时间段内的缓存至所述第二缓存213的数据块的数据块标识,比如10分钟之内,具体如图4A及4B所示,所述第二缓存的索引记录中所存储的第二数据块的特征标识(如An、An-1……An-6)以所述第二数据块缓存至所述第二缓存的时间为顺序排列,且每个第二数据块的特征标识都具有一个时间戳(如12:01、12:02……12:10),用于记录所述第二数据块的特征标识对应的第二数据块缓存至所述第二缓存213的时间,所述时间段可以是10分钟,如图4A所示,当有第二数据块a缓存至所述第二缓存213时,所述存储处理器211获取所述第二数据块的特征标识(An+1),并将所获取的数据标识添加至所述第二缓存索引记录2153中的表头位置,同时加入时间戳(12:00),并启动计时。如图4B所示,若当前的时间是12:10,所述第二数据块b的特征标识(An-6)在所述第二缓存索引记录2153中的时间达到预设时间段(10分钟),则从所述第二缓存索引记录2153中删除。
在这种情况下,缓存在所述第二缓存中的数据才会记录在所述第二缓存索引记录中,则当所述第二缓存索引记录2153中记录有与所述第一数据块的特征标识相同的特征标识时,则确定所述第一数据块存储在所述第二缓存213中。
第二缓存索引记录2153也可以是一个哈希(Hash)表,哈希表的key是所述第二数据块标识,Value是0或1,0表示数据特征标识对应的第二数据块不存在所述第二缓存213中,1表示所述数据特征标识对应的数据块存在所述索引记录内。当数据块标识添加至所述第二缓存213的索引记录时,将所述value值设为1,当所述特征标识对应的第 二数据块从所述第二缓存中删除时,可将所述删除的数据块对应的特征标识的Value设置为0。
在这种情况下,在确定所述第一数据块是否存储在所述第二缓存213中时,首先查询所述第一数据块的特征标识是否记录在所述第二缓存索引记录2153中,当所述第一数据块的特征标识记录在所述第二缓存索引记录2153中时,确定对应的Value值,当Value值为1时,则确定所述第一数据块存储在所述第二缓存213中。
步骤S303,当确定所述第一数据块存储在所述第二缓存213中时,所述存储处理器211根据所述第一数据块的数据特征标识及地址表在所述第二缓存213中找到所述第一数据块,当确定所述第一数据块未存储在所述第二缓存213中时,返回步骤S301。
所述地址表中记录了缓存在所述第二缓存中的第二数据块的特征标识及存储地址。当有第二数据块缓存至所述第二缓存213时,所述存储处理器211获取所述第二数据块的数据特征标识,并建立所述第二数据块的数据特征标识与存储地址之间的映射关系,形成所述地址表。当所述第二缓存213中所缓存的第二数据块被淘汰时,所述存储处理器211获取所述第二数据块的数据块标识,然后将所述第二数据块标识对应的映射关系从所述地址表中删除,从而使所述地址表随着所述第二缓存213中所缓存数据块的变化而更新。
步骤S304,当所述存储处理器211在所述第二缓存213中找到所述第一数据块后,将所述第一数据块在所述第二缓存213中的淘汰优先级的级别提高,可以是提高到最高级,也可以为提高到预设设定的优先级级别,如果提高到最高级,则所述第一数据块即可被从所述第二缓存213中删除。
本实施例中,通过淘汰队列的方式设定各个第二数据块的淘汰顺序,所述淘汰队列可以是近期最少使用算法(Least Recently Used,LRU)队列,也可以是近期经常使用算法(least frequently used,LFU)队列,或者其他对缓存中的数据进行淘汰的算法队列。
如图5所示,若第一数据块a缓存至所述第一缓存212后,所述存储处理器211确定所述第一数据块a的特征标识为An+1,然后在所述 第二缓存索引记录2153中找到所述特征标识An+1,再在所述地址表2154中获取所述特征标识An+1对应的数据a的地址,最后调整所述数据a在LRU队列中的位置至优先被淘汰的位置,所述优先被淘汰的位置可以是LRU队列的队尾,也可以是靠近对尾的位置。
如图6所示,当所述第一触发条件为所述存储处理器211接收到所述应用服务器220发送的数据删除请求,所述第一缓存212与第二缓存212之间进行数据块协调的方法的流程图。
步骤S601,所述存储处理器211接收到所述应用服务器220发送的第一数据块删除请求,根据所述删除请求中包含的第一数据块的地址,在所述第一缓存中找到所述第一数据块,并获取所述第一数据块的特征标识。
步骤S602,所述存储处理器211根据所述第一数据块的特征标识确定所述第一数据块是否存储在所述第二缓存213中。
步骤S603,当确定所述第一数据块存储存储在所述第二缓存213中时,所述存储处理器211根据所述第一数据块的特征标识及地址表2154在所述第二缓存213中找到所述第一数据块,当确定所述第一数据块未存储在所述第二缓存213中时,则不做任何操作,继续对所述第一缓存212中的数据情况进行侦测。
步骤S604,当所述存储处理器211在所述第二缓存213中找到所述第一数据块后,将所述第一数据块在所述第二缓存中的淘汰优先级的级别降低,可以是降低到最低级,也可以为降低到预设设定的优先级级别。
如图7所示,若第一数据块f为根据数据删除请求确定从所述第一缓存212中删除的数据,所述存储处理器211确定组成所述第一数据的第一数据块(本实施例中所述第一数据只包括一个第一数据块)的数据特征标识An+1,然后在所述第二缓存索引记录2153中找到所述数据特征标识An+1,再在所述地址表2154中获取所述数据特征标识An+1对应的数据f的地址,最后调整所述数据f在LRU队列中的位置至优先被存储的位置,所述优先被存储的位置可以是LRU队列的队首,也可以是靠近对首的位置。
如图8所示,当所述第一触发条件为所述缓存在所述第一缓存212中的数据的时间超过一阈值时,所述第一缓存212与第二缓存212之间进行数据块协调的方法的流程图。
步骤S801,所述存储处理器211在侦测到所述第一缓存中212所缓存的第一数据块超过阈值时,获取所述第一数据块的特征标识。
步骤S802,所述存储处理器211根据所述第一数据块的特征标识确定所述第一数据块是否存储在所述第二缓存213中。
步骤S803,当确定所述第一数据块存储存储在所述第二缓存213中时,所述存储处理器211根据所述第一数据块的特征标识及地址表2154在所述第二缓存213中找到所述第一数据块,当确定所述第一数据块未存储在所述第二缓存213中时,返回步骤S301。
步骤S804,当所述存储处理器211在所述第二缓存213中找到所述第一数据块后,将所述第一数据块在所述第二缓存中的淘汰优先级的级别提高,可以是提高到最高级,也可以为提高到预设设定的优先级级别。
如图9所示,若第一数据块d在第一缓存212中的数据超过一阈值时,所述存储处理器211确定所述第一数据块d的数据特征标识An,然后在所述第二缓存索引记录中找到所述数据特征标识An,再在所述地址表中获取所述数据特征标识An对应的数据块d的地址,最后调整所述数据d在LRU队列中的位置至优先被淘汰的位置,所述优先被淘汰的位置可以是LRU队列的队尾,也可以是靠近对尾的位置。
以上为第一种情况下,即侦测所述第一缓存212中的所缓存数据的情况触发所述第一缓存212与第二缓存213的数据协调,下面将介绍第二种情况,即侦测所述第二缓存213中的所缓存数据的情况触发所述第一缓存212与第二缓存213的数据协调的方法。
在第二种情况下,所述第一缓存212与第二缓存213的数据协调在第二触发条件下触发,所述第二触发条件可以为:往所述第二缓存中缓存数据时;删除所述第二缓存中的数据时;或者所述第二缓存中的数据块在第二缓存中存储的时间超过了一阈值。下面分别对这二触发条件下,所述第一缓存及第二缓存的数据的协调方法进行说明。
如图10所示,为所述第二触发条件为所述第二缓存中缓存数据时,所述第一缓存及第二缓存的数据的协调方法的流程图。
步骤S1001,所述存储处理器211根据数据缓存请求,缓存数据至所述第二缓存,所缓存的数据被划分为预定大小的至少一个第二数据块,然后获取所述第二数据块的特征标识。
所述第二数据块的特征标识的获取方式与所述第一数据块的数据特征的获取方式相同,在此不再赘述。
步骤S1002,所述存储处理器211根据所述第二数据的特征标识确定所述第二数据是否存储在所述第一缓存中。
本实施例中,所述内存215中还存储有第一缓存的索引记录2152,所述第一缓存索引记录2152包括所述第一缓存212中保存的至少一个第一数据块的数据特征标识,所述第一数据块的大小等于所述第二数据块的大小。
如此,则可根据所述每个第二数据块的特征标识查询所述第一缓存的索引记录2152来确定所述每个第二数据块是否存储在所述第一缓存212中。
所述第一缓存212的索引记录中所存储的数据块标识可以是所述第一缓存212所缓存的所有第一数据块的特征标识,也可以为部分第一数据块的特征标识。由于所述第一缓存212中所缓存的第一数据块数量比较多,所以如果将第一缓存212中的所有第一数据块的数据特征标识都存储在所述第一缓存索引记录中,则会浪费存储空间,且会增加查表的时间,从而影响性能,所以本实施例中所述第一缓存索引记录2153只维护预设时间段内的缓存至所述第一缓存212的第一数据块特征标识,比如10分钟之内。
在这种情况下,缓存在所述第一缓存212中的数据才会记录在所述第一缓存索引记录2152中,则当所述第一缓存索引记录2152中记录有与所述第一数据块的特征标识相同的特征标识时,则确定所述第一数据块存储在所述第一缓存212中。
所述第一缓存索引记录2152也可以是一个哈希(Hash)表,哈希表的key是所述第一数据块标识,Value是0或1,0表示数据特征标 识对应的第一数据块不存在所述第一缓存212中,1表示所述数据特征标识对应的数据块存在所述索引记录内。当第一数据块标识添加至所述第一缓存212的索引记录时,将所述value值设为1,当所述特征标识对应的第一数据块从所述第一缓存中删除时,可将所述删除的数据块对应的特征标识的Value设置为0。
在这种情况下,在确定所述第二数据块是否存储在所述第一缓存212中时,首先查询所述第一数据块的特征标识是否记录在所述第一缓存索引记录2152中,当所述第一数据块的特征标识记录在所述第一缓存索引记录2152中时,确定对应的Value值,当Value值为1时,则确定所述第一数据块存储在所述第一缓存212中。
步骤S1003,当所述存储处理器211根据所述第二数据的特征标识确定所述第二数据存储在所述第一缓存212中时,将所述第二数据在所述第二缓存213中的淘汰优先级的级别提高,所述提高可以是提高到最高级,也可以为预先设定的优先级级别。当所述存储处理器211确定所述第二数据未存储在所述第一缓存212中时,则不调整所述第二数据的优先级级别。
如图11所示,缓存至所述二缓存213的第二数据块a1的特征标识为Bn+1,查询所述第一缓存索引记录2152,在所述第一缓存索引记录2152中找到所述数据块a1的特征标识,则说明所述第二数据a1存储在所述第一缓存212中,则可将所述第二数据块a1调整到所述LRU队列的队尾位置,也可以调整到靠近对尾的位置。
如图12所示,当所述存储处理器211从所述第二缓存213中删除数据时,所述第一缓存212及第二缓存213的数据的协调方法的流程图。
步骤S1201,所述存储处理器211确定从所述第二缓存213中待删除的第二数据块后,获取所述第二数据块的特征标识。
步骤S1202,所述存储处理器211根据所述第二数据的特征标识确定所述第二数据块是否存储在所述第一缓存212中。
步骤S1203,当所述存储处理器211确定所述第二数据存储在所述第一缓存212中时,则删除所述第二数据块。
步骤S1204,当所述存储处理器211确定所述第二数据没有存储在 所述第一缓存212中时,则将所述第二数据在所述第二缓存213中的淘汰优先级的级别提高,所述提高可以是提高到最高级,也可以为预先设定的优先级级别。但是当所述待删除的数据块再次被选中为待删除的数据块时,则直接删除所述待删除的第二数据块。
如图13所示,第二数据块f1为所确定的从所述第二缓存中待删除的数据块,所获取的所述第二数据块f1的特征标识为Bn-3,所述特征标识Bn-3没有记录在所述第一缓存索引记录中,则说明所述第二数据块可能没有存储在所述第一缓存中,则将所述第二数据块f1调整至所述第二缓存213中的LRU队列的队首位置,或者靠近队首的位置。
如图14所示,当所述第二缓存中的第二数据块在第二缓存中存储的时间超过了一阈值时,所述第一缓存及第二缓存的数据的协调方法的流程图。
步骤S1401,当确定所述第二缓存中的第二数据块在第二缓存中存储的时间超过了一阈值时,获取所述第二数据块的特征标识。
步骤S1402,所述存储处理器211根据所述第二数据的特征标识确定所述第二数据是否存储在所述第一缓存中。
步骤S1403,当所述存储处理器211确定所述第二数据存储在所述第一缓存212中时,则将所述第二数据在所述第二缓存213中的淘汰优先级的级别提高。
步骤S1404,当所述存储处理器211确定所述第二数据没有存储在所述第一缓存212中时,则将所述第二数据在所述第二缓存213中的淘汰优先级的级别降低。
如图15所示,当所述第二数据块c1在所述第二缓存中所缓存的时间超过阈值时,则确定所述第二数据块c1的特征标识Bn是否记录在所述第一缓存索引记录中,当所述第二数据块c1的特征标识记录在所述第一缓存索引记录2152中时,将所述第二数据块c1调整至所述LRU队列的队尾,或者靠近队尾的位置。
当所述第二数据块d1在所述第二缓存213中所缓存的时间超过阈值时,则确定所述第二数据块d1的特征标识Bn-3是否记录在所述第一缓存索引记录中,当所述第二数据块d1的特征标识没有记录在所述第 一索引记录中时,将所述第二数据块d1调整至所述LRU队列的队首,或者靠近队首的位置。
在本发明的其他实施例中,所述应用服务器可以为电子装置中的应用软件,所述应用缓存为所述应用软件提供数据缓存,所述存储服务器为电子装置的存储装置,为所述应用软件提供存储服务。
如图16所示,为本发明实施例提供存储控制装置的结构图。
所述存储控制装置包括第一监测单元1601、第一获取单元1602、第一确定单元1603及第一调整单元1604。
所述第一监测单元1601用于侦测所述第一缓存212中的所缓存数据的情况,以触发所述第一缓存212与第二缓存213的数据协调。所述所述第一缓存212与第二缓存213的数据协调有三种触发条件,分别为:所述第一监测单元1601接收到所述应用服务器220发送的数据缓存请求,并根据所述数据缓存请求将所述数据缓存请求中包含的第一数据缓存至所述第一缓存212;所述第一监测单元1601接收到所述应用服务器220发送的数据删除请求;所述第一监测单元1601侦测缓存在所述第一缓存中的数据的时间超过预设阈值。
当所述第一监测单元1601接收到所述应用服务器220发送的数据缓存请求,并根据所述数据缓存请求将所述数据缓存请求中包含的第一数据缓存至所述第一缓存212后,所述获取单元1602获取组成所述第一数据的第一数据块的特征标识,所述第一数据块的特征标识的获取方式前面已经介绍过,这里不再赘述。
所述确定单元1603根据所述第一数据的特征标识确定数所述第一据是否存储在所述第二缓存中。即所述确定单元1603根据所述每个第一数据块的数据特征标识查询所述第二缓存的索引记录来确定所述每个第一数据块是否存储在所述第二缓存213中。当所述第二缓存的索引记录中存在与所述第一数据块的数据特征标识相同的第二数据块索引记录时,则确定所述第一数据块存储在所述第二缓存213中。
当所述确定单元1603确定所述第一数据块存储在所述第二缓存213中时,所述调整单元1604根据所述第一数据块的特征标识及地址表在所述第二缓存213中找到所述第一数据块,然后将所述第一数据 块在所述第二缓存中的淘汰优先级的级别降低,可以是降低到最低级,也可以为降低到预设设定的优先级级别。
当所述第一监测单元1601在侦测到所述第一缓存中212所缓存的第一数据块的超过易阈值时,获取所述第一数据块的特征标识。
所述确定单元1603根据所述第一数据的特征标识确定数所述第一据是否存储在所述第二缓存中。
所述调整单元1604根据所述第一数据块的特征标识及地址表在所述第二缓存213中找到所述第一数据块,将所述第一数据块在所述第二缓存中的淘汰优先级的级别提高,可以是提高到最高级,也可以为提高到预设设定的优先级级别。
如图17所示,所述存储控制装置进一步还包括第二监测单元1605,第二获取单元1606、第二确定单元1607及第二调整单元1608。
所述第二监测单元1605用于侦测所述第二缓存的数据情况,以触发所述第一缓存及所述第二缓存所缓存数据的协调。所述第一缓存212与第二缓存213的数据协调有三种触发条件,分别为往所述第二缓存中缓存数据时;删除所述第二缓存中的数据时;或者所述第二缓存中的数据块在第二缓存中存储的时间超过了一阈值。
当所述第二监测单元1605侦测数据缓存至所述第二缓存,且所缓存的数据被划分为预定大小的至少一个第二数据块后,获取所述第二数据块的特征标识。
所述第二确定单元1603用于据所述第二数据的特征标识确定所述第二数据是否存储在所述第一缓存中。所述确定单元1602根据所述第二数据块的特征标识查询所述第一缓存的索引记录来确定所述每个第二数据块是否存储在所述第一缓存212中。当所述第一缓存的索引记录中存在与所述第二数据块的特征标识相同的第二数据块索引记录时,则确定所述第二数据块存储在所述第一缓存213中。
当所述第二确定单元1603定所述第二数据存储在所述第一缓存212中时,所述调整单元1604用于将所述第二数据在所述第二缓存213中的淘汰优先级的级别提高,所述提高可以是提高到最高级,也可以为预先设定的优先级级别。当所述存储处理器211确定所述第二数据 未存储在所述第一缓存212中时,则不调整所述第二数据的优先级级别。
当所述第二监测单元1605到从所述第二缓存213中待删除的第二数据块后,获取所述第二数据块的特征标识。
所述第二确定单元1605根据所述第二数据的特征标识确定所述第二数据是否存储在所述第一缓存中。
当所述第二确定单元1605确定所述第二数据存储在所述第一缓存中时,所述第二调整单元删除所述第二数据块,当所述第二确定单元1605确定所述第二数据没有存储在所述第一缓存中时,所述第二调整单元将所述第二数据在所述第二缓存213中的淘汰优先级的级别提高。
当所述第二监测单元1605侦测到从所述第二缓存213中待删除的第二数据块后,所述第二获取单元1606获取所述第二数据块的特征标识。
所述第二确定单元1607根据所述第二数据的特征标识确定所述第二数据是否存储在所述第一缓存中。
当所述第二确定单元1605确定所述第二数据存储在所述第一缓存中时,所述调整单元1608删除所述第二数据块。当所述第二确定单元1605确定所述第二数据存储在所述第一缓存中时,则将所述调整单元将所述第二数据在所述第二缓存213中的淘汰优先级的级别提高。
当所述第二监测单元1605侦测到所述第二缓存中的第二数据块在第二缓存中存储的时间超过了一阈值时,所述第二获取单元1606获取所述第二数据块的特征标识。
所述第二确定单元1606根据所述第二数据的特征标识确定所述第二数据是否存储在所述第一缓存中。
当所述第二确定单元1605确定所述第二数据存储在所述第一缓存中时,则所述调整单元1608将所述第二数据在所述第二缓存213中的淘汰优先级的级别提高。当所述第二确定单元1605确定所述第二数据没有存储在所述第一缓存中时,则所述调整单元1608将所述第二数据在所述第二缓存213中的淘汰优先级的级别降低。
本发明实施例还提供一种计算机可读介质,包括计算机执行指令,当计算机的处理器执行所述计算机执行指令时,所述计算机执行图3、图6、图8、图10、图12、及图14所述的方法流程。
本发明实施例中的第一数据块,第二数据块中的第一、第二只是用于区别第一缓存和第二缓存中分别存储的数据块,第一、第二并没有包含级别不同、顺序不同的意思,也没有包含数量的涵义,第一数据块和第二数据块都可以是一个数据块,也都可以指代多个数据块。
本发明实施例中的第一触发条件和第二触发条件中的第一、第二只是用于区别侦测的是第一缓存中的数据还是第二缓存中的数据,第一、第二并没有包含级别不同、顺序不同的意思,也没有包含数量的涵义。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:ROM、RAM、磁盘或光盘等。
以上对本发明实施例所提供的数据块写入装置及方法进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (29)

  1. 一种数据的缓存方法,应用于存储设备,其特征在于,所述存储设备包括第一缓存、第二缓存和存储单元,所述第一缓存为应用服务器提供数据缓存,所述第二缓存用于为所述存储单元提供数据缓存,所述方法包括:
    在监测到第一触发条件的情况下,获取缓存在所述第一缓存中的第一数据块的特征信息;
    根据所述第一数据块的特征信息确定所述第一数据块是否存储在所述第二缓存中;
    在确定所述第一数据块存储在所述第二缓存中的情况下,调整所述第一数据块在所述第二缓存中的淘汰优先级的级别。
  2. 如权利要求1所述的方法,其特征在于,所述第一触发条件为:根据第一数据写请求将所述第一数据块写入所述第一缓存中,或者,所述第一数据块在所述第一缓存中的缓存时间超过预定时间;
    所述在确定所述第一数据块存储在所述第二缓存中的情况下,调整所述第一数据块在所述第二缓存中的淘汰优先级的级别包括:
    在确定所述第一数据块存储在所述第二缓存中的情况下,将所述第一数据块在所述第二缓存中的淘汰优先级的级别提高。
  3. 如权利要求1所述的方法,其特征在于,所述第一触发条件为:接收到在所述第一缓存中删除所述第一数据块的删除请求;
    所述在确定所述第一数据块存储在所述第二缓存中的情况下,调整所述第一数据块在所述第二缓存中的淘汰优先级的级别包括:
    在确定所述第一数据块存储在所述第二缓存中的情况下,将所述第一数据块在所述第二缓存中的淘汰优先级的级别降低。
  4. 如权利要求1-3任意一项所述的方法,其特征在于,所述存储设备保存有所述第二缓存的索引记录,所述第二缓存的索引记录包括所述第二缓存中保存的数据块的数据特征标识,所述第二缓存中保存的数据块的大小等于所述第一数据块的大小,所述每个所述第二缓存中保存的数据块的数据特征标识由所述每个所述第二缓存中保存的 数据块的数据内容决定;
    所述获取第一数据块的特征信息包括:根据每个第一数据块的数据内容获得所述第一数据块的数据特征标识;
    所述根据所述第一数据块的特征信息确定所述第一数据块是否存储在所述第二缓存中包括:根据所述第一数据块的数据特征标识查询所述第二缓存的索引记录,确定所述每个第一数据块是否存储在所述第二缓存中。
  5. 如权利要求1-4任意一项所述的方法,其特征在于,还包括:
    在监测到第二触发条件的情况下,获取缓存在所述第二缓存中的第二数据块的特征信息;
    根据所述第二数据块的特征信息确定所述第二数据块是否存储在所述第一缓存中;
    在确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据块在所述第二缓存中的淘汰优先级的级别。
  6. 如权利要求5所述的方法,其特征在于,所述第二触发条件为:所述第二数据块在所述第二缓存中的缓存时间超过预定时间;
    所述在确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据块在所述第二缓存中的淘汰优先级的级别包括:
    在确定所述第二数据块存储在所述第一缓存中的情况下,将所述第二数据块从所述第二缓存中的淘汰优先级的级别提高。
  7. 如权利要求5所述的方法,其特征在于,若所述第二触发条件为:删除所述第二缓存中的所述第二数据块,
    所述方法还包括:
    在确定所述第二数据未存储在所述第一缓存中的情况下,将所述第二数据在所述第二缓存中的淘汰优先级的级别降低。
  8. 如权利要求5所述的方法,其特征在于,若所述第二触发条件为:将所述第二数据块写入所述第二缓存;
    所述在确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据块在所述第二缓存中的淘汰优先级的级别包括:
    在确定所述第二数据块存储在所述第一缓存中的情况下,将所述 第二数据块在所述第二缓存中的淘汰优先级的级别提高。
  9. 如权利要求5-8任意一项所述的方法,其特征在于,所述存储设备保存有所述第一缓存的索引记录,所述第一缓存的索引记录包括所述第一缓存中保存的数据块的数据特征标识,所述第一缓存中保存的数据块的大小等于所述第二数据块的大小,所述第一缓存中保存的数据块的数据特征标识由所述每个数据块包含的数据内容决定;
    所述获取第二数据块的特征信息包括:根据每个第二数据块的数据内容获得所述每个第二数据块的数据特征标识;
    所述根据所述第二数据块的特征信息确定所述第二数据块是否存储在所述第一缓存中包括:根据所述第二数据块的数据特征标识查询所述第一缓存的索引记录,确定所述第二数据块是否存储在所述第一缓存中。
  10. 一种数据的缓存方法,应用于存储设备,其特征在于,所述存储设备包括第一缓存、第二缓存和存储单元,所述第一缓存为应用服务器提供数据缓存,所述第二缓存用于为所述存储单元提供数据缓存,所述方法包括:
    在监测到第二触发条件的情况下,获取缓存在所述第二缓存中的第二数据块的特征信息;
    根据所述第二数据的特征信息确定所述第二数据块是否存储在所述第一缓存中;
    在确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据块在所述第二缓存中的淘汰优先级的级别。
  11. 如权利要求10所述的方法,其特征在于,所述第二触发条件为:所述第二数据块在所述第二缓存中的缓存时间超过预定时间;
    所述在确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据在所述第二缓存中的淘汰优先级的级别包括:
    在确定所述第二数据块存储在所述第一缓存中的情况下,将所述第二数据块在所述第二缓存中的淘汰优先级的级别提高。
  12. 如权利要求10所述的方法,其特征在于,若所述第二触发条件为:删除所述第二缓存中的所述第二数据块,
    所述方法还包括:
    在确定所述第二数据块未存储在所述第一缓存中的情况下,将所述第二数据块在所述第二缓存中的淘汰优先级的级别降低。
  13. 如权利要求5所述的方法,其特征在于,若所述第二触发条件为:将包含所述第二数据块的数据写入所述第二缓存;
    所述在确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据块在所述第二缓存中的淘汰优先级的级别包括:
    在确定所述第二数据块存储在所述第一缓存中的情况下,将所述第二数据块在所述第二缓存中的淘汰优先级的级别提高。
  14. 如权利要求10-13任意一项所述的方法,其特征在于,所述存储设备保存有所述第一缓存的索引记录,所述第一缓存的索引记录包括所述第一缓存中保存的数据块的数据特征标识,所述第一缓存中保存的数据块的大小等于所述第二数据块的大小,所述每个所述第二缓存中保存的数据块的数据特征标识由所述每个所述第二缓存中保存的数据块的数据内容决定;
    所述获取第二数据块的特征信息包括:根据每个第二数据块包含的数据内容获得所述每个第二数据块的数据特征标识;
    所述根据所述第二数据块的特征信息确定所述第二数据块是否存储在所述第一缓存中包括:根据所述每个第二数据块的数据特征标识查询所述第一缓存的索引记录,确定所述第二数据块是否存储在所述第一缓存中。
  15. 一种存储控制装置,用于控制存储设备的数据存储,其特征在于,所述存储设备包括第一缓存、第二缓存和存储单元,所述第一缓存为应用服务器提供数据缓存,所述第二缓存用于为所述存储单元提供数据缓存,所述存储控制装置包括:
    第一监测单元,用于监测第一触发条件;
    第一获取单元,用于在所述第一监测单元监测所述第一触发条件的情况下,获取缓存在所述第一缓存中的第一数据块的特征信息;
    第一确定单元,用于根据所述第一数据块的特征信息确定所述第一数据块是否存储在所述第二缓存中;
    第一调整单元,用于在所述第一确定单元确定所述第一数据块存储在所述第二缓存中的情况下,调整所述第一数据块在所述第二缓存中的淘汰优先级的级别。
  16. 如权利要求15所述的存储控制装置,其特征在于,所述第一触发条件为:根据第一数据写请求将所述第一数据块写入所述第一缓存中,或者,所述第一数据在所述第一缓存中的缓存时间超过预定时间;
    所述第一调整单元具体用于:在所述第一确定单元确定所述第一数据块存储在所述第二缓存中的情况下,将所述第一数据块在所述第二缓存中的淘汰优先级的级别提高。
  17. 如权利要求15所述的存储控制装置,其特征在于,所述第一触发条件为:接收到在所述第一缓存中删除所述第一数据块的删除请求;
    所述第一调整单元具体用于:在所述第一确定单元确定所述第一数据块存储在所述第二缓存中的情况下,将所述第一数据块在所述第二缓存中的淘汰优先级的级别降低。
  18. 如权利要求15-17任意一项所述的存储控制装置,其特征在于,所述存储设备保存有所述第二缓存的索引记录,所述第二缓存的索引记录包括所述第二缓存中保存的数据块的数据特征标识,所述第二缓存中保存的数据块的大小等于所述第一数据块的大小,所述每个所述第二缓存中保存的数据块的数据特征标识由所述每个所述第二缓存中保存的数据块的数据内容决定;
    所述第一获取单元具体用于:根据每个第一数据块的数据内容获得所述第一数据块的数据特征标识;
    所述第一确定单元具体用于:根据所述第一数据块的数据特征标识查询所述第二缓存的索引记录,确定所述每个第一数据块是否存储在所述第二缓存中。
  19. 如权利要求15-18任意一项所述的存储控制装置,其特征在于,还包括:
    第二监测单元,用于监测第二触发条件;
    第二获取单元,用于在所述第二监测单元监测到所述第二触发条件的情况下,获取缓存在所述第二缓存中的第二数据块的特征信息;
    第二确定单元,用于根据所述第二数据块的特征信息确定所述第二数据块是否存储在所述第一缓存中;
    第二调整单元,用于在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据块在所述第二缓存中的淘汰优先级的级别。
  20. 如权利要求19所述的存储控制装置,其特征在于,所述第二监测单元所监测到的所述第二触发条件为:所述第二数据块在所述第二缓存中的缓存时间超过预定时间;
    在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,所述第二调整单元具体用于:
    将所述第二数据块从所述第二缓存中的淘汰优先级的级别提高。
  21. 如权利要求19所述的存储控制装置,其特征在于,所述第二监测单元所监测到的所述第二触发条件为:删除所述第二缓存中的所述第二数据块,
    当所述第二确定单元在确定所述第二数据未存储在所述第一缓存中的情况下,所述第二调整单元具体用于:将所述第二数据在所述第二缓存中的淘汰优先级的级别降低。
  22. 如权利要求19所述的存储控制装置,其特征在于,所述第二监测单元所监测到的所述第二触发条件为:将包含所述第二数据块的数据写入所述第二缓存;
    在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,所述第二调整单元具体用于:将所述第二数据块在所述第二缓存中的淘汰优先级的级别提高。
  23. 如权利要求19-22任意一项所述的存储控制装置,其特征在于,所述存储设备保存有所述第一缓存的索引记录,所述第一缓存的索引记录包括所述第一缓存中保存的数据块的数据特征标识,所述第一缓存中保存的数据块的大小等于所述第二数据块的大小,所述第一 缓存中保存的数据块的数据特征标识由所述每个数据块包含的数据内容决定;
    所述第二获取单元具体用于:根据每个第二数据块的数据内容获得所述每个第二数据块的数据特征标识;
    所述第二确定单元具体用于:根据所述第二数据块的数据特征标识查询所述第一缓存的索引记录,确定所述第二数据块是否存储在所述第一缓存中。
  24. 一种存储控制装置,用于控制存储设备的数据存储,其特征在于,所述存储设备包括第一缓存、第二缓存和存储单元,所述第一缓存为应用服务器提供数据缓存,所述第二缓存用于为所述存储单元提供数据缓存,所述存储控制装置包括:
    第二监测单元,用于监测第二触发条件;
    第二获取单元,用于在所述第二监测单元监测到所述第二触发条件的情况下,获取第二数据块的特征信息,所述第二数据块为缓存在所述第二缓存中的数据;
    第二确定单元,用于根据所述第二数据块的特征信息确定所述第二数据块是否存储在所述第一缓存中;
    第二调整单元,用于在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,调整所述第二数据块在所述第二缓存中的淘汰优先级的级别。
  25. 如权利要求24所述的存储控制装置,其特征在于,所述第二监测单元所监测到的所述第二触发条件为:所述第二数据块在所述第二缓存中的缓存时间超过预定时间;
    所述第二调整单元具体用于:在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,
    将所述第二数据块从所述第二缓存中的淘汰优先级的级别提高。
  26. 如权利要求24所述的存储控制装置,其特征在于,所述第二监测单元所监测到的所述第二触发条件为:删除所述第二缓存中的所述第二数据块,
    当所述第二确定单元在确定所述第二数据未存储在所述第一缓存中的情况下,所述第二调整单元还用于:将所述第二数据在所述第二缓存中的淘汰优先级的级别降低。
  27. 如权利要求24所述的存储控制装置,其特征在于,所述第二监测单元所监测到的所述第二触发条件为:将包含所述第二数据块的数据写入所述第二缓存;
    在所述第二确定单元确定所述第二数据块存储在所述第一缓存中的情况下,所述第二调整单元具体用于:将所述第二数据块在所述第二缓存中的淘汰优先级的级别提高。
  28. 如权利要求24-27任意一项所述的存储控制装置,其特征在于,所述存储设备保存有所述第一缓存的索引记录,所述第一缓存的索引记录包括所述第一缓存中保存的数据块的数据特征标识所述第一缓存中保存的数据块的大小等于所述第二数据块的大小,所述每个所述第二缓存中保存的数据块的数据特征标识由所述每个所述第二缓存中保存的数据块包含的数据内容决定;
    所述第二获取单元具体用于:根据每个第二数据块包含的数据内容获得所述每个第二数据块的数据特征标识;
    所述第二确定单元具体用于:根据所述每个第二数据块的数据特征标识查询所述第一缓存的索引记录,确定所述第二数据块是否存储在所述第一缓存中。
  29. 一种存储设备,所述存储设备包括处理器、内存、第一缓存、第二缓存和存储单元,所述第一缓存为应用服务器提供数据缓存,所述第二缓存用于为所述存储单元提供数据缓存,所述内存用于存储计算机执行指令,当所述存储设备运行时,所述处理器执行所述内存存储的所述计算机执行指令,以使所述存储设备执行权利要求1-9或者10-14所述的数据的缓存方法。
PCT/CN2015/096176 2015-12-01 2015-12-01 数据缓存方法、存储控制装置、及存储设备 WO2017091984A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202010983144.9A CN112231242A (zh) 2015-12-01 2015-12-01 数据缓存方法、存储控制装置、及存储设备
CN202010981446.2A CN112214420A (zh) 2015-12-01 2015-12-01 数据缓存方法、存储控制装置、及存储设备
CN201580054160.7A CN107430551B (zh) 2015-12-01 2015-12-01 数据缓存方法、存储控制装置、及存储设备
PCT/CN2015/096176 WO2017091984A1 (zh) 2015-12-01 2015-12-01 数据缓存方法、存储控制装置、及存储设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/096176 WO2017091984A1 (zh) 2015-12-01 2015-12-01 数据缓存方法、存储控制装置、及存储设备

Publications (1)

Publication Number Publication Date
WO2017091984A1 true WO2017091984A1 (zh) 2017-06-08

Family

ID=58796064

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/096176 WO2017091984A1 (zh) 2015-12-01 2015-12-01 数据缓存方法、存储控制装置、及存储设备

Country Status (2)

Country Link
CN (3) CN112214420A (zh)
WO (1) WO2017091984A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339143A (zh) * 2020-02-27 2020-06-26 郑州阿帕斯数云信息科技有限公司 数据缓存方法、装置及云服务器
CN113098973A (zh) * 2021-04-13 2021-07-09 鹏城实验室 包级别网内数据传输方法、系统、存储介质及终端设备
CN113254893A (zh) * 2020-02-13 2021-08-13 百度在线网络技术(北京)有限公司 一种身份校验方法、装置、电子设备及存储介质
CN117149836A (zh) * 2023-10-27 2023-12-01 联通在线信息科技有限公司 一种缓存处理方法和装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240946A (zh) * 2018-09-06 2019-01-18 平安科技(深圳)有限公司 数据的多级缓存方法及终端设备
CN109144431B (zh) * 2018-09-30 2021-11-02 华中科技大学 数据块的缓存方法、装置、设备及存储介质
CN110971962B (zh) * 2019-11-30 2022-03-22 咪咕视讯科技有限公司 切片缓存的方法、装置及存储介质
CN112035529A (zh) * 2020-09-11 2020-12-04 北京字跳网络技术有限公司 缓存方法、装置、电子设备及计算机可读存储介质
CN116467353B (zh) * 2023-06-12 2023-10-10 天翼云科技有限公司 一种基于lru差异化的自适应调节的缓存方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7143205B2 (en) * 2001-06-18 2006-11-28 Renesas Technology Corp. DMA controller having a trace buffer
CN102945207A (zh) * 2012-10-26 2013-02-27 浪潮(北京)电子信息产业有限公司 一种块级数据的缓存管理方法及系统
CN103268292A (zh) * 2013-06-13 2013-08-28 江苏大学 一种延长非易失外存寿命的方法及高速长寿外存系统
CN104239233A (zh) * 2014-09-19 2014-12-24 华为技术有限公司 缓存管理方法、缓存管理装置和缓存管理设备

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5224217A (en) * 1988-12-30 1993-06-29 Saied Zangenehpour Computer system which uses a least-recently-used algorithm for manipulating data tags when performing cache replacement
JP4244572B2 (ja) * 2002-07-04 2009-03-25 ソニー株式会社 キャッシュ装置、およびキャッシュデータ管理方法、並びにコンピュータ・プログラム
US8793442B2 (en) * 2012-02-08 2014-07-29 International Business Machines Corporation Forward progress mechanism for stores in the presence of load contention in a system favoring loads
US20140115260A1 (en) * 2012-10-18 2014-04-24 Oracle International Corporation System and method for prioritizing data in a cache
CN103019962B (zh) * 2012-12-21 2016-03-30 华为技术有限公司 数据缓存处理方法、装置以及系统
JP6027504B2 (ja) * 2013-08-02 2016-11-16 日本電信電話株式会社 アプリケーションサーバ、およびキャッシュ制御方法
US9378151B2 (en) * 2013-08-05 2016-06-28 Avago Technologies General Ip (Singapore) Pte. Ltd. System and method of hinted cache data removal
CN103491075B (zh) * 2013-09-09 2016-07-06 中国科学院计算机网络信息中心 动态调整dns递归服务器缓存资源记录的方法和系统
KR102147356B1 (ko) * 2013-09-30 2020-08-24 삼성전자 주식회사 캐시 메모리 시스템 및 그 동작방법
US9418019B2 (en) * 2013-12-31 2016-08-16 Samsung Electronics Co., Ltd. Cache replacement policy methods and systems
CN104090852B (zh) * 2014-07-03 2017-04-05 华为技术有限公司 管理混合缓存的方法及设备
CN104572491B (zh) * 2014-12-30 2017-10-17 华为技术有限公司 一种基于固态硬盘的读缓存管理方法及装置
CN104572528A (zh) * 2015-01-27 2015-04-29 东南大学 一种二级Cache对访问请求的处理方法及系统
CN104994152B (zh) * 2015-06-30 2018-11-09 中国科学院计算技术研究所 一种Web协同缓存系统和方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7143205B2 (en) * 2001-06-18 2006-11-28 Renesas Technology Corp. DMA controller having a trace buffer
CN102945207A (zh) * 2012-10-26 2013-02-27 浪潮(北京)电子信息产业有限公司 一种块级数据的缓存管理方法及系统
CN103268292A (zh) * 2013-06-13 2013-08-28 江苏大学 一种延长非易失外存寿命的方法及高速长寿外存系统
CN104239233A (zh) * 2014-09-19 2014-12-24 华为技术有限公司 缓存管理方法、缓存管理装置和缓存管理设备

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254893A (zh) * 2020-02-13 2021-08-13 百度在线网络技术(北京)有限公司 一种身份校验方法、装置、电子设备及存储介质
CN113254893B (zh) * 2020-02-13 2023-09-19 百度在线网络技术(北京)有限公司 一种身份校验方法、装置、电子设备及存储介质
CN111339143A (zh) * 2020-02-27 2020-06-26 郑州阿帕斯数云信息科技有限公司 数据缓存方法、装置及云服务器
CN111339143B (zh) * 2020-02-27 2023-04-25 郑州阿帕斯数云信息科技有限公司 数据缓存方法、装置及云服务器
CN113098973A (zh) * 2021-04-13 2021-07-09 鹏城实验室 包级别网内数据传输方法、系统、存储介质及终端设备
CN113098973B (zh) * 2021-04-13 2022-05-20 鹏城实验室 包级别网内数据传输方法、系统、存储介质及终端设备
CN117149836A (zh) * 2023-10-27 2023-12-01 联通在线信息科技有限公司 一种缓存处理方法和装置
CN117149836B (zh) * 2023-10-27 2024-02-27 联通在线信息科技有限公司 一种缓存处理方法和装置

Also Published As

Publication number Publication date
CN112214420A (zh) 2021-01-12
CN112231242A (zh) 2021-01-15
CN107430551B (zh) 2020-10-23
CN107430551A (zh) 2017-12-01

Similar Documents

Publication Publication Date Title
WO2017091984A1 (zh) 数据缓存方法、存储控制装置、及存储设备
US10133679B2 (en) Read cache management method and apparatus based on solid state drive
TWI684099B (zh) 剖析快取替代
US11061572B2 (en) Memory object tagged memory monitoring method and system
US20180107593A1 (en) Information processing system, storage control apparatus, storage control method, and storage control program
US20110276623A1 (en) File bundling for cache servers of content delivery networks
US9591096B2 (en) Computer system, cache control method, and server
EP2711841A1 (en) Data processing method, device and system based on block storage
US11163684B1 (en) Systems and methods that predictively read ahead different amounts of data for different content stored in a multi-client storage system
US8510510B1 (en) File cache optimization using element prioritization
WO2015039352A1 (zh) 缓存数据的方法和存储系统
WO2015180493A1 (zh) 存储数据的处理方法、装置和系统
CN109582649B (zh) 一种元数据存储方法、装置、设备及可读存储介质
US7660964B2 (en) Windowing external block translations
CN110908965A (zh) 一种对象存储管理方法、装置、设备及存储介质
WO2020063355A1 (zh) 数据块的缓存方法、装置、计算机设备及计算机可读存储介质
US9021208B2 (en) Information processing device, memory management method, and computer-readable recording medium
KR20150083728A (ko) 디스크 캐시 제어 장치 및 방법
WO2016206070A1 (zh) 一种文件更新方法及存储设备
CN115470157A (zh) 预取方法、电子设备、存储介质及程序产品
US20150212949A1 (en) Storage control device and storage control method
CN109582233A (zh) 一种数据的缓存方法和装置
JP2011191856A (ja) ファイルキャッシュの管理方法、ファイルキャッシュ装置、及び、プログラム
US8433694B1 (en) File cache optimization using element de-prioritization
CN115794366A (zh) 一种内存预取方法及装置

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

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

Country of ref document: EP

Kind code of ref document: A1