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

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

Info

Publication number
CN115426374A
CN115426374A CN202211040109.9A CN202211040109A CN115426374A CN 115426374 A CN115426374 A CN 115426374A CN 202211040109 A CN202211040109 A CN 202211040109A CN 115426374 A CN115426374 A CN 115426374A
Authority
CN
China
Prior art keywords
service
directory
service quality
quality information
target
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.)
Pending
Application number
CN202211040109.9A
Other languages
Chinese (zh)
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202211040109.9A priority Critical patent/CN115426374A/en
Publication of CN115426374A publication Critical patent/CN115426374A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems

Abstract

The application discloses a method, a device, equipment and a storage medium for controlling service quality, and relates to the technical field of distributed file system storage. Applied to a server, the method comprises the following steps: setting service quality information of a service directory of a current node in a distributed file system; receiving a detection result of step-by-step service quality detection on the service directory based on the service quality information when a client performs service read-write operation through a metadata server in the service end so as to determine a target service directory which needs to perform service quality control in the service directory according to the detection result; and 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. By the technical scheme, the service quality of the service directory can be effectively controlled, and therefore the storage quality of the storage service of the whole distributed file system is guaranteed.

Description

Service quality control method, device, equipment and storage medium
Technical Field
The present invention relates to the field of distributed file system storage technologies, and in particular, to a method, an apparatus, a device, and a storage medium for controlling quality of service.
Background
With the continuous development of internet technology, the appearance of a distributed file system effectively solves the storage and management problems of data. A distributed file system is a file system based on a client/server model. A Hadoop Distributed File System (HDFS) is a short name of a Hadoop Distributed File System and is an implementation of a Hadoop abstract File System. It has many similarities with existing distributed file systems. But at the same time, its distinction from other distributed file systems is also clear. The files of the HDFS are distributed on cluster machines, and meanwhile, the copies are provided for fault tolerance and reliability guarantee. For example, direct operations of writing and reading files by clients are distributed on all machines in the cluster, and no single point of performance pressure exists. For the HDFS Service file scenario, the users have different services for different Service directories, and in order to ensure that the users obtain the planned Service Quality, the Quality of Service (QoS) needs to be provided, and QoS bandwidth and ops (operation per second) restrictions are performed on the different Service directories to achieve traffic control, thereby ensuring the storage Quality of the entire HDFS Service.
In summary, how to effectively control the service quality of the service directory of the HDFS of the distributed file system and ensure the storage quality of the overall HDFS service is a problem to be solved at present.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method, an apparatus, a device and a storage medium for controlling service quality, which can effectively control the service quality of a service directory of an HDFS of a distributed file system, and ensure the storage quality of the entire HDFS service. The specific scheme is as follows:
in a first aspect, the present application discloses a method for controlling quality of service, which is applied to a server and includes:
setting service quality information of a service directory of a current node in a distributed file system;
receiving a detection result of step-by-step service quality detection on the service directory based on the service quality information when a client performs service read-write operation through a metadata server in the service end so as to determine a target service directory which needs to perform service quality control in the service directory according to the detection result;
and 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.
Optionally, the setting of the service quality information of the service directory of the current node in the distributed file system includes:
setting an upper limit bandwidth of a service directory of a current node in the distributed file system, the number of concurrent requests which can be responded per second and a directory path of the service directory.
Optionally, after the setting of the service quality information of the service directory of the current node in the distributed file system, the method further includes:
acquiring a path identification number corresponding to the directory path, and inserting the upper limit bandwidth, the number of concurrent requests which 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;
and the global mapping table is persisted and is synchronized to each node in the distributed file system.
Optionally, the receiving, by the metadata server in the server, a detection result of the step-by-step service quality detection performed on the service directory based on the service quality information when the client performs the service read-write operation includes:
when the client performs service reading and writing operation, the directory path is traversed upwards step by step, and whether the service directory corresponding to the current path identification number sets the service quality information is judged based on the global mapping table;
if the service directory sets the service quality information, inserting the service quality information into a queue to be processed;
and if the service directory does not set the service quality information, continuously traversing the directory paths step by step upwards until all the directory paths are traversed, performing step by step service quality detection on the queue to be processed, and sending detection results of the step by step service quality detection to a metadata server in the service end.
Optionally, the method for controlling quality of service further includes:
and counting the service quality information of all service directories in the queue to be processed, and screening out the service quality information with a target threshold value from the set service quality information so as to control the service quality of other service directories according to the target threshold value.
Optionally, the 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 includes:
judging whether the target service directory sets target service quality information or not;
if the target service directory sets the target service quality information, initiating a deleting operation for deleting the target service directory, and returning after the deleting operation is finished;
and if the target service directory does not set the target service quality information, marking the target service directory so as to set the marked service quality information of the target service directory.
In a second aspect, the present application discloses a method for controlling quality of service, which is applied to a client and includes:
when the operation of reading and writing the business is carried out, the service directory is subjected to step-by-step service quality detection based on the service quality information of the service directory of the current node in the distributed file system set by the server;
and sending the detection result of the step-by-step service quality detection to a metadata server in the server, and determining a target service directory which needs to be subjected to service quality control in the service directories according to the detection result, so that the metadata server detects target service quality information corresponding to the target service directory and deletes the target service directory according to the target service quality information.
In a third aspect, the present application discloses a service quality control apparatus, which is applied to a server and includes:
the service quality information setting module is used for setting the service quality information of the service directory of the current node in the distributed file system;
the service quality detection module is used for receiving a detection result of step-by-step service quality detection on the service directory based on the service quality information when a client performs service read-write operation through a metadata server in the server so as to determine a target service directory which needs to be subjected to service quality control in the service directory according to the detection result;
and the target service directory deleting module is used for 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.
In a fourth aspect, the present application discloses an electronic device comprising a processor and a memory; wherein the memory is adapted to store a computer program that is loaded and executed by the processor to implement the quality of service control method as described above.
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 a quality of service control method as previously described.
In the application, the method is applied to a server, and firstly, the service quality information of the service directory of the current node in the distributed file system is set; then, receiving a detection result of the service directory for carrying out step-by-step service quality detection on the service directory based on the service quality information when a client carries out service read-write operation through a metadata server in the service end so as to determine a target service directory which needs to carry out service quality control in the service directory according to the detection result; and finally, 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. Therefore, the service quality information of the directory is set for the distributed file system, the service directory is detected step by step through a judgment and detection mechanism of the client for the service quality, the service directory is processed in a modularized mode, the resource coupling degree of directory service quality inquiry and directory service quality judgment can be reduced, the concurrent processing capacity of the system is improved, meanwhile, the detection result is returned to the server, the server is used for deleting and cleaning the target service directory, and the service quality control of the service directory is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flow chart of a method for quality of service control as disclosed herein;
fig. 2 is a schematic diagram of a client qos determination and detection mechanism disclosed in the present application;
FIG. 3 is a diagram of a target service directory delete disclosed herein;
fig. 4 is a flowchart of a specific qos control method disclosed in the present application;
FIG. 5 is a flow chart of a quality of service control method disclosed herein;
fig. 6 is a schematic structural diagram of a qos control apparatus according to the present disclosure;
fig. 7 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Currently, for an HDFS service file scenario, a user has different services for different service directories, and in order to ensure that the user obtains a planned service quality, qos bandwidth and ops limitation needs to be performed on the different service directories by providing the service quality, so as to achieve service flow control, thereby ensuring the storage quality of the entire HDFS service.
Therefore, the service quality control scheme is provided, the service quality of the service directory of the HDFS of the distributed file system can be effectively controlled, and the storage quality of the whole HDFS service is guaranteed.
The embodiment of the invention discloses a service quality control method, which is applied to a server side and shown in figure 1, and comprises the following steps:
step S11: and setting the service quality information of the service directory of the current node in the distributed file system.
In the embodiment of the application, the service quality is set for the service directory of the current node for the HDFS service in the storage server of the distributed file system. 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 to per second and the directory path of the service directory are mainly set.
It should be noted that each directory path has its own path identification number (ino), and the global mapping table is obtained by inserting the upper limit bandwidth, the number of concurrent requests that can be responded to per second, and the directory path into the dir _ qos _ map data structure according to the path identification number. It will be appreciated that the path identification number corresponds to an index, and that global control can be achieved by inserting quality of service information into the dir _ qos _ map data structure via the path identification number.
In the embodiment of the present application, when inserting the quality of service information into the dir _ qos _ map data structure, the qos information is implemented by using dir _ qos _ map < ino and QosInfo >, where the QosInfo mainly includes basic data such as a set bandwidth value and an ops upper limit value.
Further, 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 HDFS servers are synchronized. Therefore, the basic control data structure of the service quality of the service directory is designed, and the directory rename can be ensured not to change the attribute of the directory qos.
Step S12: and receiving a detection result of step-by-step service quality detection on the service directory based on the service quality information when a client performs service read-write operation through a metadata server in the service end so as to determine a target service directory which needs to be subjected to service quality control in the service directory according to the detection result.
In the embodiment of the application, the service quality of the service directory is judged and detected at the client. Specifically, when the client performs a service read-write operation, the directory path is traversed step by step upwards, and whether the service directory corresponding to the current path identification number sets the service quality information is judged based on the global mapping table; if the service directory sets the service quality information, inserting the service quality information into a queue to be processed; and if the service directory does not set the service quality information, continuously traversing the directory paths step by step upwards until all the directory paths are traversed, performing step by step service quality detection on the queue to be processed, and sending detection results of the step by step service quality detection to a metadata server in the service end.
It can be understood that when there is a business read/write IO (input/output) operation at the client, the client will process the set service quality of the service directory. In the traversal process, whether the service directory corresponding to the current path identification number sets the service quality information is judged, if the service directory corresponding to the current path identification number sets the service quality information, the set service quality information can be found in the global mapping table dir _ qos _ map, and then whether the parent directory of the service directory corresponding to the current path identification number sets the service quality information is continuously judged until the parent directory is traversed up step by step through the path to the root directory. Fig. 2 is a flowchart illustrating a mechanism for determining and detecting a service directory at a client according to this embodiment.
In the embodiment of the 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 step by step according to the information in the queue to be processed, and the detection result is sent to the metadata server in the server.
Step S13: and 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.
In the embodiment of the application, a target service directory which needs to be subjected to service quality control in the service directories is determined through a judgment and detection mechanism of a client on the service directories, and then a metadata server with a server side deletes the target service directory.
In the embodiment of the application, when the metadata service receives the directory deleting operation, whether the directory sets the target service quality information is detected, if the target service quality information is set, the metadata service initiates the deleting operation to the qos server and returns the deleting operation. Specifically, whether the target service directory sets target service quality information is judged; if the target service directory sets the target service quality information, initiating a deleting operation for deleting the target service directory, and returning after the deleting operation is finished; and if the target service directory does not set the target service quality information, marking the target service directory so as to set the marked service quality information of the target service directory. Fig. 3 is a flowchart illustrating a deletion process performed by the metadata server on the target service directory.
In addition, the embodiment of the present application may further embed the service quality of the directory while implementing the directory service quality control, specifically, count the service quality information of all service directories in the queue to be processed, and screen out the service quality information having the target threshold in the set service quality information, so as to control the service quality of other service directories according to the target threshold. For example, if the bandwidth size settings are different between the service directories, the other service directories may be subjected to quality of service control with the bandwidth value of the minimum bandwidth set in the service directory.
In the application, the method is applied to a server, and firstly, the service quality information of the service directory of the current node in the distributed file system is set; then, receiving a detection result of the service directory for carrying out step-by-step service quality detection on the service directory based on the service quality information when a client carries out service read-write operation through a metadata server in the service end so as to determine a target service directory which needs to carry out service quality control in the service directory according to the detection result; and finally, 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. Therefore, the service quality information of the directory is set for the distributed file system, the service directory is detected step by step through a judgment and detection mechanism of the client for the service quality, the service directory is processed in a modularized mode, the resource coupling degree of directory service quality inquiry and directory service quality judgment can be reduced, the concurrent processing capacity of the system is improved, meanwhile, the detection result is returned to the server, the server is used for deleting and cleaning the target service directory, and the service quality control of the service directory is achieved.
The embodiment of the present application discloses a specific method for controlling quality of service, which is shown in fig. 4 and is applied to a server, and the method includes:
step S21: setting an upper limit bandwidth of a service directory of a current node in the distributed file system, the number of concurrent requests which can be responded per second and a directory path of the service directory.
In the embodiment of the application, the service quality is set for the service directory of the current node for the HDFS service in the storage server of the distributed file system. When setting the service quality of a service directory, the upper limit bandwidth of the service directory of a 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.
Step S22: and acquiring a path identification number corresponding to the directory path, and inserting the upper limit bandwidth, the number of the concurrent requests which 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.
It should be noted that each directory path has its own path identification number (ino), which is equivalent to an index, and global control can be implemented by inserting the service quality information into the dir _ qos _ map data structure through the path identification number. When the service quality information is inserted into the dir _ qos _ map data structure, the method is implemented by using dir _ qos _ map < ino, qosInfo, wherein the QosInfo mainly comprises basic data such as a set bandwidth value and an ops upper limit value.
Step S23: and the global mapping table is persisted and is synchronized to each node in the distributed file system.
In the embodiment of the application, the service quality set for the service directory is persistent, and all HDFS service terminals are synchronized. Therefore, the basic control data structure of the service quality of the service directory is designed, and the directory rename can be ensured not to change the attribute of the directory qos.
Step S24: and when the client performs service reading and writing operation, traversing the directory path step by step upwards, and judging whether the service directory corresponding to the current path identification number sets the service quality information or not based on the global mapping table.
It can be understood that when there is a business read/write IO (input/output) operation at the client, the client will process the set service quality of the service directory. In the traversal process, whether the service directory corresponding to the current path identification number sets the service quality information is judged, and if the service directory corresponding to the current path identification number sets the service quality information, the set service quality information can be found in the global mapping table dir _ qos _ map.
Step S25: if the service directory sets the service quality information, inserting the service quality information into a queue to be processed; and if the service directory does not set the service quality information, continuously traversing the directory paths step by step upwards until all the directory paths are traversed, performing step by step service quality detection on the queue to be processed, and sending detection results of the step by step service quality detection to a metadata server in the service end.
In the embodiment of the 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 step by step according to the information in the queue to be processed, and the detection result is sent to the metadata server in the server. And if the current service directory has no service quality information, continuously judging whether the parent directory of the service directory corresponding to the current path identification number sets the service quality information or not until the parent directory of the service directory corresponding to the current path identification number is traversed to the root directory step by step.
Step S26: and judging whether the target service directory sets target service quality information or not.
In the embodiment of the application, in the process that the client side traverses the service directories upwards step by step, the relevant service directory in the queue to be processed is the target service directory, and in the process that the target service directory is processed through the metadata service seven of the server side, whether the target service directory sets the target service quality information is judged.
Step S27: if the target service directory sets the target service quality information, initiating a deleting operation for deleting the target service directory, and returning after the deleting operation is finished; and if the target service directory does not set the target service quality information, marking the target service directory so as to set the marked service quality information of the target service directory.
In the embodiment of the application, if the target service directory sets the corresponding target service quality information, a deletion operation is initiated to the qos server, and the operation is returned. If the target service directory does not have corresponding target quality of service information, it is marked to set its quality of service.
In the application, the method is applied to a server, and firstly, the service quality information of the service directory of the current node in the distributed file system is set; then, receiving a detection result of step-by-step service quality detection on the service directory based on the service quality information when a client performs service read-write operation through a metadata server in the service end so as to determine a target service directory which needs to perform service quality control in the service directory according to the detection result; and finally, 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. Therefore, the service quality information of the directory is set for the distributed file system, the service directory is detected step by step through a judgment and detection mechanism of the client for the service quality, the service directory is processed in a modularized mode, the resource coupling degree of directory service quality inquiry and directory service quality judgment can be reduced, the concurrent processing capacity of the system is improved, meanwhile, the detection result is returned to the server, the server is used for deleting and cleaning the target service directory, and the service quality control of the service directory is achieved.
The embodiment of the invention discloses a service quality control method, which is applied to a client as shown in figure 5 and comprises the following steps:
step S31: and when the service reading and writing operation is carried out, carrying out step-by-step service quality detection 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.
Step S32: and sending the detection result of the step-by-step service quality detection to a metadata server in the server, and determining a target service directory which needs to be subjected to service quality control in the service directories according to the detection result, so that the metadata server detects target service quality information corresponding to the target service directory and deletes the target service directory according to the target service quality information.
For more specific processing procedures of the step S31 and the step S32, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The method and the device are applied to the client, and when business read-write operation is carried out, the service quality detection is carried out on the service directory step by step based on the service quality information of the service directory of the current node in the distributed file system set by the server. And sending the detection result of the step-by-step service quality detection to a metadata server in the server, and determining a target service directory which needs to be subjected to service quality control in the service directories according to the detection result, so that the metadata server detects target service quality information corresponding to the target service directory and deletes the target service directory according to the target service quality information. Therefore, the service quality information of the directory is set for the distributed file system, the service directory is detected step by step through a judgment and detection mechanism of the client for the service quality, the service directory is processed in a modularized mode, the resource coupling degree of directory service quality inquiry and directory service quality judgment can be reduced, the concurrent processing capacity of the system is improved, meanwhile, the detection result is returned to the server, the server is used for deleting and cleaning the target service directory, and the service quality control of the service directory is achieved.
Correspondingly, an embodiment of the present application further discloses a quality of service control apparatus, as shown in fig. 6, the apparatus includes:
a service quality information setting module 11, configured to set service quality information of a service directory of a current node in the distributed file system;
a service quality detection module 12, configured to receive, by a metadata server in the server, a detection result of performing step-by-step 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, according to the detection result, a target service directory in the service directory that needs to be subjected to service quality control;
and a target service directory deleting module 13, configured 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.
Therefore, the technical scheme of the embodiment is applied to the server, and the service quality information of the service directory of the current node in the distributed file system is set firstly; then, receiving a detection result of step-by-step service quality detection on the service directory based on the service quality information when a client performs service read-write operation through a metadata server in the service end so as to determine a target service directory which needs to perform service quality control in the service directory according to the detection result; and finally, 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. Therefore, the service quality information of the directory is set for the distributed file system, the service directory is detected step by step through a judgment and detection mechanism of the client for the service quality, the service directory is processed in a modularized mode, the resource coupling degree of directory service quality inquiry and directory service quality judgment can be reduced, the concurrent processing capacity of the system is improved, meanwhile, the detection result is returned to the server, the server is used for deleting and cleaning the target service directory, and the service quality control of the service directory is achieved.
In a specific embodiment, the qos information setting module 11 includes:
and the service quality information setting unit is used for setting the upper limit bandwidth of the service directory of the current node in the distributed file system, the number of the concurrent requests which can be responded per second and the directory path of the service directory.
In a specific implementation manner, the qos information setting module 11 is further configured to, after setting qos information of a service directory of a current node in a distributed file system, obtain a 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 a dir _ qos _ map data structure according to the path identification number to obtain a global mapping table; and the global mapping table is persisted and is synchronized to each node in the distributed file system.
In a specific embodiment, the quality of service detection module 12 includes:
a path traversal unit, configured to traverse the directory path upwards step by step when the client performs a service read-write operation, and determine whether the service directory corresponding to the current path identification number sets the service quality information based on the global mapping table;
the first processing unit is used for inserting the service quality information into a queue to be processed if the service directory sets the service quality information;
and the second processing unit is used for continuously traversing the directory paths step by step upwards if the service directory does not set the service quality information, performing step by step service quality detection on the queue to be processed after all the directory paths are traversed, and sending detection results of the step by step service quality detection to a metadata server in the server.
In a specific embodiment, the qos control apparatus is further configured to count qos information of all service directories in the queue to be processed, and filter out qos information having a target threshold from the set qos information, so as to control qos of other service directories according to the target threshold.
In a specific embodiment, the target service directory deleting module 13 includes:
the target service quality information judging module is used for judging whether the target service directory sets target service quality information or not;
a first judgment result module, configured to initiate a deletion operation of deleting the target service directory if the target service directory sets the target quality of service information, and return the deletion operation after the execution of the deletion operation is finished;
and the second judgment result module is used for marking the target service directory if the target service directory does not set the target service quality information so as to set the marked service quality information of the target service directory.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 7 is a block diagram of an electronic device 20 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 7 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. 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. Wherein the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the quality of service control method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically a server.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the memory 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk, an optical disk, or the like, the resources stored thereon may include an operating system 221, a computer program 222, data 223, and the like, and the data 223 may include various data. The storage means may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, and may be Windows Server, netware, unix, linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the quality of service control method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, embodiments of the present application disclose a computer-readable storage medium, where the computer-readable storage medium includes a Random Access Memory (RAM), a Memory, a Read-Only Memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic disk, or an optical disk or any other form of storage medium known in the art. Wherein the computer program when executed by a processor implements the aforementioned quality of service control method. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
The steps of a quality of service control 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.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The foregoing describes in detail a method, an apparatus, a device, and a storage medium for controlling quality of service provided by the present invention, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the foregoing embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A service quality control method is applied to a server and comprises the following steps:
setting service quality information of a service directory of a current node in a distributed file system;
receiving a detection result of step-by-step service quality detection on the service directory based on the service quality information when a client performs service read-write operation through a metadata server in the service end so as to determine a target service directory which needs to perform service quality control in the service directory according to the detection result;
and 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.
2. The method of claim 1, wherein the setting the service quality information of the service directory of the current node in the distributed file system comprises:
setting an upper limit bandwidth of a service directory of a current node in the distributed file system, the number of concurrent requests which can be responded per second and a directory path of the service directory.
3. The method of claim 2, wherein after the setting the qos information of the service directory of the current node in the distributed file system, the method further comprises:
acquiring a path identification number corresponding to the directory path, and inserting the upper limit bandwidth, the number of concurrent requests which 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;
and the global mapping table is persisted and is synchronized to each node in the distributed file system.
4. The method according to claim 3, wherein the receiving, by the metadata server in the server, a detection result of the step-by-step qos detection performed by the client on the basis of the qos information during the service read/write operation comprises:
when the client performs service reading and writing operation, the directory path is traversed upwards step by step, and whether the service directory corresponding to the current path identification number sets the service quality information is judged based on the global mapping table;
if the service directory sets the service quality information, inserting the service quality information into a queue to be processed;
and if the service directory does not set the service quality information, continuously traversing the directory paths step by step upwards until all the directory paths are traversed, performing step by step service quality detection on the queue to be processed, and sending detection results of the step by step service quality detection to a metadata server in the service end.
5. The QoS control method of claim 4, further comprising:
and counting the service quality information of all the service directories in the queue to be processed, and screening out the service quality information with a target threshold value in the set service quality information so as to control the service quality of other service directories according to the target threshold value.
6. The qos control method according to any one of claims 1 to 5, wherein the detecting target qos information corresponding to the target service directory so as to delete the target service directory according to the target qos information includes:
judging whether the target service directory sets target service quality information or not;
if the target service directory sets the target service quality information, initiating a deleting operation for deleting the target service directory, and returning after the deleting operation is finished;
and if the target service directory does not set the target service quality information, marking the target service directory so as to set the marked service quality information of the target service directory.
7. A service quality control method is applied to a client and comprises the following steps:
when the operation of reading and writing the business is carried out, the service directory is subjected to step-by-step service quality detection based on the service quality information of the service directory of the current node in the distributed file system set by the server;
and sending the detection result of the step-by-step service quality detection to a metadata server in the server, and determining a target service directory which needs to be subjected to service quality control in the service directories according to the detection result, so that the metadata server detects target service quality information corresponding to the target service directory and deletes the target service directory according to the target service quality information.
8. A service quality control device is applied to a server and comprises:
the service quality information setting module is used for setting the service quality information of the service directory of the current node in the distributed file system;
the service quality detection module is used for receiving a detection result of step-by-step service quality detection on the service directory based on the service quality information when a client performs service read-write operation through a metadata server in the server so as to determine a target service directory which needs to be subjected to service quality control in the service directory according to the detection result;
and the target service directory deleting module is used for 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.
9. An electronic device, comprising a processor and a memory; wherein the memory is for storing a computer program that is loaded and executed by the processor to implement the quality of service control method of any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements a quality of service control method as claimed in any one of claims 1 to 7.
CN202211040109.9A 2022-08-29 2022-08-29 Service quality control method, device, equipment and storage medium Pending CN115426374A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211040109.9A CN115426374A (en) 2022-08-29 2022-08-29 Service quality control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211040109.9A CN115426374A (en) 2022-08-29 2022-08-29 Service quality control method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115426374A true CN115426374A (en) 2022-12-02

