CN110007867B - Cache space allocation method, device, equipment and storage medium - Google Patents

Cache space allocation method, device, equipment and storage medium Download PDF

Info

Publication number
CN110007867B
CN110007867B CN201910290947.3A CN201910290947A CN110007867B CN 110007867 B CN110007867 B CN 110007867B CN 201910290947 A CN201910290947 A CN 201910290947A CN 110007867 B CN110007867 B CN 110007867B
Authority
CN
China
Prior art keywords
cache space
storage volume
storage
cache
shared
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910290947.3A
Other languages
Chinese (zh)
Other versions
CN110007867A (en
Inventor
刘兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910290947.3A priority Critical patent/CN110007867B/en
Publication of CN110007867A publication Critical patent/CN110007867A/en
Application granted granted Critical
Publication of CN110007867B publication Critical patent/CN110007867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

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

Abstract

The invention discloses a cache space allocation method, which is applied to a storage platform, wherein the storage platform comprises a plurality of storage volumes, the storage platform allocates corresponding dedicated cache spaces for the storage volumes with set priorities in advance, and the storage volumes of the storage platform can use shared cache spaces except the dedicated cache spaces; the method comprises the following steps: receiving a cache application sent by a first storage volume; determining a cache space allocated to the first storage volume in the shared cache space according to the priority of the first storage volume; the first storage volume is assigned the determined cache space assigned to the first storage volume. By applying the technical scheme provided by the embodiment of the invention, the corresponding cache space is allocated to the storage volume in the shared cache space according to the priority of the storage volume so as to reasonably allocate the cache space and ensure the stability of core application. The invention also discloses a cache space distribution device, equipment and a storage medium, and has corresponding technical effects.

Description

Cache space allocation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a method, an apparatus, a device, and a storage medium for allocating a cache space.
Background
With the rapid development of computer technology, storage platforms are applied more and more widely in various industries. The storage platform comprises a plurality of storage volumes, each storage volume can bear one or more applications, and the cache space of the storage platform is shared. As shown in fig. 1, the storage platform includes a storage volume # a and a storage volume # B, the storage volume # a carries server a applications through the interface CA for low input/output loads, and the storage volume # B carries server B and server C applications through the interface CA for high input/output loads.
At present, most storage platforms allocate a cache space for each storage volume according to the load condition of the storage volume, as shown in fig. 2, the size of the cache space is fixed, and both the storage volume # a and the storage volume # B can use the whole cache space.
The allocation formula has certain disadvantages, and a storage volume with high performance requirement may not use the allocated cache space to achieve the performance required by the storage volume enough, while a storage volume with low performance requirement may use the allocated cache space to achieve a performance far higher than the performance requirement of the storage volume, so that the allocation of the cache space is unreasonable, and the stability of the core application cannot be ensured.
Disclosure of Invention
The invention aims to provide a cache space distribution method, a cache space distribution device, cache space distribution equipment and a storage medium, so that the cache space is reasonably distributed and the stability of core application is ensured.
In order to solve the technical problems, the invention provides the following technical scheme:
a cache space allocation method is applied to a storage platform, the storage platform comprises a plurality of storage volumes, the storage platform allocates corresponding dedicated cache spaces for the storage volumes with set priorities in advance, and the storage volumes of the storage platform can use shared cache spaces except the dedicated cache spaces; the method comprises the following steps:
receiving a cache application sent by a first storage volume;
determining a cache space allocated to the first storage volume in the shared cache space according to the priority of the first storage volume;
allocating the determined cache space allocated to the first storage volume.
In a specific embodiment of the present invention, the determining, by using a cache application that carries an application cache size and according to a priority of the first storage volume, a cache space allocated to the first storage volume in the shared cache space includes:
If the priority of the first storage volume is the highest priority, determining the cache space of the applied cache size in the shared cache space as the cache space allocated to the first storage volume;
if the priority of the first storage volume is not the highest priority, determining whether the size of the residual cache space of the shared cache space is larger than or equal to the application cache size;
if the request size is larger than or equal to the first storage volume, determining the cache space applying the cache size in the shared cache space as the cache space allocated to the first storage volume;
if so, determining whether a storage volume with a priority lower than that of the first storage volume exists in the storage volumes using the shared cache space;
if the shared cache space exists, after the cache space allocated to the storage volume with the priority lower than that of the first storage volume is reduced, determining the residual cache space of the shared cache space as the cache space allocated to the first storage volume;
and if the shared cache space does not exist, directly executing the step of determining the residual cache space of the shared cache space as the cache space allocated to the first storage volume.
In one embodiment of the present invention, the method further comprises:
when a set spatial adjustment triggering condition is reached, obtaining the average response time of the first storage volume;
and determining whether to adjust the cache space allocated to the first storage volume in the shared cache space according to the average response time and a preset target response time of the first storage volume.
In a specific embodiment of the present invention, the determining whether to adjust a cache space allocated to the first storage volume in the shared cache space according to the average response time and a preset target response time of the first storage volume includes:
and if the difference value between the average response time and the preset target response time of the first storage volume is larger than a set first threshold value, determining to increase the cache space allocated to the first storage volume in the shared cache space.
In a specific embodiment of the present invention, the determining whether to adjust a cache space allocated to the first storage volume in the shared cache space according to the average response time and a preset target response time of the first storage volume includes:
And if the difference value between the preset target response time of the first storage volume and the average response time is larger than a set second threshold value, determining to reduce the cache space allocated to the first storage volume in the shared cache space.
In a specific embodiment of the present invention, after determining to increase the cache space allocated to the first storage volume in the shared cache space, the method further includes:
and increasing the cache space allocated to the first storage volume in the shared cache space according to a set step size.
In a specific embodiment of the present invention, after determining to increase the cache space allocated to the first storage volume in the shared cache space, the method further includes:
determining whether the size of the remaining cache space of the shared cache space is larger than a set third threshold;
if so, increasing the cache space allocated to the first storage volume in the shared cache space;
if the number of the storage volumes is less than or equal to the first storage volume, determining whether a storage volume with lower priority than the first storage volume exists in the storage volumes using the shared cache space;
if the shared cache space exists, reducing the cache space allocated to the storage volume using the shared cache space with the priority lower than the priority of the first storage volume, and repeatedly executing the step of determining whether the size of the residual cache space of the shared cache space is larger than a set third threshold value.
A buffer memory space distribution device is applied to a storage platform, the storage platform comprises a plurality of storage volumes, the storage platform distributes corresponding dedicated buffer memory spaces for the storage volumes with set priorities in advance, and the storage volumes of the storage platform can use shared buffer memory spaces except the dedicated buffer memory spaces; the device comprises:
the cache application receiving module is used for receiving a cache application sent by a first storage volume;
a cache space determining module, configured to determine, according to the priority of the first storage volume, a cache space allocated to the first storage volume in the shared cache space;
and the cache space allocation module is used for allocating the determined cache space allocated to the first storage volume.
A cache space allocation device is applied to a storage platform, wherein the storage platform comprises a plurality of storage volumes, the storage platform allocates corresponding dedicated cache spaces for the storage volumes with set priorities in advance, and the storage volumes of the storage platform can use shared cache spaces except the dedicated cache spaces; the method comprises the following steps:
a memory for storing a computer program;
a processor, configured to implement the steps of any of the above-mentioned cache space allocation methods when the computer program is executed.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the above described cache space allocation methods.
By applying the technical scheme provided by the embodiment of the invention, when the cache application sent by the first storage volume is received, the cache space allocated to the first storage volume in the shared cache space is determined according to the priority of the first storage volume, and the cache space allocated to the first storage volume is allocated to the first storage volume. And distributing corresponding cache spaces for the storage volumes in the shared cache space according to the priorities of the storage volumes so as to reasonably distribute the cache spaces and ensure the stability of the core application.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a prior art storage platform;
FIG. 2 is a diagram illustrating a cache space allocation result in the prior art;
FIG. 3 is a diagram illustrating a cache space allocation result according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an implementation of a method for allocating cache space according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an apparatus for allocating cache space according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a buffer space allocation apparatus according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a cache space allocation method, which can be applied to a storage platform, wherein the storage platform comprises a plurality of storage volumes, each storage volume can bear one or more applications, and the priority of each storage volume can be preset according to different performance requirements of the borne applications. The storage platform may pre-allocate a corresponding dedicated cache space for each storage volume with a set priority, and each storage volume of the storage platform may use a shared cache space other than the dedicated cache space.
That is, the cache space of the storage platform can be divided into a dedicated cache space and a shared cache space, the dedicated cache space is pre-allocated to each storage volume with a set priority, other storage volumes cannot be used, and the shared cache space can be used by all storage volumes of the storage platform.
For example, the storage volumes of the storage platform have four priorities, which are a first priority, a second priority, a third priority and a fourth priority according to the priorities, wherein there are two storage volumes of the first priority, three storage volumes of the second priority, five storage volumes of the third priority and eight storage volumes of the fourth priority. The method comprises the steps that a 1GByte cache space is pre-allocated to a storage volume A with a first priority, a 2GByte cache space is pre-allocated to a storage volume B with the first priority, the two cache spaces are exclusive cache spaces, and other storage volumes cannot be used. The other cache spaces except the two cache spaces are shared cache spaces, and all the storage volumes can be used.
As shown in fig. 3, the cache space only for the storage volume # a is the exclusive cache space of the storage volume # a, the storage volume # B is not available, and the storage volumes # a and # B can be used in the shared cache space except the exclusive cache space.
The size of the specific exclusive cache space may be allocated according to an actual situation, which is not limited in this embodiment of the present invention. Different priorities represent different service levels of the storage volume.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 4, an implementation flowchart of a cache space allocation method according to an embodiment of the present invention is shown, where the method includes the following steps:
s410: and receiving a cache application sent by the first storage volume.
The first storage volume may be any one of the storage volumes in the storage platform. When the application borne by the first storage volume performs service processing, a cache application needs to be performed on the storage platform.
When the caching application sent by the first storage volume is received, the operation of step S120 may be continuously performed.
S420: and determining the cache space allocated to the first storage volume in the shared cache space according to the priority of the first storage volume.
In the embodiment of the invention, each storage volume of the storage platform has a certain priority. When a caching application sent by a first storage volume is received, the caching space allocated to the first storage volume in the shared caching space can be determined according to the priority of the first storage volume. The higher the priority of a storage volume, the more cache space allocated to that storage volume to achieve high performance for that storage volume.
In a specific embodiment of the present invention, the cache application may carry an application cache size, and step S420 may include the following steps:
The method comprises the following steps: if the priority of the first storage volume is the highest priority, determining the cache space applying for the cache size in the shared cache space as the cache space allocated to the first storage volume;
step two: if the priority of the first storage volume is not the highest priority, determining whether the size of the residual cache space of the shared cache space is larger than or equal to the application cache size; if the value is larger than or equal to the preset value, executing a third step, and if the value is smaller than the preset value, executing a fourth step;
step three: determining a cache space applying for the cache size in the shared cache space as a cache space allocated to the first storage volume;
step four: determining whether a storage volume with a priority lower than that of the first storage volume exists in the storage volumes using the shared cache space; if yes, executing step five, and if not, executing step six;
step five: after reducing the cache space allocated to the storage volume with the priority lower than that of the first storage volume, determining the residual cache space of the shared cache space as the cache space allocated to the first storage volume;
step six: and directly determining the residual cache space of the shared cache space as the cache space allocated to the first storage volume.
For convenience of description, the above six steps are combined for illustration.
In the embodiment of the invention, the cache application carries the application cache size. The available cache can be used for the storage volume with the highest priority at will without limitation, the higher the priority of the storage volume is, the higher the required performance of the storage volume is, if the storage volume with low priority has to share the cache resource with the storage volume with high priority, the storage volume with low priority needs to receive the performance limitation. The lowest priority storage volume does not require high performance and does not allow the use of a cache for the higher priority storage volume.
If the priority of the first storage volume is the highest priority, the performance requirement of the first storage volume is highest, a larger cache space needs to be allocated to the first storage volume, and the cache space applying for the cache size in the shared cache space can be determined as the cache space allocated to the first storage volume. If the size of the remaining cache space of the shared cache space is smaller than the application cache size, the cache space allocated to other storage volumes with low priority can be reduced, so that the size of the remaining cache space is larger than or equal to the application cache size, and the cache space with the application cache size is allocated to the first storage volume.
If the priority of the first storage volume is not the highest priority, it may be determined whether the size of the remaining cache space of the shared cache space is greater than or equal to the application cache size.
If the cache space is larger than or equal to the first storage volume, the cache space applying for the cache size in the shared cache space can be directly determined as the cache space allocated to the first storage volume.
If so, it may be further determined whether there is a storage volume of the storage volumes that uses the shared cache space that has a lower priority than the first storage volume.
If the shared cache space exists, the cache space allocated to the storage volume with the priority lower than that of the first storage volume may be reduced, specifically, the corresponding cache space may be reduced from the storage volume with the lowest priority until the size of the remaining cache space of the shared cache space is equal to the application cache size, or after the cache space of the storage volume with the priority lower than that of the first storage volume is reduced to zero, the remaining cache space of the shared cache space is determined as the cache space allocated to the first storage volume.
If not, the remaining cache space of the shared cache space may be directly determined as the cache space allocated to the first storage volume.
The buffer space is allocated to the first storage volume to the maximum extent, so that the performance of the storage volume with the priority higher than that of the first storage volume can be prevented from being influenced, and the performance of the first storage volume can be improved as much as possible.
S430: and allocating the determined cache space allocated to the first storage volume.
After determining the cache space allocated to the first storage volume in the shared cache space in step S420, the cache space determined to be allocated to the first storage volume may be allocated to the first storage volume, so that the application carried on the first storage volume may perform corresponding service processing using the allocated cache space.
By applying the method provided by the embodiment of the invention, when the cache application sent by the first storage volume is received, the cache space allocated to the first storage volume in the shared cache space is determined according to the priority of the first storage volume, and the cache space determined to be allocated to the first storage volume is allocated to the first storage volume. And distributing corresponding cache spaces for the storage volumes in the shared cache space according to the priorities of the storage volumes so as to reasonably distribute the cache spaces and ensure the stability of the core application.
In one embodiment of the invention, the method may further comprise the steps of:
The first step is as follows: when a set spatial adjustment triggering condition is reached, obtaining the average response time of the first storage volume;
the second step is that: and determining whether to adjust the cache space allocated to the first storage volume in the shared cache space according to the average response time and the preset target response time of the first storage volume.
For convenience of description, the above two steps are combined for illustration.
In the embodiment of the invention, when the storage volume has a cache application, the storage volume can use the cache space allocated to the storage volume after allocating the corresponding cache space to the storage volume according to the priority of the storage volume.
The performance of the storage volume can be monitored during the process that the storage volume uses the cache space. The spatial adjustment triggering condition may be preset, for example, when the adjustment instruction is received, the spatial adjustment triggering condition is considered to be reached, or when the set time interval is reached, the spatial adjustment triggering condition is considered to be reached.
When the set spatial adjustment trigger condition is reached, the average response time of the first storage volume may be obtained. The average response time of a storage volume is the average of the read and write response times of the storage volume, which can characterize the actual performance of the storage volume.
In practical applications, a target response time may be set in advance for each storage volume according to the performance required by the application hosted on the storage volume. The valid range of target response times may be: 0 millisecond to 10000 milliseconds.
According to the average response time and the preset target response time of the first storage volume, whether the cache space allocated to the first storage volume is adjusted in the shared cache space can be determined.
In an embodiment of the present invention, the second step may include the steps of:
specifically, if the difference between the average response time and the preset target response time of the first storage volume is greater than a set first threshold, it may be determined that the cache space allocated to the first storage volume is added to the shared cache space;
if the difference between the preset target response time and the average response time of the first storage volume is larger than the set second threshold, it may be determined that the cache space allocated to the first storage volume is reduced in the shared cache space.
It is understood that the target response time is preset according to the performance required by the application carried on the storage volume, and if the target response time can be reached during the working process, the storage volume indicates that the required performance can be reached.
Therefore, if the difference between the average response time and the target response time of the first storage volume is greater than the set first threshold, indicating that the current first storage volume fails to meet the corresponding performance requirement, it may be determined to increase the cache space allocated to the first storage volume in the shared cache space, so that the first storage volume may use more cache space, and may be closer to the performance requirement.
If the difference between the target response time and the average response time of the first storage volume is greater than the set second threshold, it indicates that the performance of the current first storage volume exceeds the corresponding performance requirement, and it may be determined to reduce the cache space allocated to the first storage volume in the shared cache space, so as to save the cache space for other storage volumes.
The first threshold and the second threshold may be set and adjusted according to actual conditions, which is not limited in the embodiment of the present invention.
In an embodiment of the present invention, after determining to increase the cache space allocated to the first storage volume in the shared cache space, the cache space allocated to the first storage volume may be increased in the shared cache space according to a set step size, for example, according to a step size of 100 MByte. The setting and the adjustment can be specifically carried out according to the actual situation, and different step lengths can be set for storage volumes with different priorities.
In an embodiment of the present invention, after determining to add the cache space allocated to the first storage volume in the shared cache space, the method may further include the following steps:
the method comprises the following steps: determining whether the size of the residual cache space of the shared cache space is larger than a set third threshold value; if yes, executing the step two; if the number of the first step is less than or equal to the number of the second step, executing a third step;
step two: increasing a cache space allocated to the first storage volume in the shared cache space;
step three: determining whether a storage volume with a lower priority than the first storage volume exists in the storage volumes using the shared cache space; if yes, executing step four;
step four: and reducing the cache space allocated to the storage volume using the shared cache space with the priority lower than that of the first storage volume, and repeatedly executing the operation of determining whether the size of the residual cache space of the shared cache space is larger than the set third threshold value in the step one.
After determining that the cache space allocated to the first storage volume is added to the shared cache space, it may be determined whether the size of the remaining cache space of the shared cache space is greater than a set third threshold, and the third threshold may be set and adjusted according to an actual situation.
If the first storage volume is larger than the second storage volume, the size of the remaining cache space is enough to increase the cache space for the first storage volume, and the cache space allocated to the first storage volume can be increased in the shared cache space.
If the size of the remaining cache space is less than or equal to the size of the first storage volume, it is indicated that the size of the remaining cache space is insufficient to increase the cache space for the first storage volume.
If the shared cache space exists, the cache space allocated to the storage volume using the shared cache space with the priority lower than that of the first storage volume may be reduced, and specifically, the cache space may be reduced according to a set step size. After the reduction, the operation of determining whether the size of the remaining cache space of the shared cache space is larger than the set third threshold is repeatedly performed.
If the shared cache space does not exist, the fact that the cache space allocated to the first storage volume cannot be increased in the shared cache space currently is indicated, and corresponding judgment can be carried out when the set space adjustment triggering condition is reached again. And dynamically adjusting the cache allocation according to the performance monitoring result.
The automatic cache allocation of the embodiment of the invention can allocate larger cache space for the high-priority storage volume, so that the high-priority storage volume can obtain larger bandwidth and realize shorter average response time close to target response time. By applying the technical scheme provided by the embodiment of the invention, a plurality of applications with different I/O performance requirements can be integrated into one storage platform, so that one storage platform can simultaneously meet the requirements of various service performances, and the storage platform has wider adaptability.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a cache space allocation apparatus, which is applied to a storage platform, where the storage platform includes a plurality of storage volumes, the storage platform allocates corresponding dedicated cache spaces in advance for the storage volumes with set priorities, and each storage volume of the storage platform can use a shared cache space except the dedicated cache space; a buffer space allocation apparatus described below and a buffer space allocation method described above may be referred to in correspondence with each other.
Referring to fig. 5, the apparatus includes the following modules:
a cache application receiving module 510, configured to receive a cache application sent by a first storage volume;
a cache space determining module 520, configured to determine, according to the priority of the first storage volume, a cache space allocated to the first storage volume in the shared cache space;
a cache space allocation module 530 configured to allocate the determined cache space allocated to the first storage volume.
By applying the device provided by the embodiment of the invention, when the cache application sent by the first storage volume is received, the cache space allocated to the first storage volume in the shared cache space is determined according to the priority of the first storage volume, and the cache space determined to be allocated to the first storage volume is allocated to the first storage volume. And distributing corresponding cache spaces for the storage volumes in the shared cache space according to the priorities of the storage volumes so as to reasonably distribute the cache spaces and ensure the stability of the core application.
In a specific embodiment of the present invention, the cache application carries an application cache size, and the cache space determining module 520 is specifically configured to:
if the priority of the first storage volume is the highest priority, determining the cache space applying for the cache size in the shared cache space as the cache space allocated to the first storage volume;
if the priority of the first storage volume is not the highest priority, determining whether the size of the residual cache space of the shared cache space is larger than or equal to the application cache size;
if the cache size is larger than or equal to the first storage volume, determining the cache space applying the cache size in the shared cache space as the cache space allocated to the first storage volume;
if so, determining whether a storage volume with a priority lower than that of the first storage volume exists in the storage volumes using the shared cache space;
if the cache space is smaller than the priority of the first storage volume, determining the residual cache space of the shared cache space as the cache space allocated to the first storage volume after reducing the cache space allocated to the storage volume with the priority lower than the priority of the first storage volume;
if not, the step of determining the remaining cache space of the shared cache space as the cache space allocated to the first storage volume is directly performed.
In a specific embodiment of the present invention, the apparatus further includes a buffer space adjusting module, configured to:
when a set spatial adjustment triggering condition is reached, obtaining the average response time of the first storage volume;
and determining whether to adjust the cache space allocated to the first storage volume in the shared cache space according to the average response time and the preset target response time of the first storage volume.
In a specific embodiment of the present invention, the cache space adjusting module is specifically configured to:
and if the difference value between the average response time and the preset target response time of the first storage volume is larger than a set first threshold value, determining to increase the cache space allocated to the first storage volume in the shared cache space.
In a specific embodiment of the present invention, the cache space adjusting module is specifically configured to:
and if the difference value between the preset target response time and the average response time of the first storage volume is larger than a set second threshold value, determining to reduce the cache space allocated to the first storage volume in the shared cache space.
In a specific embodiment of the present invention, the cache space adjusting module is further configured to:
after determining that the cache space allocated to the first storage volume is added to the shared cache space, adding the cache space allocated to the first storage volume to the shared cache space according to the set step size.
In a specific embodiment of the present invention, the cache space adjusting module is further configured to:
after determining that the cache space allocated to the first storage volume is added to the shared cache space, determining whether the size of the remaining cache space of the shared cache space is larger than a set third threshold;
if so, increasing the cache space allocated to the first storage volume in the shared cache space;
if the priority is less than or equal to the first storage volume, determining whether a storage volume with lower priority than the first storage volume exists in the storage volumes using the shared cache space;
and if so, reducing the cache space allocated to the storage volume using the shared cache space and having the priority lower than that of the first storage volume, and repeatedly executing the step of determining whether the size of the residual cache space of the shared cache space is larger than the set third threshold.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a cache space allocation apparatus, which is applied to a storage platform, where the storage platform includes a plurality of storage volumes, the storage platform allocates corresponding dedicated cache spaces in advance for the storage volumes with set priorities, and each storage volume of the storage platform can use a shared cache space except the dedicated cache space; as shown in fig. 6, the apparatus includes:
A memory 610 for storing a computer program;
the processor 620 is configured to implement the steps of the above-described buffer space allocation method when executing the computer program.
Corresponding to the above method embodiments, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above cache space allocation method are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The principle and the implementation of the present invention are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (9)

1. A cache space allocation method is characterized in that the method is applied to a storage platform, the storage platform comprises a plurality of storage volumes, the storage platform allocates corresponding dedicated cache spaces for the storage volumes with set priorities in advance, and the storage volumes of the storage platform can use shared cache spaces except the dedicated cache spaces; the method comprises the following steps:
Receiving a cache application sent by a first storage volume;
determining a cache space allocated to the first storage volume in the shared cache space according to the priority of the first storage volume;
allocating the cache space determined to be allocated to the first storage volume;
wherein the determining, according to the priority of the first storage volume, a cache space allocated to the first storage volume in the shared cache space, which carries an application cache size in the cache application, includes:
if the priority of the first storage volume is the highest priority, determining the cache space of the applied cache size in the shared cache space as the cache space allocated to the first storage volume;
if the priority of the first storage volume is not the highest priority, determining whether the size of the residual cache space of the shared cache space is larger than or equal to the application cache size;
if the request size is larger than or equal to the first storage volume, determining the cache space applying the cache size in the shared cache space as the cache space allocated to the first storage volume;
if so, determining whether a storage volume with a priority lower than that of the first storage volume exists in the storage volumes using the shared cache space;
If the shared cache space exists, after reducing the cache space allocated to the storage volume with the priority lower than that of the first storage volume, determining the residual cache space of the shared cache space as the cache space allocated to the first storage volume;
and if the shared cache space does not exist, directly executing the step of determining the residual cache space of the shared cache space as the cache space allocated to the first storage volume.
2. The method of claim 1, further comprising:
when a set spatial adjustment triggering condition is reached, obtaining the average response time of the first storage volume;
and determining whether to adjust the cache space allocated to the first storage volume in the shared cache space according to the average response time and a preset target response time of the first storage volume.
3. The method of claim 2, wherein the determining whether to adjust the cache space allocated to the first storage volume in the shared cache space according to the average response time and a preset target response time of the first storage volume comprises:
and if the difference value between the average response time and the preset target response time of the first storage volume is larger than a set first threshold value, determining to increase the cache space allocated to the first storage volume in the shared cache space.
4. The method of claim 2, wherein the determining whether to adjust the cache space allocated to the first storage volume in the shared cache space according to the average response time and a preset target response time of the first storage volume comprises:
and if the difference value between the preset target response time of the first storage volume and the average response time is larger than a set second threshold value, determining to reduce the cache space allocated to the first storage volume in the shared cache space.
5. The method of claim 3, further comprising, after the determining to increase the cache space allocated to the first storage volume in the shared cache space:
and increasing the cache space allocated to the first storage volume in the shared cache space according to a set step size.
6. The method of claim 3, further comprising, after the determining to increase the cache space allocated to the first storage volume in the shared cache space:
determining whether the size of the remaining cache space of the shared cache space is larger than a set third threshold;
If so, increasing the cache space allocated to the first storage volume in the shared cache space;
if the number of the storage volumes is less than or equal to the first storage volume, determining whether a storage volume with lower priority than the first storage volume exists in the storage volumes using the shared cache space;
if the shared cache space exists, reducing the cache space allocated to the storage volume using the shared cache space with the priority lower than the priority of the first storage volume, and repeatedly executing the step of determining whether the size of the residual cache space of the shared cache space is larger than a set third threshold value.
7. A cache space allocation device is characterized in that the device is applied to a storage platform, the storage platform comprises a plurality of storage volumes, the storage platform allocates corresponding dedicated cache spaces for the storage volumes with set priorities in advance, and the storage volumes of the storage platform can use shared cache spaces except the dedicated cache spaces; the device comprises:
the cache application receiving module is used for receiving a cache application sent by a first storage volume;
a cache space determining module, configured to determine, according to the priority of the first storage volume, a cache space allocated to the first storage volume in the shared cache space;
A cache space allocation module configured to allocate the determined cache space allocated to the first storage volume;
wherein the determining, according to the priority of the first storage volume, a cache space allocated to the first storage volume in the shared cache space, which carries an application cache size in the cache application, includes:
if the priority of the first storage volume is the highest priority, determining the cache space of the applied cache size in the shared cache space as the cache space allocated to the first storage volume;
if the priority of the first storage volume is not the highest priority, determining whether the size of the residual cache space of the shared cache space is larger than or equal to the application cache size;
if the request size is larger than or equal to the first storage volume, determining the cache space applying the cache size in the shared cache space as the cache space allocated to the first storage volume;
if so, determining whether a storage volume with a priority lower than that of the first storage volume exists in the storage volumes using the shared cache space;
if the shared cache space exists, after reducing the cache space allocated to the storage volume with the priority lower than that of the first storage volume, determining the residual cache space of the shared cache space as the cache space allocated to the first storage volume;
And if the shared cache space does not exist, directly executing the step of determining the residual cache space of the shared cache space as the cache space allocated to the first storage volume.
8. The equipment for allocating the cache space is characterized by being applied to a storage platform, wherein the storage platform comprises a plurality of storage volumes, the storage platform allocates corresponding special cache spaces for the storage volumes with set priorities in advance, and the storage volumes of the storage platform can use shared cache spaces except the special cache spaces; the apparatus comprises:
a memory for storing a computer program;
a processor for implementing the steps of the method of allocating cache space according to any one of claims 1 to 6 when executing said computer program.
9. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for allocating cache space according to any one of claims 1 to 6.
CN201910290947.3A 2019-04-11 2019-04-11 Cache space allocation method, device, equipment and storage medium Active CN110007867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910290947.3A CN110007867B (en) 2019-04-11 2019-04-11 Cache space allocation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910290947.3A CN110007867B (en) 2019-04-11 2019-04-11 Cache space allocation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110007867A CN110007867A (en) 2019-07-12
CN110007867B true CN110007867B (en) 2022-08-12

Family

ID=67171243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910290947.3A Active CN110007867B (en) 2019-04-11 2019-04-11 Cache space allocation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110007867B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688379B (en) * 2019-09-19 2022-04-29 苏州浪潮智能科技有限公司 Data storage method, system, storage medium and electronic equipment
CN111723057B (en) * 2020-05-28 2023-07-14 广东浪潮大数据研究有限公司 File pre-reading method, device, equipment and storage medium
CN112560802A (en) * 2021-01-24 2021-03-26 中天恒星(上海)科技有限公司 Data processing method and system for distributable data storage library

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104426790A (en) * 2013-08-26 2015-03-18 中兴通讯股份有限公司 Method and device for carrying out distribution control on cache space with multiple queues
CN106095337A (en) * 2016-06-07 2016-11-09 国云科技股份有限公司 A kind of cloud disk based on SAN network storage is quickly shared method
CN106789729A (en) * 2016-12-13 2017-05-31 华为技术有限公司 Buffer memory management method and device in a kind of network equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104426790A (en) * 2013-08-26 2015-03-18 中兴通讯股份有限公司 Method and device for carrying out distribution control on cache space with multiple queues
CN106095337A (en) * 2016-06-07 2016-11-09 国云科技股份有限公司 A kind of cloud disk based on SAN network storage is quickly shared method
CN106789729A (en) * 2016-12-13 2017-05-31 华为技术有限公司 Buffer memory management method and device in a kind of network equipment

Also Published As

Publication number Publication date
CN110007867A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
CN110007867B (en) Cache space allocation method, device, equipment and storage medium
CN108667748B (en) Method, device, equipment and storage medium for controlling bandwidth
CN112131006A (en) Service request distribution method, device, computer equipment and storage medium
CN105335231B (en) server thread dynamic allocation method and device
CN110297698B (en) Multi-priority dynamic current limiting method, device, server and storage medium
CN105791254B (en) Network request processing method and device and terminal
US11899939B2 (en) Read/write request processing method and apparatus, electronic device, and storage medium
CN110661654B (en) Network bandwidth resource allocation method, device, equipment and readable storage medium
CN110244901B (en) Task allocation method and device and distributed storage system
CN111309644B (en) Memory allocation method and device and computer readable storage medium
CN111723057A (en) File pre-reading method, device, equipment and storage medium
CN109788325B (en) Video task allocation method and server
CN114385370B (en) Memory allocation method, system, device and medium
CN111176833A (en) Task allocation method and system for multiprocessing nodes
US20090172693A1 (en) Assigning work to a processing entity according to non-linear representations of loadings
EP3672203A1 (en) Distribution method for distributed data computing, device, server and storage medium
CN113760549A (en) Pod deployment method and device
US20090135721A1 (en) Scheduler
CN110557344B (en) Method for configuring identification information of QoS flow and network equipment
CN112188500A (en) Dynamic allocation method and device for frequency spectrum resources
CN115514992A (en) HDMI data transmission method, system, terminal and storage medium
CN111813564B (en) Cluster resource management method and device and container cluster management system
CN112256420B (en) Task allocation method and device and electronic equipment
CN110955522B (en) Resource management method and system for coordination performance isolation and data recovery optimization
CN111984406A (en) Method, device and equipment for distributing CPU (Central processing Unit) resources in management process of virtualization platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant