CN109992217B - Service quality control method and device, electronic equipment and storage medium - Google Patents

Service quality control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109992217B
CN109992217B CN201910290104.3A CN201910290104A CN109992217B CN 109992217 B CN109992217 B CN 109992217B CN 201910290104 A CN201910290104 A CN 201910290104A CN 109992217 B CN109992217 B CN 109992217B
Authority
CN
China
Prior art keywords
read
write request
write
sequence length
sequential
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
CN201910290104.3A
Other languages
Chinese (zh)
Other versions
CN109992217A (en
Inventor
施培任
张在理
刘树亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910290104.3A priority Critical patent/CN109992217B/en
Publication of CN109992217A publication Critical patent/CN109992217A/en
Application granted granted Critical
Publication of CN109992217B publication Critical patent/CN109992217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • 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]

Abstract

The application provides a service quality control method, which comprises the following steps: searching each element in the hash array according to the first IO initial address of the read-write request so as to determine the first read-write request sequence length of the read-write request; judging whether the sequence length of the first read-write request is greater than a preset threshold value or not; if yes, the read-write request is determined to be sequential read-write; if not, determining the read-write request as random read-write; and controlling the service quality according to the sequential reading and writing or the random reading and writing. Therefore, the method and the device avoid the problem that the host computer in the related technology can carry out random and sequential two different read-write modes on the same logic unit, which easily causes excessive control to reduce the system performance; the service quality is improved, and the user experience is improved. The application also provides a service quality control device, an electronic device and a computer readable storage medium, which all have the beneficial effects.

Description

