A Quality of Service Control Method, Device, Equipment and Storage Medium

By setting up service quality information of the service directory on the HDFS server and using the metadata server to perform service quality detection and control, the problem of how to effectively control the service quality of the HDFS service directory is solved, and efficient service quality management and concurrent processing capabilities are achieved.

CN115426374BActive Publication Date: 2025-05-27JINAN INSPUR DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211040109.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2025-05-27
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

How to effectively implement service quality control of the service directory of the distributed file system HDFS and ensure the storage quality of the overall HDFS service.

Method used

By setting the service quality information of the service directory of the current node in the distributed file system on the server, and receiving the client's detection results through the metadata server, determining the target service directory that needs to be controlled for service quality, and finally deleting the target service directory based on the target service quality information.

Benefits of technology

The service quality control of the HDFS service directory is realized, the resource coupling degree of directory service quality query and judgment is reduced, the system's concurrent processing capabilities are increased, and the target service directory is deleted and cleaned through the server, ensuring the service quality of the service directory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115426374B_ABST
    Figure CN115426374B_ABST
Patent Text Reader

Abstract

The present application discloses a service quality control method, apparatus, device and storage medium, which relates to the technical field of distributed file system storage. Applied to the server, the method includes: setting service quality information of a service directory of a current node in the distributed file system; receiving, by a metadata server in the server, a detection result of performing hierarchical service quality detection on the service directory based on the service quality information when a client performs a service read / write operation, so as to determine a target service directory that needs to perform service quality control in the service directory according to the detection result; detecting target service quality information corresponding to the target service directory, so as to delete the target service directory according to the target service quality information. Through the technical solution of the present application, the service quality of the service directory can be effectively controlled, thereby ensuring the storage quality of the overall distributed file system storage service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of distributed file system storage, and particularly relates to a service quality control method, device, equipment and storage medium. Background Art

[0002] With the continuous development of Internet technology, the emergence of distributed file systems has effectively solved the problems of data storage and management. A distributed file system is a file system based on the client / server mode. The Hadoop Distributed File System (HDFS), abbreviated as Hadoop Distributed File System, is an implementation of the Hadoop abstract file system. It has many common points with existing distributed file systems. At the same time, its differences from other distributed file systems are also obvious. The files of HDFS are distributed on cluster machines, and replicas are provided at the same time for fault tolerance and reliability assurance. For example, the direct operations of the client to write and read files are distributed on various machines in the cluster, without single-point performance pressure. For the HDFS service file scenario, since users have different services for different service directories, in order to ensure that users obtain the planned service quality, it is necessary to provide Quality of Service (QoS) to limit the qos bandwidth and ops (operation per second) for different service directories, so as to achieve business traffic control and thus ensure the storage quality of the overall HDFS service.

[0003] In summary, how to effectively control the service quality of the service directories of HDFS in a distributed file system and ensure the storage quality of the overall HDFS service is a problem to be solved at present. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a service quality control method, device, equipment and storage medium, which can effectively control the service quality of the service directories of HDFS in a distributed file system and ensure the storage quality of the overall HDFS service. The specific scheme is as follows:

[0005] In the first aspect, the present application discloses a service quality control method, which is applied to a server and includes:

[0006] Set the service quality information of the service directory of the current node in the distributed file system;

[0007] Receive, through the metadata server in the server, the detection results of the step-by-step service quality detection of the service directory by the client based on the service quality information during business read and write operations, so as to determine the target service directory that needs to perform service quality control in the service directory according to the detection results;

[0008] Detect the target service quality information corresponding to the target service directory, so as to delete the target service directory according to the target service quality information.

[0009] Optionally, setting the service quality information of the service directory of the current node in the distributed file system includes:

[0010] Set the upper limit bandwidth of the service directory of the current node in the distributed file system, the number of concurrent requests that can be responded per second, and the directory path of the service directory.

[0011] Optionally, after setting the service quality information of the service directory of the current node in the distributed file system, it further includes:

[0012] Obtain the path identification number corresponding to the directory path, and insert the upper limit bandwidth, the number of concurrent requests that can be responded per second, and the directory path into the dir_qos_map data structure according to the path identification number to obtain a global mapping table;

[0013] Persist the global mapping table and synchronize the global mapping table to each node in the distributed file system.