Family

ID=84201233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211040109.9A Pending CN115426374A (en) 2022-08-29 2022-08-29 Service quality control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115426374A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185965A (en) * 2023-05-04 2023-05-30 联想凌拓科技有限公司 Method, apparatus, device and medium for quality of service control
CN116501712A (en) * 2023-05-05 2023-07-28 北京睿芯高通量科技有限公司 Fine-grained storage service quality control implementation method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185965A (en) * 2023-05-04 2023-05-30 联想凌拓科技有限公司 Method, apparatus, device and medium for quality of service control
CN116185965B (en) * 2023-05-04 2023-08-04 联想凌拓科技有限公司 Method, apparatus, device and medium for quality of service control
CN116501712A (en) * 2023-05-05 2023-07-28 北京睿芯高通量科技有限公司 Fine-grained storage service quality control implementation method

Similar Documents

Publication Publication Date Title
CN115426374A (en) Service quality control method, device, equipment and storage medium
WO2019137320A1 (en) Resource scheduling method, apparatus, device and system
US10187255B2 (en) Centralized configuration data in a distributed file system
CN107391045B (en) Directory space quota method and system
CN109240607B (en) File reading method and device
US20170153909A1 (en) Methods and Devices for Acquiring Data Using Virtual Machine and Host Machine
CN110008197B (en) Data processing method and system, electronic equipment and storage medium
WO2016101662A1 (en) Data processing method and relevant server
CN115114232A (en) Method, device and medium for enumerating historical version objects
CN111225003B (en) NFS node configuration method and device
WO2021254214A1 (en) Migration method and apparatus for android application program
CN109144403B (en) Method and equipment for switching cloud disk modes
CN113805816A (en) Disk space management method, device, equipment and storage medium
CN112000971B (en) File permission recording method, system and related device
CN114579061B (en) Data storage method, device, equipment and medium
CN115599302A (en) Data writing method, device, equipment and storage medium
CN115374057A (en) Data snapshot method and related equipment
EP3572951A1 (en) A method for handling requests in a storage system and a storage node for a storage system
CN107526530B (en) Data processing method and device
CN112035413B (en) Metadata information query method, device and storage medium
CN115061630A (en) Data migration method, device, equipment and medium
CN116743780A (en) Distributed storage system and method
CN108021647B (en) File migration method, system, medium and equipment
CN107704462B (en) Resource metadata maintenance method, equipment and storage device
CN111104787B (en) Method, apparatus and computer program product for comparing files

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