CN109062518B - Request processing method, device, equipment and readable storage medium - Google Patents

Request processing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN109062518B
CN109062518B CN201811094505.3A CN201811094505A CN109062518B CN 109062518 B CN109062518 B CN 109062518B CN 201811094505 A CN201811094505 A CN 201811094505A CN 109062518 B CN109062518 B CN 109062518B
Authority
CN
China
Prior art keywords
target
request
waiting
time
upper limit
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
CN201811094505.3A
Other languages
Chinese (zh)
Other versions
CN109062518A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811094505.3A priority Critical patent/CN109062518B/en
Publication of CN109062518A publication Critical patent/CN109062518A/en
Application granted granted Critical
Publication of CN109062518B publication Critical patent/CN109062518B/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/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • 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/061Improving I/O performance
    • 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)
  • Mobile Radio Communication Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a request processing method, which comprises the following steps: receiving a target request and acquiring a target serial number corresponding to the target request; inputting the target sequence number into a time label calculation model with a volume IOPS upper limit value for calculation to obtain a target time label; setting a target time tag for a target request to obtain a target waiting request, and putting the target waiting request into a waiting queue; and when the current time reaches or exceeds the target time tag, releasing the target waiting request and providing the data service corresponding to the target waiting request. Therefore, the volume IOPS can be controlled according to the interval duration of the time labels, and the service stability is further improved. The invention also discloses a request processing device, equipment and a readable storage medium, which have corresponding technical effects.

Description