[0014] Optionally, receiving, by the metadata server in the server, the detection result of the hierarchical service quality detection of the service directory based on the service quality information when the client performs business read and write operations includes:

[0015] When the client performs business read and write operations, traverse the directory path level by level upwards, and judge whether the service quality information is set for the service directory corresponding to the current path identification number based on the global mapping table;

[0016] If the service quality information is set for the service directory, insert the service quality information into the pending queue;

[0017] If the service quality information is not set for the service directory, continue to traverse the directory path level by level upwards until all the directory paths are traversed, then perform hierarchical service quality detection on the pending queue, and send the detection result of the hierarchical service quality detection to the metadata server in the server.

[0018] Optionally, the service quality control method further includes:

[0019] Statistically analyze the service quality information of all service directories in the to-be-processed queue, and filter out the service quality information with the target threshold among the set service quality information, so as to control the service quality of other service directories according to the target threshold.

[0020] Optionally, detecting the target service quality information corresponding to the target service directory, so as to delete the target service directory according to the target service quality information, includes:

[0021] Determine whether the target service directory sets the target service quality information;

[0022] If the target service directory sets the target service quality information, initiate a deletion operation to delete the target service directory, and return after the deletion operation is completed;

[0023] If the target service directory does not set the target service quality information, mark the target service directory, so as to set the service quality information of the marked target service directory.

[0024] In a second aspect, the present application discloses a service quality control method, which is applied to a client and includes:

[0025] When performing business read and write operations, perform hierarchical service quality detection on the service directory based on the service quality information of the current node's service directory in the distributed file system set by the server;

[0026] Send the detection result of the hierarchical service quality detection to the metadata server in the server, and determine the target service directory that needs service quality control in the service directory according to the detection result, so that the metadata server detects the target service quality information corresponding to the target service directory, and deletes the target service directory according to the target service quality information.

[0027] In a third aspect, the present application discloses a service quality control device, which is applied to a server and includes:

[0028] A service quality information setting module, configured to set the service quality information of the service directory of the current node in the distributed file system;

[0029] A service quality detection module, configured to receive, through the metadata server in the server, the detection result of the hierarchical service quality detection of the service directory based on the service quality information when the client performs business read and write operations, so as to determine the target service directory that needs service quality control in the service directory according to the detection result;

[0030] A target service directory deletion module is used to detect target service quality information corresponding to the target service directory, so as to delete the target service directory according to the target service quality information.

[0031] In a fourth aspect, the present application discloses an electronic device, which includes a processor and a memory; wherein, the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the service quality control method as described above.

[0032] In a fifth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the service quality control method as described above.

[0033] In the present application, when applied to a server, first set the service quality information of the service directory of the current node in the distributed file system; then receive, through the metadata server in the server, the detection results of the service quality detection of the service directory level by level based on the service quality information during the business read and write operations by the client, so as to determine the target service directory that needs service quality control in the service directory according to the detection results; finally, detect the target service quality information corresponding to the target service directory, so as to delete the target service directory according to the target service quality information. It can be seen that for the distributed file system, by setting the service quality information of the directory and through the client's service quality judgment and detection mechanism, the service directory is detected level by level and modularly processed, which can reduce the resource coupling degree of directory service quality query and directory service quality judgment, increase the concurrent processing ability of the system. At the same time, the detection results are returned to the server, and the server is used to perform deletion and cleaning operations on the target service directory to achieve service quality control of the service directory. Description of the Drawings

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0035] Figure 1 It is a flowchart of a service quality control method disclosed in the present application;

[0036] Figure 2 It is a schematic diagram of a client service quality judgment and detection mechanism disclosed in the present application;

[0037] Figure 3 It is a diagram of deleting a target service directory disclosed in the present application;

[0038] Figure 4 A specific flowchart of a service quality control method disclosed in the present application;

[0039] Figure 5 A flowchart of a service quality control method disclosed in the present application;

[0040] Figure 6 A schematic structural diagram of a service quality control device disclosed in the present application;

[0041] Figure 7 A structural diagram of an electronic device disclosed in the present application. Specific embodiments

[0042] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0043] Currently, for the HDFS service file scenario, users have different services for different service directories. In order to ensure that users obtain the planned service quality, it is necessary to provide service quality to perform qos bandwidth and ops restrictions on different service directories to achieve business traffic control, thereby ensuring the storage quality of the overall HDFS service.

[0044] To this end, the present application provides a service quality control solution, which can effectively control the service quality of the service directories of HDFS in the distributed file system and ensure the storage quality of the overall HDFS service.

[0045] The embodiments of the present invention disclose a service quality control method. Refer to Figure 1 As shown, it is applied to the server side, and the method includes:

[0046] Step S11: Set the service quality information of the service directory of the current node in the distributed file system.

[0047] In the embodiments of the present application, for the HDFS service in the distributed file system storage server, the service quality of the service directory of the current node is set. When setting the service quality of the service directory, the upper limit bandwidth of the service directory of the current node, the number of concurrent requests (ops) that can be responded per second, and the directory path of the service directory are mainly set.

[0048] It should be noted that each directory path has its own path identification number (ino). According to the path identification number, the upper limit bandwidth, the number of concurrent requests that can be responded per second, and the directory path are inserted into the dir_qos_map data structure to obtain a global mapping table. It can be understood that the path identification number is equivalent to an index. Inserting the quality of service information into the dir_qos_map data structure through the path identification number can achieve global control.

[0049] In the embodiment of the present application, when inserting the quality of service information into the dir_qos_map data structure, it is implemented by using dir_qos_map<ino, QosInfo*>, where QosInfo mainly includes basic data such as the set bandwidth value and the upper limit value of ops.

[0050] Furthermore, the global mapping table is persisted, and the global mapping table is synchronized to each node in the distributed file system. That is, the quality of service set for the service directory is persisted, and each HDFS server is synchronized. In this way, designing the basic control data structure for the quality of service of the service directory can ensure that the qos attribute of the directory remains unchanged even when the directory is renamed.

[0051] Step S12: Receive, through the metadata server in the server, the detection result of the hierarchical quality of service detection of the service directory by the client based on the quality of service information during the business read and write operations, so as to determine, according to the detection result, the target service directory in the service directory that needs to perform quality of service control.

[0052] In the embodiment of the present application, the client will judge and detect the quality of service of the service directory. Specifically, when the client performs business read and write operations, it traverses the directory path step by step upward, and based on the global mapping table, determines whether the service directory corresponding to the current path identification number sets the quality of service information; if the service directory sets the quality of service information, the quality of service information is inserted into the queue to be processed; if the service directory does not set the quality of service information, continue to traverse the directory path step by step upward until all the directory paths are traversed, then perform hierarchical quality of service detection on the queue to be processed, and send the detection result of the hierarchical quality of service detection to the metadata server in the server.

[0053] It can be understood that when there are business read and write I / O (input / output) operations on the client side, the client will process the quality of service of the set service directory. During the traversal process, it is judged whether the service quality information is set for the service directory corresponding to the current path identification number. If the service quality information is set for the service directory corresponding to the current path identification number, the set service quality information can be found in the global mapping table dir_qos_map, and then it is continued to judge whether the service quality information is set for the parent directory of the service directory corresponding to the current path identification number until the root directory is traversed up level by level through the path. As Figure 2 shown is a flowchart of a determination and detection mechanism for a service directory on the client side provided in this embodiment.

[0054] In the embodiment of the present application, if the service directory sets the service quality information, the service quality information is inserted into the queue to be processed. After all paths are traversed, the service quality is detected level by level according to the information in the queue to be processed, and the detection result is sent to the metadata server in the server.

[0055] Step S13: Detect the target service quality information corresponding to the target service directory, so as to delete the target service directory according to the target service quality information.

[0056] In the embodiment of the present application, through the determination and detection mechanism of the service directory by the client, the target service directory that needs to perform service quality control in the service directory is determined, and then the metadata server of the server deletes the target service directory.

[0057] In the embodiment of the present application, when the metadata service receives a directory deletion operation, it detects whether the target service quality information is set for the directory. If the target service quality information is set, a deletion operation is initiated to the qosserver and a return is made. Specifically, it is judged whether the target service quality information is set for the target service directory; if the target service quality information is set for the target service directory, a deletion operation for deleting the target service directory is initiated, and a return is made after the deletion operation is executed; if the target service quality information is not set for the target service directory, the target service directory is marked so as to set the service quality information of the marked target service directory. As Figure 3 shown is a flowchart of the metadata server deleting the target service directory.

[0058] In addition, while implementing directory service quality control, the embodiments of the present application can also nest the service quality of directories. Specifically, the service quality information of all service directories in the to-be-processed queue is statistically analyzed, and the service quality information with a target threshold in the set service quality information is screened out, so as to control the service quality of other service directories according to the target threshold. For example, if the bandwidth sizes set between service directories are different, the service quality of other service directories can be controlled with the bandwidth value of the minimum bandwidth set in one of the service directories.

[0059] In the present application, when applied to the server side, first, the service quality information of the service directory of the current node in the distributed file system is set; then, the metadata server in the server side receives the detection results of the client's hierarchical service quality detection of the service directory based on the service quality information during business read and write operations, so as to determine the target service directory that needs service quality control in the service directory according to the detection results; finally, the target service quality information corresponding to the target service directory is detected, so as to delete the target service directory according to the target service quality information. It can be seen that for the distributed file system, by setting the service quality information of the directory and performing hierarchical detection on the service directory through the client's service quality judgment and detection mechanism, modular processing can reduce the resource coupling degree of directory service quality query and directory service quality judgment, increase the concurrent processing ability of the system. At the same time, the detection results are returned to the server side, and the server side is used to perform deletion and cleaning operations on the target service directory, realizing the service quality control of the service directory.

[0060] The embodiments of the present application disclose a specific service quality control method. Refer to Figure 4 As shown, when applied to the server side, the method includes:

[0061] Step S21: Set the upper limit bandwidth, the number of concurrent requests that can be responded per second, and the directory path of the service directory of the current node in the distributed file system.

[0062] In the embodiments of the present application, for the HDFS service in the distributed file system storage server, the service quality of the service directory of the current node is set. When setting the service quality of the service directory, the upper limit bandwidth, the number of concurrent requests that can be responded per second (ops), and the directory path of the service directory of the current node are mainly set.

[0063] Step S22: Obtain the path identification number corresponding to the directory path, and insert the upper limit bandwidth, the number of concurrent requests that can be responded per second, and the directory path into the dir_qos_map data structure according to the path identification number to obtain a global mapping table.

[0064] It should be noted that each directory path has its own path identification number (ino). The path identification number is equivalent to an index. Global control can be achieved by inserting quality of service information into the dir_qos_map data structure through the path identification number. When inserting quality of service information into the dir_qos_map data structure, it is implemented using dir_qos_map<ino, QosInfo*>, where QosInfo mainly includes basic data such as the set bandwidth value and the upper limit value of ops.

[0065] Step S23: Persist the global mapping table and synchronize the global mapping table to each node in the distributed file system.

[0066] In the embodiment of the present application, the quality of service set for the service directory is persisted and synchronized to each HDFS server. In this way, by designing the basic control data structure for the quality of service of the service directory, it can be ensured that the qos attributes of the directory remain unchanged even when the directory is renamed.

[0067] Step S24: When the client performs business read and write operations, traverse the directory path step by step upwards, and based on the global mapping table, determine whether the service directory corresponding to the current path identification number is set with the quality of service information.

[0068] It can be understood that when there are business read and write IO (input / output) operations on the client, the client will process the quality of service of the set service directory. During the traversal process, it is determined whether the service directory corresponding to the current path identification number is set with the quality of service information. If the service directory corresponding to the current path identification number is set with the quality of service information, the set quality of service information can be found in the global mapping table dir_qos_map.

[0069] Step S25: If the service directory is set with the quality of service information, insert the quality of service information into the queue to be processed; if the service directory is not set with the quality of service information, continue to traverse the directory path step by step upwards until all the directory paths are traversed. Then, perform step-by-step quality of service detection on the queue to be processed, and send the detection result of the step-by-step quality of service detection to the metadata server in the server.

[0070] In the embodiments of the present application, if service quality information is set for a service directory, the service quality information is inserted into the processing queue. After all paths are traversed, hierarchical service quality detection is performed according to the information in the processing queue, and the detection result is sent to the metadata server in the server. If there is no service quality information for the current service directory, continue to determine whether the parent directory of the service directory corresponding to the current path identifier sets the service quality information until the root directory is traversed upward level by level through the path.