Service quality control method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of quality of service technologies, and in particular, to a method and an apparatus for controlling quality of service, an electronic device, and a computer-readable storage medium.
Background
In a computer Storage Area Network (SAN) type storage system, because resources of each layer on an IO stack and overall performance are limited, including front-end host channels such as a Fibre Channel or Iscsi network, a Cache, a CPU processing capability, and a back-end disk performance, one storage system supports access by a plurality of hosts, the hosts share and compete for storage resources, and in order to avoid extreme unevenness in application performance on different hosts or different logic units due to uneven resource preemption and allocation, the storage system provides a control function related to quality of service QOS. The general method of service quality control of SAN storage system is to use host computer and logic unit as object to limit IOPS and MBPS, which can meet the requirement under the condition of stable host computer IO characteristics (IOPS, MBPS, block size and random sequence proportion), but the random and sequential read-write performances supported by the storage system are different, especially the random and sequential read-write performances on the mechanical disk system are greatly different, one mechanical disk random read-write IOPS is between 100 and 300, and sequential read-write can be over 10000, i.e. the random and sequential read-write performances are different by tens or hundreds times, for the same logic unit LU, it can be divided into multiple logic partitions at the host computer end for different applications, or the same partition is shared and stored for multiple applications, which can lead the host computer to carry out two different read-write modes of random and sequential operation on the same logic unit, therefore, the service quality cannot be guaranteed, and the control is excessive to reduce the system performance.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a service quality control method, a service quality control device, electronic equipment and a computer readable storage medium, wherein a first read-write request sequence length of a read-write request is determined by utilizing a hash array, the read-write type is distinguished according to the relation between the first read-write request sequence length and a preset threshold value, and then the service quality control is carried out according to the read-write type, so that the problem that a host in the related technology can carry out random and sequential two different read-write modes on the same logic unit is avoided, the service quality is ensured to be low, and further, the control is easy to be excessive so as to reduce the system performance is avoided; the service quality is improved, and the user experience is improved. The specific scheme is as follows:
the application provides a service quality control method, which comprises the following steps:
searching each element in the hash array according to a first IO initial address of the read-write request so as to determine a first read-write request sequence length of the read-write request;
judging whether the sequence length of the first read-write request is greater than a preset threshold value or not;
if so, determining the read-write request as sequential read-write; if not, determining the read-write request as random read-write;
and controlling the service quality according to the sequential reading and writing or the random reading and writing.
Preferably, searching each element in the hash array according to the first IO start address of the read-write request to determine the first read-write request sequence length of the read-write request, includes:
searching each element in the hash array according to the first IO initial address of the read-write request;
when the first IO starting address is equal to the sum of a second IO starting address of an element in the hash array and a second read-write request sequence length, determining that the first read-write request sequence length is the sum of the second read-write request sequence length and an original read-write request sequence length corresponding to the read-write request.
Preferably, before determining the first read-write request sequence length of the read-write request, the method further includes:
and recording the data information of the read-write request in the hash array.
Preferably, the performing quality of service control according to the sequential reading and writing or the random reading and writing includes:
caching read-write data corresponding to the read-write request according to the read-write type to obtain cached data; wherein the read-write type comprises the sequential read-write and the random read-write;
judging whether the number of the read-write requests corresponding to the read-write type is a multiple of an expected threshold value; wherein the desired threshold is denoted as Freq;
if the read-write request is multiple of the expected threshold, determining waiting time according to the receiving time of the read-write request and the receiving time of the reading-write request of the last Freq of the corresponding read-write type, and responding to the result of the read-write request after prolonging the waiting time;
if the current time is not a multiple of the expected threshold, judging whether the mth read-write request completes the delay waiting or not, if the mth read-write request does not complete the delay waiting, performing the delay waiting, and if the mth read-write request completes the delay waiting, responding to the result of the read-write request; and the mth read-write request is the read-write request of the last expected threshold multiple.
The application provides a quality of service control device, includes:
the length determining module is used for searching each element in the hash array according to a first IO initial address of the read-write request so as to determine the sequence length of a first read-write request of the read-write request;
the judging module is used for judging whether the sequence length of the first read-write request is greater than a preset threshold value or not;
the identification module is used for determining that the read-write request is sequential read-write if the read-write request is sequential read-write; if not, determining the read-write request to be random read-write;
and the control module is used for controlling the service quality according to the sequential reading and writing or the random reading and writing.
Preferably, the length determination module comprises:
the searching unit is used for searching each element in the hash array according to the first IO initial address of the read-write request;
a length determining unit, configured to determine that the first read-write request sequence length is a sum of a second read-write request sequence length and an original read-write request sequence length corresponding to the read-write request, when the first IO start address is equal to a sum of a second IO start address of an element in the hash array and the second read-write request sequence length.
Preferably, the method further comprises the following steps:
and the recording module is used for recording the data information of the read-write request in the hash array.
Preferably, the control module comprises: the processing unit is used for caching the read-write data corresponding to the read-write request according to the read-write type to obtain cache data; wherein the read-write type comprises the sequential read-write and the random read-write;
the judging unit is used for judging whether the number of the read-write requests corresponding to the read-write type is a multiple of an expected threshold value; wherein the desired threshold is denoted as Freq;
a response unit, configured to determine, if the read-write request is a multiple of the expected threshold, a waiting time according to the receiving time of the read-write request and the receiving time of the last Freq read-write request of the corresponding read-write type, and respond to a result of the read-write request after the waiting time is prolonged; if the current time is not a multiple of the expected threshold, judging whether the mth read-write request completes the delay waiting or not, if the mth read-write request does not complete the delay waiting, performing the delay waiting, and if the mth read-write request completes the delay waiting, responding to the result of the read-write request; and the mth read-write request is the read-write request of the last expected threshold multiple.
The application provides an electronic device, including:
a memory for storing a computer program;
a processor for implementing the steps of the quality of service control method as described above when executing said computer program.
The present application provides a computer readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the quality of service control method as described above.
The application provides a service quality control method, which comprises the following steps: searching each element in the hash array according to a first IO initial address of the read-write request so as to determine a first read-write request sequence length of the read-write request; judging whether the sequence length of the first read-write request is greater than a preset threshold value or not; if so, determining the read-write request as sequential read-write; if not, determining the read-write request as random read-write; and controlling the service quality according to the sequential reading and writing or the random reading and writing. Therefore, the method and the device determine the first read-write request sequence length of the read-write request by utilizing the hash array, distinguish the read-write type according to the relation between the first read-write request sequence length and the preset threshold value, and further perform service quality control according to the read-write type, thereby avoiding that a host in the related art possibly performs random and sequential two different read-write modes on the same logic unit, which easily causes inflexible service quality control, and easily causes excessive control or does not meet the performance requirements of two types of random sequence services; the service quality is improved, and the user experience is improved. The application also provides a service quality control device, an electronic device and a computer readable storage medium, all having the above beneficial effects, which 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 method for controlling quality of service according to an embodiment of the present application;
fig. 2 is a flowchart of another qos control method provided in an embodiment of the present application;
fig. 3 is a flowchart of another qos control method provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a qos control apparatus according to an embodiment of the present application.
Detailed Description
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.
In the related art, the host may perform two different read-write modes, i.e., random and sequential, on the same logic unit, so that the quality of service cannot be guaranteed, and the performance of the system is reduced due to excessive control. Based on the above technical problems, this embodiment provides a service quality control method, in which a hash array is used to determine a first read-write request sequence length of a read-write request, and a read-write type is distinguished according to a relationship between the first read-write request sequence length and a preset threshold, so as to perform service quality control according to the read-write type, thereby avoiding that a host in the related art may perform two random and sequential different read-write modes on the same logic unit, which may cause low service quality assurance and further cause excessive control to reduce system performance; the service quality is improved, and the user experience is improved. Referring to fig. 1, fig. 1 is a flowchart of a method for controlling quality of service according to an embodiment of the present application, which specifically includes:
s101, searching each element in the hash array according to the first IO initial address of the read-write request so as to determine the first read-write request sequence length of the read-write request.
The purpose of this step is to find each element in the hash array through the first IO start address of the write request, and further determine the first read-write request sequence length of the read-write request. In this embodiment, after receiving the read-write request, each element in the hash array is searched according to the first IO start address of the read-write request, so as to determine the first read-write request sequence length of the read-write request, specifically, after receiving the read-write request, each element in the hash array is searched according to the first IO start address of the read-write request, so as to determine the first read-write request sequence length of the read-write request.
Hash array IO _ TABLE records history information of read-write requests, each array element is a linked list, and the elements of the linked list comprise the following structures: IO _ Start (IO Start address), IO _ Size (read-write request sequence length), IO _ Count (IO number), Last _ Req _ Id (Last IO sequence number), and Last _ Req _ Time (Last Time). Each logical unit records the number of reads or writes to the logical unit with a variable, which is tolcount. After receiving a host read or write request, calculating the serial number Req _ Id of the request by adding 1 to the TOL _ COUNT atom to obtain the serial number of the IO. Calculating an element Index of the read-write request corresponding to the hash array IO _ TABLE: index Req _ Start/Seq _ Size% Hash _ Magic; where Req _ Start indicates the Start address of the read/write request, Seq _ Size indicates the Size of a sequential stream, e.g., 2MB, 4MB, and Hash _ Magic is the Size of the Hash array IO _ TABLE, typically a prime number, e.g., 8219.
And searching a linked list corresponding to the element Index in the hash array IO _ TABLE, and performing notational operation on each linked list element. If the current Time is later than the Last _ Req _ Time of the element by a preset Time length, deleting the element; and if the Req _ Id of the read-write request is larger than the Last _ Req _ Id of the element by a preset threshold value, deleting the element. The first read-write request sequence length is obtained, where the first read-write request sequence length may be an original length of the first read-write request sequence length, or may be a length obtained by detecting an element in the hash array to associate data overlapping or adjacent to the current read-write request, and the length may be specifically set according to an actual situation as long as the purpose of this embodiment is met.
S102, judging whether the sequence length of the first read-write request is larger than a preset threshold value.
The preset threshold is not limited in the embodiment, and the user can set the threshold according to actual requirements. The preset threshold is mainly used for distinguishing sequential reading and writing or random reading and writing, when the sequential length of the first reading and writing request is smaller than the preset threshold, the random reading and writing is performed, and when the sequential length of the first reading and writing request is larger than the preset threshold, the sequential reading and writing is performed.
S103, determining the read-write request as sequential read-write.
When the sequence length of the first read-write request is greater than the preset threshold, step S103 is executed to determine that the read-write request is sequential read-write.
And S104, determining the read-write request as random read-write.
When the sequence length of the first read-write request is smaller than the preset threshold, step S104 is executed to determine that the read-write request is sequential read-write.
And S105, controlling the service quality according to the sequential reading and writing or the random reading and writing.
The service quality control is carried out according to sequential reading and writing or reading and writing immediately, at the moment, because two reading and writing types of random and sequential are distinguished, the improvement of the reading and writing performance of the system is facilitated, the reading and writing response capability is improved, and the service quality is further improved.
Based on the technical scheme, the embodiment determines the first read-write request sequence length of the read-write request by using the hash array, distinguishes the read-write type according to the relation between the first read-write request sequence length and the preset threshold value, and further performs service quality control according to the read-write type, so that the problem that a host in the related art may perform random and sequential two different read-write modes on the same logic unit, and inaccurate control is caused is avoided; the embodiment improves the service quality and improves the user experience.
Based on the foregoing embodiments, the present embodiment provides a method for controlling quality of service, specifically referring to fig. 2, where fig. 2 is a flowchart of another method for controlling quality of service provided in the present embodiment, and the method includes:
s201, searching each element in the hash array according to the first IO initial address of the read-write request.
S202, when the first IO initial address is equal to the sum of the second IO initial address of the element in the hash array and the second read-write request sequence length, determining that the first read-write request sequence length is the sum of the second read-write request sequence length and the original read-write request sequence length corresponding to the read-write request.
Specifically, when the first IO start address is equal to the sum of the second IO start address of the element in the hash array and the second read-write request sequence length, it is determined that the first read-write request sequence length is the sum of the second read-write request sequence length and the original read-write request sequence length corresponding to the read-write request.
And if IO _ Start + IO _ Size is equal to the initial address Req _ Start of the read-write request, modifying the following element fields, wherein IO _ Start + IO _ Size is the sum of the second IO initial address and the second read-write request sequence length:
IO_Size=IO_Size+Req_Size,
IO_Count=IO_Count+1,
Last_Req_Id=Req_Id,
last _ Req _ Time is current Time;
wherein, Req _ Size is the length of the current read-write request, i.e. the sequence length of the read-write request, Req _ Id is the current read-write request sequence number, Last _ Req _ Id is the Last request sequence number, IO _ Count is the current request number, and Last _ Req _ Time is the Last request Time.
Furthermore, if a section of continuous IO request is not found, the read-write request information of this time is inserted into the linked list,
IO_Size=Req_Size,
IO_Count=1,
Last_Req_Id=Req_Id,
last _ Req _ Time equals the current Time,
IO_Start=Req_Start;
wherein, Req _ Size is the length of the current read-write request, i.e. the sequence length of the read-write request, Req _ Id is the current read-write request sequence number, Last _ Req _ Id is the Last request sequence number, IO _ Count is the current request number, Last _ Req _ Time is the Last request Time, and Req _ Start is the Start address of the current read-write request.
S203, judging whether the sequence length of the first read-write request is larger than a preset threshold value.
And S204, determining the read-write request as sequential read-write.
After step S203, if the sequence length of the first read/write request is greater than the preset threshold, step S204 is executed to determine that the read/write request is sequential read/write.
And S205, determining the read-write request to be random read-write.
After step S203, if the sequence length of the first read/write request is not greater than the preset threshold, step S205 is executed to determine that the read/write request is random read/write.
And S206, performing service quality control according to the sequential reading and writing or the random reading and writing.
And after the type of the read-write request is determined, performing service quality control according to sequential read-write or random read-write.
Based on the above technical solution, in this embodiment, each element in the hash array is searched by using the first IO start address according to the read-write request; when the first IO initial address is equal to the sum of the second IO initial address of the element in the hash array and the second read-write request sequence length, determining that the first read-write request sequence length is the sum of the second read-write request sequence length and the original read-write request sequence length corresponding to the read-write request to determine the first read-write request sequence length, merging and sorting information corresponding to the read-write request, and further performing service quality control according to sequential read-write or random read-write, so that the service quality is improved, and the user experience is improved.
Based on the foregoing embodiments, the present embodiment provides a method for controlling quality of service, specifically referring to fig. 3, where fig. 3 is a flowchart of another method for controlling quality of service provided in the present embodiment, and the method includes:
s301, searching each element in the hash array according to the first IO initial address of the read-write request so as to determine the first read-write request sequence length of the read-write request.
S302, whether the sequence length of the first read-write request is larger than a preset threshold value is judged.
And S303, determining the read-write request to be sequential read-write.
After step S302, if the sequence length of the first read/write request is greater than the preset threshold, step S303 is executed to determine that the read/write request is sequential read/write.
And S304, determining the read-write request to be random read-write.
After step S302, if the sequence length of the first read/write request is not greater than the preset threshold, step S304 is executed to determine that the read/write request is random read/write.
S305, caching read-write data corresponding to the read-write request according to the read-write type to obtain cached data; the read-write type comprises sequential read-write and random read-write.
And carrying out caching processing according to the read-write type to obtain caching data. Specifically, the receiving time of each read-write request is recorded when the read-write request is received, and the receiving time of the Last Freq +1 read-write requests of the history of the random read-write or sequential read-write type and the total request length of the Last Freq read-write requests, namely Last _ Freq _ Size, are recorded. Freq is a preset expected threshold value for delay control every time Freq IOs are processed, and 0.001 second < ═ Freq/IOPS limit value < > 0.01 second is set.
S306, judging whether the number of the read-write requests corresponding to the read-write type is a multiple of an expected threshold value; the desired threshold is denoted Freq.
S307, judging whether the mth read-write request completes the delay waiting or not, if not, performing the delay waiting, and if so, responding to the result of the read-write request; wherein the mth read-write request is the read-write request of the last expected threshold multiple.
After step S306, if the number is not a multiple of the expected threshold, step S307 is executed to determine whether the mth read-write request completes the delay wait, if the mth read-write request does not complete the delay wait, the delay wait is performed, and if the mth read-write request completes the delay wait, the result of the read-write request is responded; wherein the mth read-write request is the read-write request of the last expected threshold multiple.
S308, determining waiting time according to the receiving time of the read-write request and the receiving time of the last Freq read-write request of the corresponding read-write type, and responding to the result of the read-write request after prolonging the waiting time.
After step S306, if the multiple of the expected threshold is obtained, step S308 is executed to determine the waiting time according to the receiving time of the read-write request and the receiving time of the read-write request of the last Freq of the corresponding read-write type, and the result of responding to the read-write request is obtained after the waiting time is prolonged.
Specifically, the number of read-write requests of the type is accumulated according to the random read-write or sequential read-write type, the read-write requests are normally processed until a result (namely SCSI _ RESPONSE) is sent, and whether the number of the read-write requests corresponding to the read-write type is a multiple of an expected threshold value is judged to determine RESPONSE.
If the number of the read-write requests of the type is not a multiple of Freq, judging whether the mth read-write request completes the delay waiting or not, if not, performing the delay waiting, and if so, responding to the result of the read-write request; wherein the mth read-write request is the read-write request of the last expected threshold multiple. It is noted that during the latency waiting period, other unanswered read and write requests also suspend waiting without answering.
If the read-write request is multiple of the expected threshold, determining the waiting time according to the receiving time of the read-write request and the receiving time of the reading-write request of the last Freq of the corresponding read-write type, and responding to the result of the read-write request after prolonging the waiting time. Specifically, the number of read/write requests of this type is a multiple of Freq, and if the IOPS of this type of read/write requests is set, the Wait time limiting the IOPS, i.e., IOPS _ Wait, is calculated, otherwise, IOPS _ Wait is 0, which means that no Wait is needed: iops _ Wait ═ ((1/Iops) × Freq) - (current time- (reception time of the request of the last Freq of this type of read-write request)). The number of the read-write requests of the type is a multiple of Freq, if the MBPS of the read-write requests of the type is set, the waiting time Mbps _ Wait of the MBPS is limited by calculation, otherwise, the Mbps _ Wait is 0, which means that waiting is not needed: mbps _ Wait ═ ((1/Mbps) × Last _ Freq _ Size) - (current time- (reception time of the request of the Last Freq of this type of read-write request)). And if the Iops _ Wait or the Mbps _ Wait is larger than 0, the largest one of the Iops _ Wait and the Mbps _ Wait is selected, and the read-write request result (SCSI _ RESPONSE) is responded after the corresponding delay time.
Based on the technical scheme, the embodiment determines the first read-write request sequence length of the read-write request by using the hash array, distinguishes the read-write type according to the relation between the first read-write request sequence length and the preset threshold value, and further performs service quality control according to the read-write type, so that the problem that a host in the related art may perform random and sequential two different read-write modes on the same logic unit, and inaccurate control is caused is avoided; the embodiment improves the service quality and improves the user experience.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a qos control apparatus provided in an embodiment of the present application, where the qos control apparatus described below and the qos control method described above are referred to in correspondence, and the qos control apparatus described below and the qos control method described above are all disposed therein, and fig. 4 is a schematic structural diagram of the qos control apparatus provided in an embodiment of the present application, and includes:
a length determining module 401, configured to search each element in the hash array according to the first IO start address of the read-write request, so as to determine a first read-write request sequence length of the read-write request;
a determining module 402, configured to determine whether a sequence length of the first read/write request is greater than a preset threshold;
an identifying module 403, configured to determine that the read-write request is sequential read-write if the read-write request is sequential read-write; if not, determining that the read-write request is random read-write;
and a control module 404, configured to perform quality of service control according to sequential reading and writing or random reading and writing.
In some specific embodiments, the length determination module 401 includes:
the searching unit is used for searching each element in the hash array according to the first IO initial address of the read-write request;
and the length determining unit is used for determining that the first read-write request sequence length is the sum of the second read-write request sequence length and the original read-write request sequence length corresponding to the read-write request when the first IO starting address is equal to the sum of the second IO starting address of the element in the hash array and the second read-write request sequence length.
In some specific embodiments, the method further comprises:
and the recording module is used for recording the data information of the read-write request in the hash array.
In some specific embodiments, the control module 504 includes:
the processing unit is used for caching the read-write data corresponding to the read-write request according to the read-write type to obtain cache data; the read-write type comprises sequential read-write and random read-write;
the judging unit is used for judging whether the number of the read-write requests corresponding to the read-write type is a multiple of an expected threshold value; wherein, the expected threshold is recorded as Freq;
the response unit is used for determining waiting time according to the receiving time of the read-write request and the receiving time of the reading-write request of the last Freq of the corresponding read-write type if the response unit is a multiple of the expected threshold, and responding to the result of the read-write request after the waiting time is prolonged; if the current time is not a multiple of the expected threshold, judging whether the mth read-write request completes the delay waiting or not, if not, performing the delay waiting, and if so, responding to the result of the read-write request; wherein the mth read-write request is the read-write request of the last expected threshold multiple.
Since the embodiment of the qos control apparatus corresponds to the embodiment of the qos control method, reference is made to the description of the embodiment of the qos control method for the embodiment of the qos control apparatus, and details are not repeated here.
In the following, an electronic device provided by this embodiment is described, and the electronic device described below and the service quality control method described above may be referred to correspondingly.
The present embodiment provides an electronic device, including:
a memory for storing a computer program;
a processor for implementing the steps of the quality of service control method as described above when executing a computer program.
Since the embodiment of the electronic device portion corresponds to the embodiment of the qos control method portion, please refer to the description of the embodiment of the qos control method portion for the embodiment of the electronic device portion, which is not repeated here.
A computer-readable storage medium provided in this embodiment is described below, and the computer-readable storage medium described below and the quality of service control method described above may be referred to correspondingly.
The present implementation provides a computer-readable storage medium having stored thereon a computer program, which when executed by a processor, performs the steps of the quality of service control method as described above.
Since the embodiment of the computer-readable storage medium portion corresponds to the embodiment of the qos control method portion, please refer to the description of the embodiment of the qos control method portion for the embodiment of the computer-readable storage medium portion, which is not repeated here.
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 steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
A service quality control method, a service quality control apparatus, an electronic device, and a computer-readable storage medium provided by the present application are described in detail above. 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 should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (8)