Request processing method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of distributed storage technologies, and in particular, to a request processing method, apparatus, device, and readable storage medium.
Background
In distributed storage, volume IOPS control is performed on a plurality of volumes in a distributed storage system according to different service requirements, so that the service quality is improved.
Currently, a more sophisticated volume IOPS control method is implemented based on a token bucket algorithm. The specific implementation process of the volume IOPS control method based on the token bucket algorithm is as follows:
setting a token bucket control unit on a read-write path of the volume, wherein each read-write request needs to acquire a token from the token bucket when passing through the token bucket control unit, and if the number of tokens in the token bucket is sufficient and the token can be acquired, the subsequent operation can be continuously completed; if no token is in the token bucket, the current read-write request is blocked until the token in the token bucket is updated, and the token can be acquired to continuously complete the subsequent operation. Therefore, the effect of controlling the volume IOPS can be achieved only by controlling the speed of adding tokens to the token bucket. However, when the read-write pressure on the volume is not uniform, a certain amount of tokens will be accumulated in the token bucket, and the number of tokens in the token bucket in a certain time period exceeds an expected value, which causes the volume IOPS in the time period to exceed a limit value, and further impacts the storage system, which affects the service stability.
In summary, how to effectively solve the problems of volume IOPS control and the like is a technical problem that needs to be solved urgently by those skilled in the art at present.
Disclosure of Invention
The invention aims to provide a request processing method, a request processing device, request processing equipment and a readable storage medium, which are used for controlling volume IOPS and improving service stability.
In order to solve the technical problems, the invention provides the following technical scheme:
a request processing method, comprising:
receiving a target request and acquiring a target serial number corresponding to the target request;
inputting the target sequence number into a time label calculation model with a volume IOPS upper limit value for calculation to obtain a target time label;
setting the target time tag for the target request to obtain a target waiting request, and putting the target waiting request into a waiting queue;
and when the current time reaches or exceeds the target time tag, releasing the target waiting request and providing data service corresponding to the target waiting request.
Preferably, inputting the target sequence number into a time tag calculation model with a volume IOPS upper limit value to perform calculation, and obtaining the target time tag includes:
inputting the target sequence number to Ti=T0Calculating in + i/V to obtain target time label Ti(ii) a Wherein i is the target sequence number, V is a volume IOPS upper limit value, T0The first time stamp to wait for the request.
Preferably, inputting the target sequence number into a time tag calculation model with a volume IOPS upper limit value to perform calculation, and obtaining the target time tag includes:
and if no latest waiting request exists, taking the current time as the target time tag.
Preferably, when the current time reaches or exceeds the target time tag, passing the target wait request and providing a data service corresponding to the target wait request includes:
reading the target time tag when the target waiting request is positioned at the head of the waiting queue;
judging whether the current time reaches or exceeds the target time tag;
and if so, releasing the target waiting request and providing a data service corresponding to the target waiting request.
Preferably, after the passing the target wait request and providing the data service corresponding to the target wait request, the method further includes:
removing the target wait request from the wait queue.
Preferably, before inputting the target sequence number into a time stamp calculation model with a volume IOPS upper limit value for calculation and obtaining the target time stamp, the method further includes:
and acquiring a volume IOPS upper limit value, and setting the volume IOPS upper limit value in a preset time tag calculation model.
Preferably, after the obtaining the volume IOPS upper limit value and setting the volume IOPS upper limit value in a preset time stamp calculation model, the method further includes:
receiving a volume IOPS upper limit value adjustment request, and adjusting the volume IOPS upper limit value in the time tag calculation model to a volume IOPS upper limit value specified by the volume IOPS upper limit value adjustment request.
A request processing apparatus comprising:
the target request receiving module is used for receiving a target request and acquiring a target serial number corresponding to the target request;
a target time tag obtaining module, configured to input the target sequence number into a time tag calculation model with a volume IOPS upper limit value, and calculate the target sequence number to obtain a target time tag;
a target waiting request obtaining module, configured to set the target time tag for the target request to obtain a target waiting request, and place the target waiting request into a waiting queue;
and the target waiting request processing module is used for releasing the target waiting request and providing data service corresponding to the target waiting request when the current time reaches or exceeds the target time tag.
A request processing device comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the request processing method when executing the computer program.
A readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described request processing method.
The method provided by the embodiment of the invention is applied to receive the target request and obtain the target serial number corresponding to the target request; inputting the target sequence number into a time label calculation model with a volume IOPS upper limit value for calculation to obtain a target time label; setting a target time tag for a target request to obtain a target waiting request, and putting the target waiting request into a waiting queue; and when the current time reaches or exceeds the target time tag, releasing the target waiting request and providing the data service corresponding to the target waiting request.
After receiving the target request, obtaining a target sequence number corresponding to the target request, where the target sequence number is a numerical value of the target request belonging to the received several requests. Then, the target sequence number of the target request is input into a time label calculation model with a volume IOPS upper limit value for calculation, and a target time label can be obtained. And setting a target time tag for the target request, obtaining the target waiting request, and putting the target waiting request into a waiting queue. And only when the current time reaches or exceeds the target time tag, releasing the target waiting request and providing the data service corresponding to the target waiting request. In this manner, the received request can be handled with control. By setting a time stamp for each request, i.e. each request is scheduled on the time axis, when the time reaches the time stamp of a certain request, the request can be followed. Thus, the control of the volume IOPS can be realized according to the interval duration of the time labels. And the read-write request is controlled in a planned way according to the time, so that the volume IOPS can be controlled accurately and stably, and the service stability is further improved.
Accordingly, embodiments of the present invention further provide a request processing apparatus, a device, and a readable storage medium corresponding to the request processing method, which have the above technical effects and are not described herein again.
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 flow chart of a method for processing a request according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an embodiment of a request processing method according to the present invention;
FIG. 3 is a schematic structural diagram of a request processing apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a request processing device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a request processing device according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a request processing method, which sets corresponding processing time for the received request, and further controls the volume IOPS of data transmission corresponding to the request, thereby further improving the service stability. Specifically, for each received read-write request, a time tag is set according to the sequence number of the received request and the volume IOPS upper limit value, and the request with the time tag set is placed in a waiting queue, that is, each read-write request is scheduled to be arranged on the time axis according to the sequence number of the received request and the volume IOPS upper limit value. Meanwhile, the waiting queue can be detected, the read-write request with the time tag in the waiting queue is detected, when the time reaches the time tag of a certain read-write request, the request can be taken out from the waiting queue for subsequent operation, otherwise, the request is queued in the queue for waiting. Therefore, the received read-write request can be controlled in processing time so as to control the volume IOPS, and further improve the service stability.
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.
The first embodiment is as follows:
referring to fig. 1, fig. 1 is a flowchart illustrating a request processing method according to an embodiment of the present invention, the method including the following steps:
s101, receiving a target request and acquiring a target serial number corresponding to the target request.
And receiving a target request, wherein the target request can be a request for reading data sent by a user or a request for writing data. After receiving the target request, a target sequence number corresponding to the target request may be determined. Where the target sequence number may indicate that the currently received target request is the next request. Specifically, the received requests may be counted from the time period when the control of the volume IOPS is turned on, so that the target sequence number corresponding to the target request may be obtained after the target request is received. For example, a parameter a may be set, and whenever a request is received, the value of parameter a is incremented by 1 and rolled over. After receiving the target request, the rolled request sequence number a can be read to obtain the target sequence number corresponding to the target request, i.e. the current a value is used as the target sequence number value of the target request.
S102, inputting the target sequence number into a time label calculation model with the volume IOPS upper limit value for calculation, and obtaining a target time label.
In the embodiment of the present invention, a time tag calculation model may be preset, and in order to control the volume IOPS and ensure the stability of service performance, an upper limit value of the volume IOPS may be set in the time tag calculation model. That is, the target time stamp calculated by the time stamp calculation model is a time stamp adapted to the volume IOPS upper limit value. For example, assuming that the target sequence number of the target request is B, and the volume IOPS upper limit value is V, the calculated target time stamp is c, and a specific numerical value of c is associated with B and V, and when V is large, c is located earlier on the time axis (i.e., earlier in time).
Specifically, before the target sequence number is input into the time tag calculation model provided with the volume IOPS upper limit value for calculation to obtain the target time tag, the volume IOPS upper limit value may be obtained, and the volume IOPS upper limit value is set in the preset time tag calculation model. Preferably, in order to adapt to the service demand changing in real time, a volume IOPS upper limit value adjustment request may be further received, and the volume IOPS upper limit value in the time tag calculation model is adjusted to the target volume IOPS upper limit value specified by the volume IOPS upper limit value adjustment request. Therefore, after the service requirement changes, the volume IOPS upper limit value in the time label calculation model can be adaptively adjusted.
Specifically, the target serial number may be input to Ti=T0Calculating in + i/V to obtain target time label Ti(ii) a Where i is the target sequence number, V is the volume IOPS upper limit value, T0The first time stamp to wait for the request. Wherein, the latest waiting request at present is the last request with the time label set; the volume IOPS upper limit value is a maximum value of the volume IOPS (Input/Output Operations Per Second), i.e., the number of times of performing read/write (I/O) Operations Per Second. The specific value of the volume IOPS may be set according to the service requirement, and the data value is generally in the range of 100-. For example, setting to 100 indicates that the number of reads and writes to the storage volume in 1 second by the control service application is expected to be no more than 100. Both the target timestamp and the timestamp of the most recent pending request may be specified as a point in time. The time label of the subsequent received request is always later than the last received request, and the interval between two time labels is the same under the condition that the volume IOPS upper limit value is not changed.
When the target time stamp is obtained by inputting the target number into the time stamp calculation model having the volume IOPS upper limit value and calculating the target number, the current time is set as the target time stamp if there is no latest wait request. That is, if the received target request is the first request since the record exists, that is, the target number of the target request is 1, and a waiting request with a time stamp set therein does not yet appear at this time, the current time can be directly used as the target time stamp.
S103, setting a target time tag for the target request to obtain a target waiting request, and putting the target waiting request into a waiting queue.
And after the target time tag is obtained, setting the target time tag for the target request, namely taking the target time tag as the time tag of the target request. For the convenience of subsequent description and description, the target request with the target timestamp set is referred to as a target wait request, i.e., the target wait request is different from the target request only in that the target wait request has the target timestamp set therein, but the target request has no target timestamp set therein. After the target wait request is obtained, the target wait request may be placed in a wait queue.
Since the wait queue can realize the blocked wake-up, the subsequent processing operation of the target wait request can be completed after the target wait request is put into the wait queue for blocking and the first wake-up condition is satisfied. In this way, the received request can be blocked and processed at the appropriate time. After the target waiting request is put into the waiting queue, the waiting requests in the waiting queue can be processed according to the sequence of putting into the waiting queue.
And S104, when the current time reaches or exceeds the target time tag, releasing the target waiting request and providing the data service corresponding to the target waiting request.
And when judging whether the target waiting request is released or not, judging according to the relation between the current time and the target time tag. The current time reaching or exceeding the target time tag may be used as a wake-up condition or a release condition, that is, when the current time reaches or exceeds the target time tag, the target wait request is released and a data service corresponding to the target wait request is provided.
Specifically, the following steps may be executed to determine the target wait request to control the volume IOPS:
step one, reading a target time tag when a target waiting request is positioned at the head of a waiting queue;
step two, judging whether the current time reaches or exceeds a target time label;
and step three, if so, releasing the target waiting request and providing the data service corresponding to the target waiting request.
For convenience of description, the above three steps will be described in combination.
When the target waiting request is positioned at the head of the waiting queue, the target time tag of the target waiting request can be read, and whether the current time reaches or exceeds the target time tag is judged. For example, if the current time is 2018-9-18-14:10:28 and the time of the target time tag is 2018-9-18-14:11:00, since 2018-9-18-14:11:00 is later than 2018-9-18-14:10:28, the judgment result is no, namely, the time is not exceeded, and then the waiting can be continued; if the current time is 2018-9-18-14:10:28 and the time of the target time tag is 2018-9-18-14:9:00, the 2018-9-18-14:9:00 is earlier than the 2018-9-18-14:10:28, so that if the judgment result is yes, namely the result is exceeded, the target waiting request is processed at the current moment, the data service corresponding to the target waiting request is provided, the volume IOPS is not affected, and the target waiting request can be released at the moment. If so, the target wait request can be released and the corresponding data service can be passed through the target wait request. Specifically, if the target waiting request is a request for reading data, the relevant data is sent to the user sending the target request; and if the target waiting request is a request for writing data, writing the relevant data into the storage device.
Preferably, after the subsequent processing of the target wait request is completed, i.e. the data service corresponding to the target wait request is provided, the target wait request may be deleted from the wait queue so as to process the next wait request in the wait queue. Thus, when processing the waiting request in the waiting queue, only the waiting request at the head of the queue (i.e. the first waiting request in the waiting queue) needs to be read, and no complex judgment needs to be performed.
The method provided by the embodiment of the invention is applied to receive the target request and obtain the target serial number corresponding to the target request; inputting the target sequence number into a time label calculation model with a volume IOPS upper limit value for calculation to obtain a target time label; setting a target time tag for a target request to obtain a target waiting request, and putting the target waiting request into a waiting queue; and when the current time reaches or exceeds the target time tag, releasing the target waiting request and providing the data service corresponding to the target waiting request.
After receiving the target request, obtaining a target sequence number corresponding to the target request, where the target sequence number is a numerical value of the target request belonging to the received several requests. Then, the target sequence number of the target request is input into a time label calculation model with a volume IOPS upper limit value for calculation, and a target time label can be obtained. And setting a target time tag for the target request, obtaining the target waiting request, and putting the target waiting request into a waiting queue. And only when the current time reaches or exceeds the target time tag, releasing the target waiting request and providing the data service corresponding to the target waiting request. In this manner, the received request can be handled with control. By setting a time stamp for each request, i.e. each request is scheduled on the time axis, when the time reaches the time stamp of a certain request, the request can be followed. Thus, the control of the volume IOPS can be realized according to the interval duration of the time labels. And the read-write request is controlled in a planned way according to the time, so that the volume IOPS can be controlled accurately and stably, and the service stability is further improved.
Example two:
in order to make those skilled in the art better understand the technical solution provided by the embodiment of the present invention, the following describes in detail how to implement volume IOPS control in a distributed storage cluster by using the technical solution provided by the embodiment of the present invention.
Referring to fig. 2, fig. 2 is a flowchart illustrating a request processing method according to an embodiment of the present invention.
In practical application, according to the request processing method provided by the embodiment of the invention, a time tag volume IOPS control unit and a Flush module are arranged. The time tag volume IOPS control unit can set a time tag for each read-write request according to the target sequence number (namely, the received several read requests) and the IOPS expected value of the read-write request according to the sequence, and the time tag is put into a waiting queue, namely, each read-write request is arranged on a time axis according to the target sequence number and the IOPS expected value of the read-write request according to a plan. The Flush module can detect the read-write request with a time tag in the waiting queue, when the time reaches the time tag of a certain read-write request, the request can be taken out from the waiting queue for subsequent operation, otherwise, the request is queued in the queue for waiting. Specifically, the steps of controlling the volume IOPS by the time tag IOPS control unit and the Flush module are as follows:
wherein, the time tag volume IOPS control unit is operable to perform the following operations:
s11, setting an IOPS expected value V to the IOPS control unit;
s12, setting a time tag for the first read-write request Req0 arriving at the IOPS control unit, wherein the tag value is the current time T;
s13, setting a time tag for the ith read-write request Reqi which arrives at the IOPS control unit subsequently, wherein the tag value is as follows:
T+i/V(i=1,2,3,…)
s14, the read/write request with the time stamp set is put into a waiting queue (Qwait shown in fig. 2).
The Flush module can be used for executing the following steps:
s21, detecting the waiting queue, and when the waiting request exists in the waiting queue, judging a first request (FirstReq shown in figure 2) in the waiting queue to determine whether to pass;
s22, if the current time reaches or exceeds the tag time of the FirstReq, finishing the subsequent operation (such as reading data or writing data), and deleting the request record from the waiting queue;
and S23, if the current time does not reach the tag time of the FirstReq, continuing to monitor the waiting queue.
The IOPS control unit of the time label volume and the Flush module respectively execute corresponding steps, and the IOPS of the read-write operation volume of the volume can be controlled to be at an expected value V. Specifically, the time tag IOPS control unit is arranged on the read-write path of the volume, and a time tag is arranged on each read-write request and is put into a waiting queue, namely, each read-write request is arranged on a time axis according to a plan, when the time reaches the time tag of a certain read-write request, the request can be taken out from the waiting queue for subsequent operation, otherwise, the request is queued in the queue for waiting. Therefore, the IOPS can be controlled according to the time label interval, and because the read-write request is controlled according to the time plan, the IOPS is accurately and stably controlled and cannot exceed the expected value, thereby ensuring the stability of the service.
Example three:
corresponding to the above method embodiments, the present invention further provides a request processing apparatus, and the request processing apparatus described below and the request processing method described above may be referred to correspondingly.
Referring to fig. 3, the apparatus includes the following modules:
a target request receiving module 101, configured to receive a target request and obtain a target sequence number corresponding to the target request;
a target time tag obtaining module 102, configured to input the target sequence number into a time tag calculation model with a volume IOPS upper limit value, and calculate the target sequence number to obtain a target time tag;
a target waiting request obtaining module 103, configured to set a target time tag for a target request to obtain a target waiting request, and place the target waiting request into a waiting queue;
and the target waiting request processing module 104 is configured to, when the current time reaches or exceeds the target time tag, pass the target waiting request and provide a data service corresponding to the target waiting request.
The device provided by the embodiment of the invention is applied to receive the target request and obtain the target serial number corresponding to the target request; inputting the target sequence number into a time label calculation model with a volume IOPS upper limit value for calculation to obtain a target time label; setting a target time tag for a target request to obtain a target waiting request, and putting the target waiting request into a waiting queue; and when the current time reaches or exceeds the target time tag, releasing the target waiting request and providing the data service corresponding to the target waiting request.
After receiving the target request, obtaining a target sequence number corresponding to the target request, where the target sequence number is a numerical value of the target request belonging to the received several requests. Then, the target sequence number of the target request is input into a time label calculation model with a volume IOPS upper limit value for calculation, and a target time label can be obtained. And setting a target time tag for the target request, obtaining the target waiting request, and putting the target waiting request into a waiting queue. And only when the current time reaches or exceeds the target time tag, releasing the target waiting request and providing the data service corresponding to the target waiting request. In this manner, the received request can be handled with control. By setting a time stamp for each request, i.e. each request is scheduled on the time axis, when the time reaches the time stamp of a certain request, the request can be followed. Thus, the control of the volume IOPS can be realized according to the interval duration of the time labels. And the read-write request is controlled in a planned way according to the time, so that the volume IOPS can be controlled accurately and stably, and the service stability is further improved.
In an embodiment of the present invention, the target timestamp obtaining module 102 is specifically configured to input a target serial number into Ti=T0Calculating in + i/V to obtain target time label Ti(ii) a Where i is the target sequence number, V is the volume IOPS upper limit value, T0The first time stamp to wait for the request.
In an embodiment of the present invention, the target timestamp obtaining module 102 is specifically configured to use the current time as the target timestamp if there is no latest waiting request.
In an embodiment of the present invention, the target wait request processing module 104 is specifically configured to read a target time tag when the target wait request is located at a head of the wait queue; judging whether the current time reaches or exceeds a target time tag; and if so, releasing the target waiting request and providing a data service corresponding to the target waiting request.
In one embodiment of the present invention, the method further comprises:
and the waiting queue sorting module is used for deleting the target waiting request from the waiting queue after the target waiting request is released and the data service corresponding to the target waiting request is provided.
In one embodiment of the present invention, the method further comprises:
and the time tag calculation model is used for acquiring the volume IOPS upper limit value before the target sequence number is input into the time tag calculation model provided with the volume IOPS upper limit value for calculation and the target time tag is acquired, and setting the volume IOPS upper limit value in the preset time tag calculation model.
In a specific embodiment of the present invention, the time tag calculation model is specifically configured to receive a volume IOPS upper limit value adjustment request after obtaining the volume IOPS upper limit value and setting the volume IOPS upper limit value in a preset time tag calculation model, and adjust the volume IOPS upper limit value in the time tag calculation model to the volume IOPS upper limit value specified by the volume IOPS upper limit value adjustment request.
Example four:
corresponding to the above method embodiment, the embodiment of the present invention further provides a request processing device, and a request processing device described below and a request processing method described above may be referred to in correspondence with each other.
Referring to fig. 4, the request processing apparatus includes:
a memory D1 for storing computer programs;
a processor D2 for implementing the steps of the request processing method of the above-described method embodiment when executing the computer program.
Referring to fig. 5, fig. 5 is a schematic diagram of a specific structure of a request processing device according to this embodiment, which may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) storing an application 342 or data 344. Memory 332 and storage media 330 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instructions operating on a data processing device. Still further, the central processor 322 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the request processing device 301.
The request processing apparatus 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341. Such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The steps in the request processing method described above may be implemented by the structure of the request processing device.
Example five:
corresponding to the above method embodiment, the embodiment of the present invention further provides a readable storage medium, and a readable storage medium described below and a request processing method described above may be referred to in correspondence with each other.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the request processing method of the above-mentioned method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
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.