[0071] Step S26: Determine whether the target service directory sets target service quality information.

[0072] In the embodiments of the present application, during the process of the client traversing the service directory upward level by level, the relevant service directories in the processing queue are the target service directories. During the process of processing the target service directories through the metadata service of the server, determine whether the target service directories set the target service quality information.

[0073] Step S27: If the target service directory sets the target service quality information, initiate a deletion operation to delete the target service directory, and return after the deletion operation is completed; if the target service directory does not set the target service quality information, mark the target service directory so as to set the service quality information of the marked target service directory.

[0074] In the embodiments of the present application, if the target service directory sets the corresponding target service quality information, a deletion operation will be initiated to the qosserver and return. If the target service directory does not have the corresponding target service quality information, it will be marked so as to set its service quality.

[0075] In this application, when applied to the server side, first set the quality of service information of the service directory of the current node in the distributed file system; then, through the metadata server in the server side, receive the detection results of the step-by-step quality of service detection of the service directory by the client based on the quality of service information during business read and write operations, so as to determine the target service directory that needs quality of service control in the service directory according to the detection results; finally, detect the target quality of service information corresponding to the target service directory, so as to delete the target service directory according to the target quality of service information. It can be seen that for the distributed file system, by setting the quality of service information of the directory and using the client's quality of service judgment and detection mechanism to perform step-by-step detection on the service directory and modular processing, the resource coupling degree of directory quality of service query and directory quality of service judgment can be reduced, and the concurrent processing ability of the system can be increased. At the same time, the detection results are returned to the server side, and the server side is used to perform deletion and cleaning operations on the target service directory to achieve the quality of service control of the service directory.

[0076] An embodiment of the present invention discloses a method for quality of service control. Refer to Figure 5 As shown, when applied to the client side, the method includes:

[0077] Step S31: When performing business read and write operations, perform step-by-step quality of service detection on the service directory based on the quality of service information of the service directory of the current node in the distributed file system set by the server side.

[0078] Step S32: Send the detection results of the step-by-step quality of service detection to the metadata server in the server side, and determine the target service directory that needs quality of service control in the service directory according to the detection results, so that the metadata server detects the target quality of service information corresponding to the target service directory and deletes the target service directory according to the target quality of service information.

[0079] Among them, for the more specific processing procedures of the above steps S31 and S32, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated here.

[0080] In this application, when applied to a client and performing business read and write operations, a hierarchical service quality detection is performed on the service directory based on the service quality information of the service directory of the current node in the distributed file system set by the server. The detection results of the hierarchical service quality detection are sent to the metadata server in the server, and the target service directory that needs to perform service quality control in the service directory is determined according to the detection results, so that the metadata server detects the target service quality information corresponding to the target service directory and deletes the target service directory according to the target service quality information. It can be seen that for the distributed file system, by setting the service quality information of the directory and using the client's service quality judgment and detection mechanism to perform hierarchical detection and modular processing on the service directory, the resource coupling degree of directory service quality query and directory service quality judgment can be reduced, and the concurrent processing ability of the system can be increased. At the same time, the detection results are returned to the server, and the server is used to perform deletion and cleaning operations on the target service directory to achieve service quality control of the service directory.

[0081] Correspondingly, an embodiment of this application also discloses a service quality control device. See Figure 6 As shown, the device includes:

[0082] A service quality information setting module 11, configured to set the service quality information of the service directory of the current node in the distributed file system;

[0083] A service quality detection module 12, configured to receive, through the metadata server in the server, the detection results of the hierarchical service quality detection of the service directory based on the service quality information when the client performs business read and write operations, so as to determine the target service directory that needs to perform service quality control in the service directory according to the detection results;

[0084] A target service directory deletion module 13, configured to detect the target service quality information corresponding to the target service directory, so as to delete the target service directory according to the target service quality information.