1. A method for quality of service control, comprising:
searching each element in the hash array according to a first IO initial address of the read-write request so as to determine a first read-write request sequence length of the read-write request;
judging whether the sequence length of the first read-write request is greater than a preset threshold value or not;
if so, determining the read-write request as sequential read-write; if not, determining the read-write request as random read-write;
performing service quality control according to the sequential reading and writing or the random reading and writing;
the method for searching each element in the hash array according to the first IO starting address of the read-write request so as to determine the first read-write request sequence length of the read-write request comprises the following steps:
searching each element in the hash array according to the first IO initial address of the read-write request;
when the first IO starting address is equal to the sum of a second IO starting address of an element in the hash array and a second read-write request sequence length, determining that the first read-write request sequence length is the sum of the second read-write request sequence length and an original read-write request sequence length corresponding to the read-write request.
2. The qos control method according to claim 1, further comprising, after searching for each element in a hash array according to a first IO start address of a read/write request to determine a first read/write request sequence length of the read/write request:
and recording the data information of the read-write request in the hash array.
3. The qos control method according to claim 1 or 2, wherein performing qos control according to the sequential reading and writing or the random reading and writing includes:
caching read-write data corresponding to the read-write request according to the read-write type to obtain cached data; wherein the read-write type comprises the sequential read-write and the random read-write;
judging whether the number of the read-write requests corresponding to the read-write type is a multiple of an expected threshold value; wherein the desired threshold is denoted as Freq;
if the read-write request is multiple of the expected threshold, determining waiting time according to the receiving time of the read-write request and the receiving time of the reading-write request of the last Freq of the corresponding read-write type, and responding to the result of the read-write request after prolonging the waiting time;
if the current time is not a multiple of the expected threshold, judging whether the mth read-write request completes the delay waiting or not, if the mth read-write request does not complete the delay waiting, performing the delay waiting, and if the mth read-write request completes the delay waiting, responding to the result of the read-write request; and the mth read-write request is the read-write request of the last expected threshold multiple.
4. A quality of service control apparatus, comprising:
the length determining module is used for searching each element in the hash array according to a first IO initial address of the read-write request so as to determine the sequence length of a first read-write request of the read-write request;
the judging module is used for judging whether the sequence length of the first read-write request is greater than a preset threshold value or not;
the identification module is used for determining that the read-write request is sequential read-write if the read-write request is sequential read-write; if not, determining the read-write request to be random read-write;
the control module is used for controlling the service quality according to the sequential reading and writing or the random reading and writing;
wherein the length determination module comprises:
the searching unit is used for searching each element in the hash array according to the first IO initial address of the read-write request;
a length determining unit, configured to determine that the first read-write request sequence length is a sum of a second read-write request sequence length and an original read-write request sequence length corresponding to the read-write request, when the first IO start address is equal to a sum of a second IO start address of an element in the hash array and the second read-write request sequence length.
5. The apparatus of claim 4, further comprising:
and the recording module is used for recording the data information of the read-write request in the hash array.
6. The QoS control device according to claim 4 or 5, wherein the control module comprises:
the processing unit is used for caching the read-write data corresponding to the read-write request according to the read-write type to obtain cache data; wherein the read-write type comprises the sequential read-write and the random read-write;
the judging unit is used for judging whether the number of the read-write requests corresponding to the read-write type is a multiple of an expected threshold value; wherein the desired threshold is denoted as Freq;
a response unit, configured to determine, if the read-write request is a multiple of the expected threshold, a waiting time according to the receiving time of the read-write request and the receiving time of the last Freq read-write request of the corresponding read-write type, and respond to a result of the read-write request after the waiting time is prolonged; if the current time is not a multiple of the expected threshold, judging whether the mth read-write request completes the delay waiting or not, if the mth read-write request does not complete the delay waiting, performing the delay waiting, and if the mth read-write request completes the delay waiting, responding to the result of the read-write request; and the mth read-write request is the read-write request of the last expected threshold multiple.
7. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the quality of service control method according to any one of claims 1 to 3 when executing said computer program.
8. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the quality of service control method according to any one of claims 1 to 3.
CN201910290104.3A 2019-04-11 2019-04-11 Service quality control method and device, electronic equipment and storage medium Active CN109992217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910290104.3A CN109992217B (en) 2019-04-11 2019-04-11 Service quality control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910290104.3A CN109992217B (en) 2019-04-11 2019-04-11 Service quality control method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109992217A CN109992217A (en) 2019-07-09
CN109992217B true CN109992217B (en) 2020-05-29