Claims (10)

1. A method for processing a request, comprising:
receiving a target request and acquiring a target serial number corresponding to the target request;
inputting the target sequence number into a time label calculation model with a volume IOPS upper limit value for calculation to obtain a target time label;
setting the target time tag for the target request to obtain a target waiting request, and putting the target waiting request into a waiting queue;
and when the current time reaches or exceeds the target time tag, releasing the target waiting request and providing data service corresponding to the target waiting request.
2. The request processing method according to claim 1, wherein inputting the target sequence number into a time stamp calculation model having a volume IOPS upper limit value to perform calculation, and obtaining a target time stamp comprises:
inputting the target sequence number to Ti=T0Calculating in + i/V to obtain target time label Ti(ii) a Wherein i is the target sequence number, V is a volume IOPS upper limit value, T0The first time stamp to wait for the request.
3. The request processing method according to claim 2, wherein inputting the target sequence number into a time stamp calculation model having a volume IOPS upper limit value to perform calculation, and obtaining a target time stamp includes:
and if no waiting request with a time tag is set at present, taking the current time as the target time tag.
4. The method according to claim 1, wherein the passing the target wait request and providing the data service corresponding to the target wait request when the current time reaches or exceeds the target timestamp comprises:
reading the target time tag when the target waiting request is positioned at the head of the waiting queue;
judging whether the current time reaches or exceeds the target time tag;
and if so, releasing the target waiting request and providing a data service corresponding to the target waiting request.
5. The method according to claim 1, further comprising, after the passing the target wait request and providing the data service corresponding to the target wait request:
removing the target wait request from the wait queue.
6. The request processing method according to any one of claims 1 to 5, wherein before entering the target sequence number into a time stamp calculation model having a volume IOPS upper limit value to perform calculation and obtain a target time stamp, the method further comprises:
and acquiring a volume IOPS upper limit value, and setting the volume IOPS upper limit value in a preset time tag calculation model.
7. The request processing method according to claim 6, further comprising, after the obtaining the volume IOPS upper limit value and setting the volume IOPS upper limit value in a preset time stamp calculation model:
receiving a volume IOPS upper limit value adjustment request, and adjusting the volume IOPS upper limit value in the time tag calculation model to a volume IOPS upper limit value specified by the volume IOPS upper limit value adjustment request.
8. A request processing apparatus, comprising:
the target request receiving module is used for receiving a target request and acquiring a target serial number corresponding to the target request;
a target time tag obtaining module, configured to input the target sequence number into a time tag calculation model with a volume IOPS upper limit value, and calculate the target sequence number to obtain a target time tag;
a target waiting request obtaining module, configured to set the target time tag for the target request to obtain a target waiting request, and place the target waiting request into a waiting queue;
and the target waiting request processing module is used for releasing the target waiting request and providing data service corresponding to the target waiting request when the current time reaches or exceeds the target time tag.
9. A request processing device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the request processing method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the request processing method according to any one of claims 1 to 7.
CN201811094505.3A 2018-09-19 2018-09-19 Request processing method, device, equipment and readable storage medium Active CN109062518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811094505.3A CN109062518B (en) 2018-09-19 2018-09-19 Request processing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811094505.3A CN109062518B (en) 2018-09-19 2018-09-19 Request processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN109062518A CN109062518A (en) 2018-12-21
CN109062518B true CN109062518B (en) 2021-09-17