[0085] It can be seen that through the above solution of this embodiment, when applied to the server, first set the quality of service information of the service directory of the current node in the distributed file system; then receive, through the metadata server in the server, the detection results of the client's hierarchical quality of service detection of the service directory based on the quality of service information during business read and write operations, so as to determine the target service directory that needs quality of service control in the service directory according to the detection results; finally, detect the target quality of service information corresponding to the target service directory, so as to delete the target service directory according to the target quality of service information. It can be seen that for the distributed file system, by setting the quality of service information of the directory and passing through the client's quality of service judgment and detection mechanism to perform hierarchical detection and modular processing of the service directory, the resource coupling degree of directory quality of service query and directory quality of service judgment can be reduced, and the concurrent processing ability of the system can be increased. At the same time, return the detection results to the server, and use the server to perform deletion and cleaning operations on the target service directory to achieve quality of service control of the service directory.

[0086] In a specific implementation manner, the quality of service information setting module 11 includes:

[0087] The quality of service information setting unit is used to set the upper limit bandwidth, the number of concurrent requests that can be responded per second, and the directory path of the service directory of the current node in the distributed file system.

[0088] In a specific implementation manner, after the quality of service information setting module 11 sets the quality of service information of the service directory of the current node in the distributed file system, it is further used to obtain the path identification number corresponding to the directory path, and insert the upper limit bandwidth, the number of concurrent requests that can be responded per second, and the directory path into the dir_qos_map data structure according to the path identification number to obtain a global mapping table; persist the global mapping table, and synchronize the global mapping table to each node in the distributed file system.

[0089] In a specific implementation manner, the quality of service detection module 12 includes:

[0090] The path traversal unit is used to traverse the directory path step by step upward when the client performs business read and write operations, and judge whether the service directory corresponding to the current path identification number sets the quality of service information based on the global mapping table;

[0091] The first processing unit is used to insert the quality of service information into the queue to be processed if the service directory sets the quality of service information;

[0092] A second processing unit, configured to, if the service quality information is not set in the service directory, continue to traverse the directory path level by level upwards until all the directory paths are traversed, then perform a service quality detection on the to-be-processed queue level by level, and send the detection result of the service quality detection level by level to the metadata server in the server.

[0093] In a specific embodiment, the service quality control device is further configured to count the service quality information of all service directories in the to-be-processed queue, and filter out the service quality information with a target threshold in the set service quality information, so as to control the service quality of other service directories according to the target threshold.

[0094] In a specific embodiment, the target service directory deletion module 13 includes:

[0095] A target service quality information judgment module, configured to judge whether the target service directory sets target service quality information;

[0096] A first determination result module, configured to, if the target service directory sets the target service quality information, initiate a deletion operation to delete the target service directory, and return after the deletion operation is executed;

[0097] A second determination result module, configured to, if the target service directory does not set the target service quality information, mark the target service directory, so as to set the service quality information of the marked target service directory.

[0098] Furthermore, an embodiment of the present application also discloses an electronic device, Figure 7 which is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure should not be considered as any limitation on the scope of use of the present application.

[0099] Figure 7 This is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the service quality control method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be a server.

[0100] In this embodiment, the power supply 23 is used to provide operating voltages for the various hardware devices on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and specific limitations thereof are not provided herein; the input / output interface 25 is used to obtain external input data or output data to the outside, and the specific interface type thereof can be selected according to specific application requirements, and specific limitations thereof are not provided herein.

[0101] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, a random access memory, a magnetic disk, an optical disc, etc., and the resources stored thereon can include an operating system 221, a computer program 222, data 223, etc., and the data 223 can include various types of data. The storage method can be temporary storage or permanent storage.

[0102] Among them, the operating system 221 is used to manage and control the various hardware devices and the computer program 222 on the electronic device 20, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to implement the quality of service control method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.

[0103] Furthermore, the embodiments of this application also disclose a computer-readable storage medium, and the computer-readable storage medium mentioned herein includes a random access memory (RAM), an internal memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic disk, an optical disc, or any other form of storage medium well-known in the technical field. Among them, when the computer program is executed by a processor, the foregoing quality of service control method is implemented. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.

[0104] In this specification, the various embodiments are described in a progressive manner, and the key points of each embodiment are the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0105] The steps of the quality of service control or algorithm described in connection with the embodiments disclosed in this document can be implemented directly in hardware, in software modules executed by a processor, or in a combination of both. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0106] Finally, it should also be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0107] The above has introduced in detail a quality of service control method, apparatus, device and storage medium provided by the present invention. Specific examples are used in this document to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation on the present invention.

Claims