Family

ID=67133279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910290104.3A Active CN109992217B (en) 2019-04-11 2019-04-11 Service quality control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109992217B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905345B (en) * 2021-02-23 2024-04-05 深圳市网心科技有限公司 Task allocation method, distributed storage system and server

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108052279A (en) * 2017-11-23 2018-05-18 深圳市江波龙电子有限公司 A kind of method, apparatus, equipment and storage medium for promoting flash memory performance
CN109460186A (en) * 2018-11-02 2019-03-12 深圳忆联信息系统有限公司 A kind of method and its system promoting solid state hard disk reading performance
CN109582515A (en) * 2018-12-03 2019-04-05 郑州云海信息技术有限公司 A kind of hard disk detection method, system and electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108052279A (en) * 2017-11-23 2018-05-18 深圳市江波龙电子有限公司 A kind of method, apparatus, equipment and storage medium for promoting flash memory performance
CN109460186A (en) * 2018-11-02 2019-03-12 深圳忆联信息系统有限公司 A kind of method and its system promoting solid state hard disk reading performance
CN109582515A (en) * 2018-12-03 2019-04-05 郑州云海信息技术有限公司 A kind of hard disk detection method, system and electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109992217A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
CN106547476B (en) Method and apparatus for data storage system
EP3229142B1 (en) Read cache management method and device based on solid state drive
CN109756230B (en) Data compression storage method, data compression method, device, equipment and medium
US9507720B2 (en) Block storage-based data processing methods, apparatus, and systems
US10417137B2 (en) Flushing pages from solid-state storage device
WO2017185579A1 (en) Method and apparatus for data storage
EP3252609A1 (en) Cache data determination method and device
JP2006351004A (en) Memory management method of mobile terminal
US8065466B2 (en) Library apparatus, library system and method for copying logical volume to disk volume in cache disk with smallest access load
CN110688062B (en) Cache space management method and device
CN109240607B (en) File reading method and device
CN106201652B (en) Data processing method and virtual machine
US20160170656A1 (en) Implementing enhanced performance flash memory devices
CN108874324B (en) Access request processing method, device, equipment and readable storage medium
CN102096556A (en) Method for copying data as well as method, device and system for reading data
US9612746B1 (en) Allocation method for meeting system performance and application service level objective (SLO)
CN112231242A (en) Data caching method, storage control device and storage equipment
JPWO2017006675A1 (en) Information processing system, storage control device, storage control method, and storage control program
CN109992217B (en) Service quality control method and device, electronic equipment and storage medium
CN108132759B (en) Method and device for managing data in file system
CN117251275A (en) Multi-application asynchronous I/O request scheduling method, system, equipment and medium
CN110045924B (en) Hierarchical storage method and device, electronic equipment and computer readable storage medium
CN110647476B (en) Method, device and equipment for writing data in solid state disk and storage medium
JPWO2013046342A1 (en) Virtual tape device and control method of virtual tape device
JP2021135538A (en) Storage control apparatus and storage control program

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