CN110908604B - Request processing delay adjusting method and device, electronic equipment and storage medium - Google Patents

Request processing delay adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110908604B
CN110908604B CN201911089823.5A CN201911089823A CN110908604B CN 110908604 B CN110908604 B CN 110908604B CN 201911089823 A CN201911089823 A CN 201911089823A CN 110908604 B CN110908604 B CN 110908604B
Authority
CN
China
Prior art keywords
gear
request processing
time delay
processing time
ratio
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
CN201911089823.5A
Other languages
Chinese (zh)
Other versions
CN110908604A (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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201911089823.5A priority Critical patent/CN110908604B/en
Publication of CN110908604A publication Critical patent/CN110908604A/en
Application granted granted Critical
Publication of CN110908604B publication Critical patent/CN110908604B/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/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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The application discloses a request processing time delay adjusting method, different gears are obtained by pre-dividing according to the ratio, different request processing time delays are set for each gear, a cache disk can determine the gear at which the cache disk is currently located according to the actual situation of the current ratio of the cache disk, and the request processing time delay which is most suitable for the current situation of the cache disk is selected. The application also discloses a request processing time delay adjusting device, electronic equipment and a readable storage medium, and the device has the beneficial effects.

Description

Request processing delay adjusting method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of distributed storage, and in particular, to a method and an apparatus for adjusting request processing latency, an electronic device, and a readable storage medium.
Background
In a distributed storage system based on an SSD + HDD hardware storage structure, an SSD disk with faster read-write performance is used as a cache disk (cache) and an HDD disk is used as a data disk (OSD), so that the aims of improving the data read-write performance and reducing the read-write operation delay are fulfilled.
For convenience of reading and writing, data sent by an upper layer is usually stored in an SSD disk first, and then is flushed down to an HDD disk for large-capacity storage in a periodical flushing manner. However, the SSD disk cannot flush data from the HDD disk while processing the read-write request of the upper layer, and the SSD disk has a poor speed of processing the read-write request and flushing the data, so that the SSD disk with a very limited capacity is easily full without management and control, thereby affecting the entire distributed storage system.
Therefore, how to reduce the occurrence probability of the full-written condition of the SSD as much as possible and prolong the time interval between two consecutive full-written conditions of the SSD is a problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a request processing delay adjusting method, a request processing delay adjusting device, electronic equipment and a readable storage medium, and aims to reduce the occurrence probability of the full-written situation of an SSD as much as possible and prolong the time interval of the full-written situation of two adjacent SSDs.
In order to achieve the above object, the present application provides a method for adjusting a request processing delay, including:
acquiring the ratio of the occupied storage space of the cache disk to the total storage space;
determining a target gear of the ratio according to a preset gear dividing mode;
determining a target brushing request processing time delay and a target reading and writing request processing time delay corresponding to the target gear;
and correspondingly processing the brushing request and the read-write request according to the target brushing request processing time delay and the target read-write request processing time delay.
Optionally, before determining the target gear at which the ratio is located according to a preset gear division manner, the method further includes:
dividing a ratio value range from 0 to 1 into three gears, namely a high gear, a medium gear and a low gear in advance according to a three-gear division mode;
setting different brushing request processing time delays and reading and writing request processing time delays for the high gear, the middle gear and the low gear respectively; wherein, the high-gear lower-brushing request processing time delay < the medium-gear lower-brushing request processing time delay < the low-gear lower-brushing request processing time delay, the high-gear read-write request time delay > the medium-gear read-write request processing time delay > the low-gear read-write request processing time delay.
Optionally, setting different brushing request processing time delays and read-write request processing time delays for the high, medium, and low gears respectively includes:
setting basic lower brushing request processing time delay and basic read-write request processing time delay for a low gear;
setting a brushing request weight for the basic brushing request processing delay;
setting a read-write request weight for the basic read-write request processing time delay;
respectively calculating the brushing request processing time delay and the reading and writing request processing time delay corresponding to the middle gear and the high gear by using a weighting calculation method; the sum of the lower-brushing request weight and the read-write request weight of the middle gear and the high gear is unit 1, the lower-brushing request weight of the middle gear is greater than the lower-brushing request weight of the high gear, and the read-write request weight of the middle gear is smaller than the read-write request weight of the high gear.
Optionally, the request processing delay adjustment method,
setting the brush-down request processing time delay of the low gear to be 0.5 s; wherein the ratio being in a low gear is a low gear threshold where the ratio is less than the low gear;
calculating the brush-down request processing time delay of the middle gear according to the following formula:
Figure BDA0002266518940000021
calculating the lower brush request processing time delay of the high gear according to the following formula:
Figure BDA0002266518940000022
wherein, high _ cache _ ratio, mid _ cache _ ratio and low _ cache _ ratio are respectively a high-gear threshold, a middle-gear threshold and a low-gear threshold, expect _ throughput is the expected number of operations per second, high _ mulp, mid _ mulp and low _ mulp are respectively auxiliary calculation parameters of lower-brushing request processing time delay of a high gear, a middle gear and a low gear, and ratio is the current ratio;
and (4) converting the ratio in the formula into 1-ratio to calculate the read-write request processing time delay of the high gear, the middle gear and the low gear.
Optionally, the method for adjusting the request processing delay further includes:
and when the ratio exceeds a preset high occupancy ratio, adjusting the time delay of the processing of the brushing request to be 0, and suspending the processing of the read-write request until the current value falls back to be lower than the high occupancy ratio.
Optionally, after determining the target gear at which the ratio is located according to a preset gear division manner, the method further includes:
acquiring the quantity variation trend of the read-write requests;
and correspondingly adjusting the target gear according to the number change trend.
In order to achieve the above object, the present application further provides a request processing delay adjusting apparatus, including:
the ratio acquiring unit is used for acquiring the ratio of the occupied storage space of the cache disk to the total storage space;
the gear determining unit is used for determining a target gear of the ratio according to a preset gear dividing mode;
the target time delay determining unit is used for determining target brushing request processing time delay and target reading and writing request processing time delay corresponding to the target gear;
and the target-based time delay processing unit is used for correspondingly processing the brushing request and the read-write request according to the target brushing request processing time delay and the target read-write request processing time delay.
Optionally, the request processing delay adjusting apparatus further includes:
the three-gear type dividing unit is used for dividing a ratio value range from 0 to 1 into three gears, namely a high gear, a middle gear and a low gear in advance according to a three-gear dividing mode before determining a target gear where the ratio is located according to a preset gear dividing mode;
the processing time delay setting unit is used for setting different brushing request processing time delays and reading and writing request processing time delays for the high gear, the middle gear and the low gear respectively; wherein, the high-gear lower-brushing request processing time delay < the medium-gear lower-brushing request processing time delay < the low-gear lower-brushing request processing time delay, the high-gear read-write request time delay > the medium-gear read-write request processing time delay > the low-gear read-write request processing time delay.
Optionally, the processing delay setting unit includes:
the basic request processing time delay setting subunit is used for setting basic lower-level request processing time delay and basic read-write request processing time delay for the low level;
a lower brushing request weight setting subunit, configured to set a lower brushing request weight for the basic lower brushing request processing delay;
a read-write request weight setting subunit, configured to set a read-write request weight for the basic read-write request processing delay;
the weighting calculation subunit is used for respectively calculating the brushing request processing time delay and the reading and writing request processing time delay corresponding to the middle gear and the high gear by using a weighting calculation method; the sum of the lower-brushing request weight and the read-write request weight of the middle gear and the high gear is unit 1, the lower-brushing request weight of the middle gear is greater than the lower-brushing request weight of the high gear, and the read-write request weight of the middle gear is smaller than the read-write request weight of the high gear.
Optionally, the request processing delay adjusting apparatus further includes:
and the special adjusting subunit is used for adjusting the time delay of the brushing request processing to 0 and suspending the processing of the read-write request when the ratio exceeds a preset high occupancy ratio until the current value falls below the high occupancy ratio.
Optionally, the request processing delay adjusting apparatus further includes:
the reading and writing request quantity variation trend acquisition unit is used for acquiring the quantity variation trend of the reading and writing requests after determining the target gear of the ratio according to a preset gear dividing mode;
and the gear secondary adjustment unit is used for correspondingly adjusting the target gear according to the number change trend.
To achieve the above object, the present application provides an electronic device, including:
a memory for storing a computer program;
a processor for implementing the steps of the request processing delay adjustment method as described above when executing the computer program.
To achieve the above object, the present application further provides a readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing the steps of the request processing delay adjustment method as described in the above.
The application provides a request processing delay adjusting method, which comprises the following steps: acquiring the ratio of the occupied storage space of the cache disk to the total storage space; determining a target gear of the ratio according to a preset gear dividing mode; determining a target brushing request processing time delay and a target reading and writing request processing time delay corresponding to the target gear; and correspondingly processing the brushing request and the read-write request according to the target brushing request processing time delay and the target read-write request processing time delay.
According to the method for adjusting the request processing time delay, different gears are obtained by pre-dividing according to the ratio, different request processing time delays are set for each gear, the buffer disk can determine the gear in which the buffer disk is currently located according to the actual situation of the current ratio of the buffer disk, and the request processing time delay which is most suitable for the current situation of the buffer disk is selected.
The application also provides a request processing delay adjusting device, an electronic device and a readable storage medium, which have the beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a request processing delay adjustment method according to an embodiment of the present application;
FIG. 2 is a flow chart of a gear division manner provided by the embodiment of the present application;
fig. 3 is a flowchart of a method for generating different gear delays based on basic delays and weights according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a specific request processing delay calculation method based on a delay calculation module according to an embodiment of the present application;
fig. 5 is a block diagram of a structure of a request processing delay adjusting apparatus according to an embodiment of the present disclosure.
Detailed Description
The application aims to provide a request processing delay adjusting method, a request processing delay adjusting device, electronic equipment and a storage medium, and aims to reduce the probability of occurrence of a full-written situation of an SSD as much as possible and prolong the time interval of the full-written situation of two adjacent SSDs.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. 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 application.
Example one
Referring to fig. 1, fig. 1 is a flowchart of a request processing delay adjustment method according to an embodiment of the present application, including the following steps:
s101: acquiring the ratio of the occupied storage space of the cache disk to the total storage space;
this step aims to obtain the ratio of the currently occupied storage space of the SSD disk as a cache disk to the total storage space, which may also be referred to as the current water level height of the cache disk according to the water level line theory.
S102: determining a target gear of the ratio according to a preset gear dividing mode;
on the basis of S101, this step aims to determine a target gear at which the ratio (current water level height) is located according to a preset gear division manner. According to all possible requirements under an actual application scene, the ratio (water level height) of a value between 0 and 1 is divided into a preset number of gears, namely each gear corresponds to a ratio range. Therefore, the gear corresponding to the current storage space of the cache disk, that is, the target gear can be determined according to the ratio (the current water level height) obtained in S101.
Specifically, the number and the manner of dividing the gear may be various, for example, an equal dividing manner (trisection, quartering, quintet, etc.), and a non-equal dividing manner, wherein the non-equal dividing manner may be adjusted to various dividing manners according to all possible special requirements of the actual application scenario.
S103: determining a target brushing request processing time delay and a target reading and writing request processing time delay corresponding to a target gear;
the method comprises the steps of dividing gears into a plurality of gears, wherein specific request processing time delays (including brushing request processing time delays and reading and writing request processing time delays) or calculation modes of the request processing time delays are set for each divided gear in advance, so that the target brushing request processing time delays and the target reading and writing request processing time delays are determined on the basis of determining the target gear. The method of setting a corresponding calculation formula for each gear can flexibly adjust a certain parameter in the formula according to the actual situation, so that the calculated specific time delay is more suitable for certain characteristics of the current scene. Parameters such as data type, data size, frequency, etc. may result in a speed of processing of the flush request, a speed of processing of the read and write requests, etc.
Furthermore, after the target gear where the ratio is located is determined according to a preset gear dividing mode, the number variation trend of the read-write requests can be obtained, and the target gear can be correspondingly adjusted according to the number variation trend. The quantity change trend of the read-write requests can be obtained by analyzing the quantity of the read-write requests received by the cache disk in a period of time, when the quantity change trend shows an obvious rising trend, the read-write requests are in a low gear timely, and the situation that the current water level height is rapidly increased cannot be well restrained by the time delay of the lower-gear lower-brushing request processing is also realized, so that the time delay of the lower-brushing request processing in a higher gear can be pertinently utilized to restrain as much as possible.
S104: and correspondingly processing the brushing request and the read-write request according to the target brushing request processing time delay and the target read-write request processing time delay.
On the basis of S103, this step is intended to perform corresponding processing on the flush request and the read-write request according to the target flush request processing delay and the target read-write request processing delay.
Specifically, the method may be implemented by replacing the original brushing request processing delay and the original read-write request processing delay with the target brushing request processing delay and the target read-write request processing delay, adjusting the original value to the target value by adopting an increase amount and a decrease amount, temporarily shielding the original value by adopting the target value as an effective value, and the like, where no limitation is made here, so that the brushing request and the read-write request may be correspondingly processed in a target value manner corresponding to the target gear position on the basis of determining the target gear position according to the current water level height.
According to the request processing delay adjusting method provided by the embodiment, different gears are obtained by pre-dividing according to the ratio, and different request processing delays are set for each gear, so that the cache disk can determine the gear in which the cache disk is currently located according to the actual situation of the current ratio of the cache disk, and therefore the request processing delay which is most suitable for the current situation of the cache disk is selected.
On the basis of the first embodiment, in order to facilitate understanding of specific processes of gear division and setting different time delays for different gears in the solution provided by the present application, the present application is exemplified by a common three-stage gear division manner, please refer to a flowchart shown in fig. 2:
s201: dividing a ratio value range from 0 to 1 into three gears, namely a high gear, a medium gear and a low gear in advance according to a three-gear division mode;
s202: different brushing request processing time delay and reading and writing request processing time delay are set for the high gear, the middle gear and the low gear respectively.
It should be appreciated that the closer the ratio is to 1, the more the cache disk is currently about to become full, and thus, to avoid becoming full, the shorter the adjustment of the processing delay of the flush request is required, so that a greater number of flush requests are executed in the same time period, and thus the data of the cache disk is flushed to the data disk more quickly. Since the cache disk cannot execute the read/write request while executing the flush request, and since the time consumed for executing the flush operation and the read/write request is completely different for data of the same size (less time consumed for executing the read/write request), the read/write request processing delay needs to be adjusted for a longer time while the flush request processing delay is shorter.
The low, medium and high gears provided by the embodiment are also sequentially arranged in a ratio value range of 0-1, and the higher the gear is, the higher the current water level is, the closer the current water level is to the highest water level. Therefore, the high-gear flush request processing delay < the medium-gear flush request processing delay < the low-gear flush request processing delay, the high-gear read/write request processing delay > the medium-gear read/write request processing delay > the low-gear read/write request processing delay.
Further, when the current ratio exceeds the preset high occupancy ratio, the processing delay of the brushing request can be directly adjusted to 0, and the processing of the read-write request is suspended until the current ratio falls back to be lower than the high occupancy ratio. Wherein, the high occupancy ratio indicates that the current water level of the cache tray is very close to the highest water level, and only an extreme processing mode can be used when the condition occurs, so as to make the current occupancy ratio fall back to a condition lower than the high occupancy ratio as soon as possible.
Further, on the basis of the above embodiment, the present application further provides a method for calculating a specific time delay based on a basic time delay and a weighting calculation method, with respect to how to set a time delay that is reasonable and easy to be automatically adjusted for each gear, please refer to the flowchart shown in fig. 3, which includes the following steps:
s301: setting basic lower brushing request processing time delay and basic read-write request processing time delay for a low gear;
s302: setting a brushing request weight for the delay of the brushing request processing on the basis;
s303: setting a read-write request weight for a basic read-write request processing time delay;
it should be noted that the specific weight value of the lower-flushing request weight value and the read-write request weight value, which are respectively set for the basic lower-flushing request processing delay and the basic read-write request processing delay, is obtained by combining the read-write request processing time consumption and the lower-flushing request processing time consumption with the rise of the current water level height, so that the setting of the weight value can enable the current water level height to change more smoothly through the adjustment of the delay, thereby reducing the pressure on the distributed storage system as much as possible, rather than enabling the distributed storage system to continuously keep the original growth speed to be increased continuously.
S304: and respectively calculating the brushing request processing time delay and the reading and writing request processing time delay corresponding to the middle gear and the high gear by using a weighting calculation method.
The sum of the lower brushing request weight of the middle gear and the high gear and the read-write request weight is unit 1, the lower brushing request weight of the middle gear is greater than the lower brushing request weight of the high gear, and the read-write request weight of the middle gear is smaller than the read-write request weight of the high gear.
Because the sum of the lower brushing request weight and the read-write request weight of the middle gear and the high gear is unit 1, under the condition that the basic time delay is not changed, the processing time delay of the lower brushing request is shortened along with the reduction of the weight, and the weight of the read-write request is correspondingly increased, thereby prolonging the processing time delay of the read-write request.
For convenience of understanding, in combination with an actual application scenario, the present application further provides an implementation manner including a specific calculation formula, where the implementation manner is suitable for a Linux platform and is based on a ceph distributed storage system, please refer to a schematic diagram shown in fig. 4.
As shown in fig. 4, the input parameters are first configured: high, medium and low three-gear water level thresholds, expected operation number per second, high, medium and low three-gear water level time delay calculation auxiliary parameters and cache disc (cache) water level change step length (cache _ step);
then, the change control of the water level of the cache disk is completed through ratio + cache _ step, namely, the step size (cache _ step) is used as the change control scale.
The time delay calculation module firstly judges which gear is determined by the current water level height, namely which gear is in the three conditions of being smaller than a low water level threshold, being larger than a low water level threshold but smaller than a middle water level threshold, or being larger than the middle water level threshold and smaller than the high water level threshold;
it should be noted that the flow diagram shown in fig. 4 is a schematic diagram of a time delay size parameter adjusting process, wherein a plurality of test points exist by setting step lengths and continuously accumulating the step lengths, that is, each test point is a test water level height, and after each test water level height is input into the time delay calculating module, the position where the test water level height is located is calculated to obtain a time delay. And when the current water level height is continuously accumulated to be more than 1.0, all the test work is considered to be finished, and the test work is jumped out. Finally, a group of time delay data files are formed by all the water level heights and the corresponding time delays from the step length increase for the first time to before jumping out, and further, the group of time delay curves are displayed and compared and analyzed with the multiple groups of time delay curves, so that the optimal time delay which can enable the water level change to be more gradual is obtained.
The following is a specific delay setting mode and a calculation formula:
setting the time delay of lower brush request processing of a low gear to be 0.5 s; the ratio is in a low gear, and the ratio is smaller than a low gear threshold of the low gear;
calculating the brush-down request processing time delay of the middle gear according to the following formula:
Figure BDA0002266518940000101
calculating the lower brush request processing time delay of the high gear according to the following formula:
Figure BDA0002266518940000102
wherein, high _ cache _ ratio, mid _ cache _ ratio and low _ cache _ ratio are respectively a high-gear threshold, a middle-gear threshold and a low-gear threshold, expect _ throughput is the expected number of operations per second, high _ mulp, mid _ mulp and low _ mulp are respectively auxiliary calculation parameters of lower-brushing request processing time delay of a high gear, a middle gear and a low gear, and ratio is the current ratio;
and (4) converting the ratio in the formula into 1-ratio to calculate the read-write request processing time delay of the high gear, the middle gear and the low gear.
Because the situation is complicated and cannot be illustrated by a list, a person skilled in the art can realize that many examples exist according to the basic method principle provided by the application and the practical situation, and the protection scope of the application should be protected without enough inventive work.
Example four
Referring to fig. 5, fig. 5 is a block diagram illustrating a configuration of a deployment system of a service in a cloud environment according to an embodiment of the present disclosure, where the deployment system may include:
a ratio obtaining unit 100, configured to obtain a ratio of a storage space occupied by the cache disk to a total storage space;
a gear determining unit 200, configured to determine a target gear where the ratio is located according to a preset gear dividing manner;
a target time delay determining unit 300, configured to determine a target brushing request processing time delay and a target read-write request processing time delay corresponding to the target gear;
and a target-based delay processing unit 400, configured to perform corresponding processing on the flush request and the read-write request according to the target flush request processing delay and the target read-write request processing delay.
Further, the request processing delay adjusting apparatus may further include:
the three-gear type dividing unit is used for dividing a ratio value range from 0 to 1 into three gears, namely a high gear, a middle gear and a low gear in advance according to a three-gear dividing mode before determining a target gear where the ratio is located according to a preset gear dividing mode;
the processing time delay setting unit is used for setting different brushing request processing time delays and reading and writing request processing time delays for the high gear, the middle gear and the low gear respectively; wherein, the high-gear lower-brushing request processing time delay < the medium-gear lower-brushing request processing time delay < the low-gear lower-brushing request processing time delay, the high-gear read-write request time delay > the medium-gear read-write request processing time delay > the low-gear read-write request processing time delay.
Wherein, the processing delay setting unit may include:
the basic request processing time delay setting subunit is used for setting basic lower-level request processing time delay and basic read-write request processing time delay for the low level;
a lower brushing request weight setting subunit, configured to set a lower brushing request weight for the basic lower brushing request processing delay;
a read-write request weight setting subunit, configured to set a read-write request weight for the basic read-write request processing delay;
the weighting calculation subunit is used for respectively calculating the brushing request processing time delay and the reading and writing request processing time delay corresponding to the middle gear and the high gear by using a weighting calculation method; the sum of the lower-brushing request weight and the read-write request weight of the middle gear and the high gear is unit 1, the lower-brushing request weight of the middle gear is greater than the lower-brushing request weight of the high gear, and the read-write request weight of the middle gear is smaller than the read-write request weight of the high gear.
Further, the request processing delay adjusting apparatus may further include:
and the special adjusting subunit is used for adjusting the time delay of the brushing request processing to 0 and suspending the processing of the read-write request when the ratio exceeds a preset high occupancy ratio until the current value falls below the high occupancy ratio.
Further, the request processing delay adjusting apparatus may further include:
the reading and writing request quantity variation trend acquisition unit is used for acquiring the quantity variation trend of the reading and writing requests after determining the target gear of the ratio according to a preset gear dividing mode;
and the gear secondary adjustment unit is used for correspondingly adjusting the target gear according to the number change trend.
Based on the foregoing embodiment, the present application further provides a deployment apparatus for services in a cloud environment, where the deployment apparatus may include a memory and a processor, where the memory stores a computer program, and when the processor calls the computer program in the memory, the steps provided in the foregoing embodiment may be implemented. Of course, the deployment device may also include various necessary network interfaces, power supplies, and other components.
The present application also provides a computer-readable storage medium, on which a computer program is stored, which, when executed by an execution terminal or processor, can implement the steps provided by the above-mentioned embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
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 application.
The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It will be apparent to those skilled in the art that various changes and modifications can be made in the present invention without departing from the principles of the invention, and these changes and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (6)

1. A method for adjusting request processing delay is characterized by comprising the following steps:
acquiring the ratio of the occupied storage space of the cache disk to the total storage space;
determining a target gear of the ratio according to a preset gear dividing mode;
determining a target brushing request processing time delay and a target reading and writing request processing time delay corresponding to the target gear;
performing corresponding processing on the brushing request and the read-write request according to the target brushing request processing delay and the target read-write request processing delay;
before the target gear where the ratio is located is determined according to a preset gear dividing mode, the method further comprises the following steps:
dividing a ratio value range from 0 to 1 into three gears, namely a high gear, a medium gear and a low gear in advance according to a three-gear division mode;
setting different brushing request processing time delays and reading and writing request processing time delays for the high gear, the middle gear and the low gear respectively; wherein, the high-gear brushing request processing time delay < the medium-gear brushing request processing time delay < the low-gear brushing request processing time delay, the high-gear read-write request time delay > the medium-gear read-write request processing time delay > the low-gear read-write request processing time delay;
the setting of different brushing request processing time delays and reading and writing request processing time delays for the high, medium and low gears respectively comprises the following steps:
setting the brush-down request processing time delay of the low gear to be 0.5 s; wherein the ratio being in a low gear is a low gear threshold where the ratio is less than the low gear;
calculating the brush-down request processing time delay of the middle gear according to the following formula:
Figure FDA0003016165310000011
calculating the lower brush request processing time delay of the high gear according to the following formula:
Figure FDA0003016165310000012
wherein, high _ cache _ ratio, mid _ cache _ ratio and low _ cache _ ratio are respectively a high-gear threshold, a middle-gear threshold and a low-gear threshold, expect _ throughput is the expected number of operations per second, high _ mulp, mid _ mulp and low _ mulp are respectively auxiliary calculation parameters of lower-brushing request processing time delay of a high gear, a middle gear and a low gear, and ratio is the current ratio;
and (4) converting the ratio in the formula into 1-ratio to calculate the read-write request processing time delay of the high gear, the middle gear and the low gear.
2. The method of claim 1, further comprising:
and when the ratio exceeds a preset high occupancy ratio, adjusting the time delay of the processing of the brushing request to be 0, and suspending the processing of the read-write request until the ratio falls back to be lower than the high occupancy ratio.
3. The request processing delay adjustment method according to claim 1, further comprising, after determining the target gear at which the ratio is located according to a preset gear division manner:
acquiring the quantity variation trend of the read-write requests;
and correspondingly adjusting the target gear according to the number change trend.
4. A request processing delay adjustment apparatus, comprising:
the ratio acquiring unit is used for acquiring the ratio of the occupied storage space of the cache disk to the total storage space;
the gear determining unit is used for determining a target gear of the ratio according to a preset gear dividing mode;
the target time delay determining unit is used for determining target brushing request processing time delay and target reading and writing request processing time delay corresponding to the target gear;
a target-based time delay processing unit, configured to perform corresponding processing on the request to flush and the read-write request according to the target request to flush processing time delay and the target read-write request processing time delay;
the request processing delay adjusting device further comprises:
the three-gear type dividing unit is used for dividing a ratio value range from 0 to 1 into three gears, namely a high gear, a middle gear and a low gear in advance according to a three-gear dividing mode before determining a target gear where the ratio is located according to a preset gear dividing mode;
the processing time delay setting unit is used for setting different brushing request processing time delays and reading and writing request processing time delays for the high gear, the middle gear and the low gear respectively; wherein, the high-gear brushing request processing time delay < the medium-gear brushing request processing time delay < the low-gear brushing request processing time delay, the high-gear read-write request time delay > the medium-gear read-write request processing time delay > the low-gear read-write request processing time delay;
the processing time delay setting unit comprises:
the low-gear brushing request processing time delay setting unit is used for setting the brushing request processing time delay of the low gear to be 0.5 s; wherein the ratio being in a low gear is a low gear threshold where the ratio is less than the low gear;
and the middle gear lower brush request processing time delay setting unit is used for calculating the lower brush request processing time delay of the middle gear according to the following formula:
Figure FDA0003016165310000031
the high gear lower brush request processing time delay setting unit is used for calculating the lower brush request processing time delay of the high gear according to the following formula:
Figure FDA0003016165310000032
wherein, high _ cache _ ratio, mid _ cache _ ratio and low _ cache _ ratio are respectively a high-gear threshold, a middle-gear threshold and a low-gear threshold, expect _ throughput is the expected number of operations per second, high _ mulp, mid _ mulp and low _ mulp are respectively auxiliary calculation parameters of lower-brushing request processing time delay of a high gear, a middle gear and a low gear, and ratio is the current ratio;
and the read-write request processing time delay setting unit is used for converting the ratio in the formula into 1-ratio to calculate and obtain the read-write request processing time delays of a high gear, a middle gear and a low gear.
5. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the request processing delay adjustment method according to any one of claims 1 to 3 when executing the computer program.
6. A readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the steps of the request processing latency adjustment method according to any one of claims 1 to 3.
CN201911089823.5A 2019-11-08 2019-11-08 Request processing delay adjusting method and device, electronic equipment and storage medium Active CN110908604B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911089823.5A CN110908604B (en) 2019-11-08 2019-11-08 Request processing delay adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911089823.5A CN110908604B (en) 2019-11-08 2019-11-08 Request processing delay adjusting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110908604A CN110908604A (en) 2020-03-24
CN110908604B true CN110908604B (en) 2021-06-29

Family

ID=69816542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911089823.5A Active CN110908604B (en) 2019-11-08 2019-11-08 Request processing delay adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110908604B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113625966B (en) * 2021-07-25 2024-02-13 济南浪潮数据技术有限公司 Data brushing method, system, equipment and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6629211B2 (en) * 2001-04-20 2003-09-30 International Business Machines Corporation Method and system for improving raid controller performance through adaptive write back/write through caching
CN107870874B (en) * 2016-09-23 2020-12-15 华为数字技术(成都)有限公司 Data write-in control method and storage device
CN109739441A (en) * 2019-01-02 2019-05-10 郑州云海信息技术有限公司 Data cached method is brushed under a kind of storage system

Also Published As

Publication number Publication date
CN110908604A (en) 2020-03-24

Similar Documents

Publication Publication Date Title
US10528481B2 (en) Apparatus and method for managing storage of data blocks
US20180039574A1 (en) Cache allocation for disk array
US20140280956A1 (en) Methods and systems to manage computer resources in elastic multi-tenant cloud computing systems
CN104424106B (en) The method and system of the resource of distribution storage device is operated for storage optimization
US9436265B2 (en) Information processing apparatus and load control method
JP2015191628A (en) Storage management device, performance adjustment method, and performance adjustment program
CN108874324B (en) Access request processing method, device, equipment and readable storage medium
CN110636388A (en) Service request distribution method, system, electronic equipment and storage medium
CN110908604B (en) Request processing delay adjusting method and device, electronic equipment and storage medium
JP2009200947A (en) Packet transmitter, packet transmission method, and packet transmission program
CN109413694B (en) Small cell caching method and device based on content popularity prediction
CN104156323A (en) Method and device for reading length of data block of cache memory in self-adaption mode
US20170308317A1 (en) Storage management apparatus, storage apparatus management method, and computer-readable recording medium
CN109445719B (en) Data storage method and device
US20170024147A1 (en) Storage control device and hierarchized storage control method
CN113568746B (en) Load balancing method and device, electronic equipment and storage medium
CN110688379B (en) Data storage method, system, storage medium and electronic equipment
CN111176814B (en) Task execution method and related device
CN111208943B (en) IO pressure scheduling system of storage system
CN105573920B (en) Memory space management and device
CN107018163B (en) Resource allocation method and device
US20100251251A1 (en) Apparatus and method for cpu load control in multitasking environment
CN109445996B (en) Method, system and related assembly for distributing IO stream
JP5678923B2 (en) Storage system, input / output control device, input / output control method, and computer program
CN104202095A (en) Base station floor noise reducing method and device

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