1. A method for quality of service control, characterized in that, applied to a server side, including: setting quality of service information of a service directory of a current node in a distributed file system; receiving, by a metadata server in the server side, a detection result of hierarchical quality of service detection on the service directory based on the quality of service information when a client performs a service read / write operation, so as to determine a target service directory in the service directory that needs quality of service control according to the detection result; detecting target quality of service information corresponding to the target service directory, so as to delete the target service directory according to the target quality of service information; wherein, the quality of service information in the service directory is inserted into a to-be-processed queue, the quality of service information of all service directories in the to-be-processed queue is counted, and the quality of service information with a target threshold in the set quality of service information is screened out, so as to control the quality of service of other service directories according to the target threshold.

2. The quality of service control method according to claim 1, characterized in that, the setting of the quality of service information of the service directory of the current node in the distributed file system includes: setting an upper bandwidth of the service directory of the current node in the distributed file system, the number of concurrent requests that can be responded per second, and a directory path of the service directory.

3. The quality of service control method according to claim 2, characterized in that, after the setting of the quality of service information of the service directory of the current node in the distributed file system, it further includes: obtaining a path identification number corresponding to the directory path, and inserting the upper bandwidth, the number of concurrent requests that can be responded per second, and the directory path into a dir_qos_map data structure according to the path identification number to obtain a global mapping table; persisting the global mapping table, and synchronizing the global mapping table to each node in the distributed file system.

4. The quality of service control method according to claim 3, characterized in that, the receiving, by the metadata server in the server side, of the detection result of hierarchical quality of service detection on the service directory based on the quality of service information when the client performs a service read / write operation includes: when the client performs a service read / write operation, traversing the directory path level by level upwards, and judging whether the service directory corresponding to the current path identification number is set with the quality of service information based on the global mapping table; if the service directory is set with the quality of service information, inserting the quality of service information into the to-be-processed queue; if the service directory is not set with the quality of service information, continuing to traverse the directory path level by level upwards until all the directory paths are traversed, performing hierarchical quality of service detection on the to-be-processed queue, and sending the detection result of the hierarchical quality of service detection to the metadata server in the server side.

5. The quality of service control method according to any one of claims 1 to 4, characterized in that, Detecting the target service quality information corresponding to the target service directory, so as to delete the target service directory according to the target service quality information, includes: Judging whether the target service quality information is set for the target service directory; If the target service quality information is set for the target service directory, initiating a deletion operation to delete the target service directory, and returning after the deletion operation is completed; If the target service quality information is not set for the target service directory, marking the target service directory, so as to set the service quality information of the marked target service directory.

6. A service quality control method Characterized in that Applied to a client, it includes: When performing business read and write operations, performing hierarchical service quality detection on the service directory based on the service quality information of the current node's service directory in the distributed file system set by the server; Sending the detection result of the hierarchical service quality detection to the metadata server in the server, and determining the target service directory that needs service quality control in the service directory according to the detection result, so that the metadata server detects the target service quality information corresponding to the target service directory, and deletes the target service directory according to the target service quality information; Wherein, the service quality information in the service directory is inserted into a processing queue, the service quality information of all service directories in the processing queue is counted, and the service quality information with a target threshold in the set service quality information is screened out, so as to control the service quality of other service directories according to the target threshold.

7. A service quality control device Characterized in that Applied to a server, it includes: A service quality information setting module, configured to set the service quality information of the service directory of the current node in the distributed file system; A service quality detection module, configured to receive, through the metadata server in the server, the detection result of the hierarchical service quality detection of the service directory based on the service quality information when the client performs business read and write operations, so as to determine the target service directory that needs service quality control in the service directory according to the detection result; A target service directory deletion module, configured to detect the target service quality information corresponding to the target service directory, so as to delete the target service directory according to the target service quality information; Wherein, the service quality control device is further configured to: insert the service quality information in the service directory into a processing queue, count the service quality information of all service directories in the processing queue, and screen out the service quality information with a target threshold in the set service quality information, so as to control the service quality of other service directories according to the target threshold.

8. An electronic device Characterized in that The electronic device includes a processor and a memory; wherein, the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the service quality control method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, for storing a computer program; wherein when the computer program is executed by a processor, it implements the quality of service control method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Directory level service quality control method and system and access node

    CN113923213A