Family

ID=64762289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811094505.3A Active CN109062518B (en) 2018-09-19 2018-09-19 Request processing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN109062518B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927231A (en) * 2014-03-31 2014-07-16 华中科技大学 Data-oriented processing energy consumption optimization dataset distribution method
US8838841B2 (en) * 2012-07-30 2014-09-16 HGST Netherlands B.V. Method and structure enabling improved native command queueing in a data storage device
CN104679575A (en) * 2013-11-28 2015-06-03 阿里巴巴集团控股有限公司 Control system and control method for input and output flow
CN107133100A (en) * 2017-04-26 2017-09-05 新华三技术有限公司 Storage system service quality Q oS control methods and device
US9785360B1 (en) * 2015-06-29 2017-10-10 EMC IP Holding Company LLC Adaptive and dynamic mixed read/write input/output balancer
CN107959635A (en) * 2017-11-23 2018-04-24 郑州云海信息技术有限公司 A kind of IOPS control method and device based on token bucket algorithm

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10642763B2 (en) * 2016-09-20 2020-05-05 Netapp, Inc. Quality of service policy sets

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8838841B2 (en) * 2012-07-30 2014-09-16 HGST Netherlands B.V. Method and structure enabling improved native command queueing in a data storage device
CN104679575A (en) * 2013-11-28 2015-06-03 阿里巴巴集团控股有限公司 Control system and control method for input and output flow
CN103927231A (en) * 2014-03-31 2014-07-16 华中科技大学 Data-oriented processing energy consumption optimization dataset distribution method
US9785360B1 (en) * 2015-06-29 2017-10-10 EMC IP Holding Company LLC Adaptive and dynamic mixed read/write input/output balancer
CN107133100A (en) * 2017-04-26 2017-09-05 新华三技术有限公司 Storage system service quality Q oS control methods and device
CN107959635A (en) * 2017-11-23 2018-04-24 郑州云海信息技术有限公司 A kind of IOPS control method and device based on token bucket algorithm

Also Published As

Publication number Publication date
CN109062518A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN108376112B (en) Pressure testing method, device and readable medium
EP2266020B1 (en) Using priority to determine whether to queue an input/output (i/o) request directed to storage
KR101839392B1 (en) Method and computing device for managing size of thread pool dynamically
CN106681661B (en) Read-write scheduling method and device in solid state disk
CN106557369A (en) A kind of management method and system of multithreading
CN108958975B (en) Method, device and equipment for controlling data recovery speed
CN102981944B (en) A kind of log storing method based on file system
CN110297743B (en) Load testing method and device and storage medium
CN109246033B (en) Request processing method, device, equipment and readable storage medium
CN109062518B (en) Request processing method, device, equipment and readable storage medium
CN114327894A (en) Resource allocation method, device, electronic equipment and storage medium
US20180217875A1 (en) Data processing system and data processing method
US11204883B1 (en) Data storage system with access completion uniformity
CN110650206B (en) IO flow control method and device in distributed storage system and storage medium
US7890958B2 (en) Automatic adjustment of time a consumer waits to access data from queue during a waiting phase and transmission phase at the queue
WO2015075803A1 (en) Information processing device, method, program, and storage medium
CN107220166A (en) The statistical method and device of a kind of CPU usage
CN111966301B (en) Migration speed control method, device and medium for distributed object storage system
JP6848278B2 (en) Storage management device, performance adjustment method and performance adjustment program
CN115269289A (en) Slow disk detection method and device, electronic equipment and storage medium
JP2576805B2 (en) Disk controller
CN111586088B (en) Synchronous flow control method, system, device and readable storage medium
CN113032369A (en) Data migration method, device and medium
CN113381941B (en) Task scheduling method and device, electronic equipment and computer storage medium
CN111083063B (en) Method and device for dynamically adjusting down-pressure

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