Method for implementing QOS function at directory level of distributed file system
By using the dmclock algorithm in the distributed file system to calculate the Qos metric of IO requests and setting Qos limits at the subdirectory level, the problem of difficulty in realizing the Qos function in distributed file storage in the existing technology is solved, and multi-tenant isolation and Service quality is guaranteed, and system complexity and IO latency are reduced.
Patent Information
- Application Number
- PCT/CN2023/143221
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-12
- Filing Date
- 2023-12-29
- Publication Date
- 2024-10-17
AI Technical Summary
The existing Qos algorithm can only be implemented in a stand-alone environment, and it is difficult to effectively limit the resource usage between multiple servers in a distributed file storage scenario, resulting in increased system complexity and increased IO latency.
The dmclock algorithm is used to calculate the request sequence of IO requests on the client, calculate service quality Qos measurement indicators, and set Qos restriction indicators at the subdirectory level of the distributed file system to implement the Qos function at the directory level of the distributed file system and avoid Unified Qos service introduces complexity and performance impact.
It realizes multi-tenant isolation and service quality assurance of distributed file systems, reduces system complexity and IO request delay, and improves the stability of storage services.
Smart Images

Figure CN2023143221_17102024_PF_FP_ABST
Abstract
Description
Implementation method of QoS function at directory level in distributed file system Technical Field
[0001] The present application relates to the field of distributed file storage technology, and in particular to a method, apparatus, device, and medium for implementing QoS functions at the directory level of a distributed file system. Background Art
[0002] QoS is the abbreviation of Quality of Service. It originates from network technology and is used to solve problems such as network delay and congestion. It can provide better service capabilities for specified network communications.
[0003] In storage systems, QoS is used to ensure a certain storage quality, and has the following main functions:
[0004] Provide higher quality of service (such as IOPS and bandwidth) for high-priority services;
[0005] Control resource competition to prevent multiple users in the same storage cluster from competing for IOPS and bandwidth resources, ensuring that user services are not affected by resource competition.
[0006] Currently, common QoS algorithms include the token bucket algorithm, the leaky bucket algorithm, and the mclock algorithm. However, these algorithms can only implement QoS functions for a single server. For scenarios where distributed file storage has multiple servers, they can only limit the resource usage of a single server.
[0007] For the distributed file storage scenario, a file system contains multiple servers, and multiple servers need to provide QoS functions for different customers, so distributed QoS needs to be implemented.
[0008] Currently, the primary method for implementing distributed QoS is through a unified QoS service. The principle behind QoS services is that before servicing a client's request, the storage service sends a request to a unified QoS service. The QoS service then uses a standalone QoS algorithm to determine whether the service is normal and returns the result to the storage service. The disadvantages of using QoS services to implement distributed QoS are as follows:
[0009] The introduction of additional QoS service components increases the complexity of the system;
[0010] The server needs to access the QoS service before processing IO requests. This strong dependence on the QoS service has a certain impact on the stability of the storage service.
[0011] The server adds a network request for Qos service before processing IO, which affects the IO delay.
[0012] Therefore, how to implement the QoS function at the directory level of the distributed file system has become a technical problem that needs to be solved urgently.
[0013] Summary of the Invention
[0014] The present application provides a method, apparatus, device and storage medium for implementing the QoS function at the directory level of a distributed file system, aiming to implement the QoS function at the directory level of a distributed file system.
[0015] In a first aspect, the present application provides a method for implementing a QoS function at the directory level of a distributed file system, the method comprising:
[0016] When the client sends an IO request to the server, obtain the request order corresponding to the IO request;
[0017] Based on the dmclock algorithm and the request order, the service quality (Qos) metric corresponding to the IO request is calculated to obtain the Qos restriction scheme of the current distributed file system;
[0018] Obtain the file system subdirectory mounted by the current distributed file system;
[0019] Based on the QoS restriction scheme of the current distributed file system, a QoS restriction index is set for the file system subdirectory to implement a QoS scheme at the directory level of the distributed file system.
[0020] In a second aspect, the present application further provides a device for implementing a QoS function at the directory level of a distributed file system, the device for implementing a QoS function at the directory level of a distributed file system comprising:
[0021] A request sequence acquisition module is used to obtain the request sequence corresponding to the IO request when the client sends the IO request to the server;
[0022] An indicator calculation module is used to calculate the service quality Qos measurement indicator corresponding to the IO request based on the dmclock algorithm and the request order, and obtain the Qos restriction scheme of the current distributed file system;
[0023] A subdirectory acquisition module, configured to acquire a file system subdirectory mounted by the current distributed file system;
[0024] The directory-level QoS solution implementation module is used to set QoS restriction indicators for the file system subdirectories based on the QoS restriction solution of the current distributed file system to implement the QoS solution at the directory level of the distributed file system.
[0025] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the method for implementing the QoS function at the directory level of the distributed file system are implemented as described above.
[0026] In a fourth aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the method for implementing the QoS function at the directory level of the distributed file system as described above are implemented.
[0027] The present application provides a method, system, apparatus, device, and storage medium for implementing directory-level QoS functionality in a distributed file system. The method comprises: obtaining a request order corresponding to an IO request when a client sends the IO request to a server; calculating a quality of service (QoS) metric corresponding to the IO request based on a dmclock algorithm and the request order, thereby obtaining a QoS restriction scheme for the current distributed file system; obtaining a file system subdirectory mounted on the current distributed file system; and setting a QoS restriction metric for the file system subdirectory based on the QoS restriction scheme of the current distributed file system to implement a directory-level QoS scheme for the distributed file system. Through the above-described approach, the present application implements distributed QoS functionality using the dmclock algorithm, avoiding the complexity and performance issues introduced by a unified QoS service. While supporting QoS functionality for both IOPS and bandwidth, it implements directory-level QoS functionality in the distributed file system, facilitating multi-tenant isolation and ensuring quality of service for each tenant. The method eliminates the need for introducing additional QoS service components, thereby reducing system complexity; eliminates the need for introducing additional QoS service components, thereby reducing the impact of additional services on IO requests and increasing service stability; and eliminates the need to request a QoS service before servicing an IO request, resulting in lower latency for IO requests. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0029] FIG1 is a flow chart of a first embodiment of a method for implementing a directory-level QoS function in a distributed file system provided by the present application;
[0030] FIG2 is a schematic diagram of the enqueue process of the mclock algorithm provided in an embodiment of the present application;
[0031] FIG3 is a schematic diagram of the dequeue process of the mclock algorithm provided in an embodiment of the present application;
[0032] FIG4 is a schematic diagram of the sequence of client Client1 sending a request according to an embodiment of the present application;
[0033] FIG5 is a flow chart of a second embodiment of a method for implementing a directory-level QoS function of a distributed file system provided by the present application;
[0034] FIG6 is a schematic diagram of a mounting process of a distributed file system provided in an embodiment of the present application;
[0035] FIG7 is a schematic diagram of a process of mounting a self-directory of a distributed file system according to an embodiment of the present application;
[0036] FIG8 is a schematic diagram of the implementation process of the sub-directory QoS solution provided in an embodiment of the present application;
[0037] 9 is a schematic structural diagram of a first embodiment of a device for implementing a directory-level QoS function of a distributed file system provided by the present application;
[0038] FIG10 is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application.
[0039] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0041] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0042] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.
[0043] Please refer to FIG. 1 , which is a flow chart of a first embodiment of a method for implementing a directory-level QoS function of a distributed file system provided by the present application.
[0044] As shown in FIG1 , the method for implementing the QoS function at the directory level of the distributed file system includes steps S101 to S104 .
[0045] S101. When a client sends an IO request to a server, obtain a request order corresponding to the IO request;
[0046] Generally, when a request arrives, the mclock algorithm needs to tag each request. There are three types of tags: Reservation tag, Proportional tag (also called Weight tag), and Limit tag. The following is the formula for calculating the tag:
[0047] The meaning of each data is as follows:
[0048] The process of the mclock algorithm is divided into two processes: enqueue and dequeue.
[0049] In one embodiment, the enqueue process of the mclock algorithm is shown in Figure 2. When a new request arrives, it is first determined whether the client to which the request belongs is in an idle state (a newly connected client or a client that has not accessed for a long time) and then becomes active. If it is in an idle state, the Ptag (weight ratio) tags of the existing unprocessed requests need to be adjusted so that the Ptags of the existing requests and the Ptags of the new request are processed at the same starting point: all requests are traversed to obtain the minPtag; the Ptags of all requests are traversed and adjusted: Ptag-=(minPtag-t); the Ptag, Ltag, and Rtag of the current request are calculated; and the request is placed in the P_heap, L_heap, and R_heap.
[0050] In one embodiment, the dequeue process of the mclock algorithm is shown in Figure 3. When the algorithm schedules a request, it first enters the scheduling phase based on Reservation, giving priority to meeting the Reservation settings and obtaining the request with the smallest Rtag from the R_heap; if the Rtag of the request < t, it can be immediately scheduled. If this condition cannot be met, it means that the Reservation condition has been satisfied and all clients have reached their Reservation settings, then enter step c); at this time, enter the scheduling strategy based on Weight, traverse the L_heap to find all requests with Ltag < now, set the ready state of the request to true, and adjust the P_heap (since the ready state has changed, it needs to be readjusted); obtain the ready request with the smallest Ptag from the P_heap for scheduling; for the requests scheduled through the Weight scheduling strategy, the Rtag of all remaining requests needs to be adjusted: Rtag = Rtag - 1 / Rate; if no request meets the requirement of Ltag < t, schedule after delaying for a time of t - Ltag.
[0051] It can be understood that for the scenario where requests in a distributed file system are executed on multiple servers, it is impossible to set a unified limit rate. That is, the requests come from multiple client sides and are sent to multiple server sides. In this scenario, mClock is no longer applicable because mClock is a single-machine algorithm. If an mClock algorithm is run on each server, these algorithm instances are independent of each other. For example, assume the Limit of request A is La, and request A is evenly sent to three servers S1, S2, and S3. S1, S2, and S3 will each satisfy La, and the final result is that S1, S2, and S3 as a whole satisfy 3*La, which is three times the specified Limit.
[0052] To implement distributed Qos and satisfy the client's ability to set a unified Limit for three servers, dmclock adjusts the formulas for calculating R, L, and P tags as follows:
[0053] In the formula, 1 is replaced by delta, where delta can be understood as meaning that since Server S1 received a request last time and received a request this time, this client sent delta - 1 requests to other Servers S2 and S3.
[0054] As mentioned above, the difference between the dmclock solution and the mclock solution is that the 1 in the formula is replaced by delta, where delta is the number of I / O requests between the last request received by Server S1 and the current request received. This client sent delta-1 requests to other servers S2 and S3.
[0055] Furthermore, the total number of IO requests sent by the client and the IO amount sent when the client sends the IO requests to each object storage service OSS are counted; based on the total IO data volume and the IO amount sent, the request order corresponding to the IO requests sent by each object storage service OSS is calculated.
[0056] In one embodiment, the client may collect statistics on IO status information, calculate delta based on the statistics, and put the delta into the IO request to be transmitted to the server.
[0057] For example, assuming that the order in which client Client1 sends requests is shown in FIG4 , after sending a request to OSS1 for the first time and before sending a request to OSS1 for the second time, Client1 sends a request to OSS2 and OSS3 respectively. Then, the delta of the second request to OSS1 is 2+1=3.
[0058] Specifically, the statistical method is:
[0059] 1) Record the following IO Status Info:
[0060] a) The total number of IOs (ios_total), which is updated and incremented when processing res;
[0061] b) Record the total number of IOs sent by each OSS when sending a request (ios_oss1, ios_oss2, ios_oss3), and record them separately when sending a request;
[0062] 2) When sending a request, use the following formula to calculate delta. For example, when sending a request to OSS1: delta = ios_total - ios_oss1 + 1.
[0063] S102: Calculate the quality of service (QoS) metric corresponding to the IO request based on the dmclock algorithm and the request order, and obtain a QoS restriction scheme for the current distributed file system.
[0064] In one embodiment, the algorithm formula of dmclock is modified as follows:
[0065] The meaning of each data is as follows:
[0066] In this way, the calculation of the QoS restriction scheme for bandwidth resources can be realized.
[0067] In one embodiment, the above dmclock implements the bandwidth QoS formula and the file system implements the IOPS QoS limit solution. In order to achieve the QoS of the file system bandwidth limit, the bd_delta of each IO request is mainly calculated on the client.
[0068] For example, the scheme for calculating bd_delta is as follows:
[0069] 1) Record the following IO Status Info:
[0070] a) The total number of IOs (data_total), which is updated and incremented when processing res;
[0071] b) Record the total IO data volume (data_oss1, data_oss2, data_oss3) of each OSS when sending a request. Record each volume separately when sending a request.
[0072] When sending a request, use the following formula to calculate data_delta. For example, when sending a request to OSS1: bd_delta = data_total - data_oss1 + size of current io.
[0073] Furthermore, based on the dmclock algorithm and the request order, the IOPS label and the bandwidth label corresponding to the IO request are calculated respectively; based on the maximum value function, the IOPS label and the bandwidth label are compared to obtain the Qos metric corresponding to the IO request.
[0074] In one embodiment, the IOPS tag includes an IOPS reservation time tag, an IOPS weight time tag, and an IOPS upper limit time tag, and the bandwidth tag includes a bandwidth reservation time tag, a bandwidth weight time tag, and a bandwidth upper limit time tag.
[0075] Furthermore, based on the maximum value function, the IOPS reservation time label and the bandwidth reservation time label, the IOPS weight time label and the bandwidth weight time label, the IOPS upper limit time label and the bandwidth upper limit time label are compared respectively, and the reservation time label, weight time label and upper limit time label with the largest value are filtered as the Qos measurement indicator corresponding to the IO request.
[0076] In one embodiment, when resource restrictions are imposed on file system users, it is generally necessary to restrict both IOPS and bandwidth. The solution for restricting both IOPS and bandwidth is as follows, which mainly involves modifying the dmclock algorithm as follows:
[0077] In one embodiment, Set to and The larger value, and The calculation is similar. By modifying the DMclock algorithm formula, the DMclock algorithm only schedules requests whose bandwidth and IOPS meet the DMclock limits. This means that the QoS limits for bandwidth and IOPS are achieved simultaneously.
[0078] S103: Obtain the file system subdirectory mounted by the current distributed file system;
[0079] In one embodiment, a file system typically supports a multi-tenant strategy. Typically, a single file system can be accessed by multiple users, requiring isolation of user data to prevent one user from accessing another's data. Furthermore, all tenants share the file system's IOPS resources. To ensure quality of service for tenants, limits, weights, and reservations must be set for directories containing multiple users, effectively implementing a directory-level QoS solution.
[0080] S104: Based on the QoS restriction scheme of the current distributed file system, set a QoS restriction index for the file system subdirectory to implement a QoS scheme at the directory level of the distributed file system.
[0081] In one embodiment, the server-side OSS sets limits, weights, and reservations for different directories. It then retrieves the limits, weights, and reservations for the subdirs from these settings. It then follows the DMclock algorithm to perform the enqueue and dequeue processes. This completes QoS restrictions for the subdirectories.
[0082] This embodiment provides a method for implementing the QoS function at the directory level of a distributed file system. This method uses the dmclock algorithm to implement the distributed QoS function, avoiding the complexity and performance issues introduced by a unified QoS service. While the dmclock algorithm can only limit IOPS, it supports the QoS functions of both IOPS and bandwidth. While the dmclock algorithm can only implement the IOPS QoS of the entire file system, it implements the QoS function at the directory level of the distributed file system, facilitating the multi-tenant isolation of the distributed file system and ensuring the service quality of each tenant. There is no need to introduce additional QoS service components, which reduces the complexity of the system. There is no need to introduce additional QoS service components, which reduces the impact of additional services on IO requests and increases service stability. There is no need to request the QoS service before servicing IO requests, so the latency of IO requests is low.
[0083] Please refer to FIG. 5 , which is a flow chart of a second embodiment of a method for implementing a directory-level QoS function of a distributed file system provided by this application.
[0084] As shown in FIG5 , based on the embodiment shown in FIG1 , before step S103 , the following steps are further included:
[0085] S201: Based on a file system mount command, the client performs a mount operation on the current distributed file system to obtain a file root directory of the current distributed file system;
[0086] Furthermore, the client connects to the metadata node MDS, and the MDS node returns an acknowledgment character ACK; the client sends the index node of the root directory to the MDS; the MDS obtains the root node of the root directory and returns it to the client; the client puts the root node into (sb->root_inode) in the super block, so that sb->root_inode serves as the file root directory of the current distributed file system.
[0087] In one embodiment, the current mount command of the distributed file system is as follows: [root@localhost~]#mount 192.128.0.100: / / mnt / local_path.
[0088] As shown in Figure 6, the client connects to the MDS metadata node, and the MDS node returns an ACK; the client sends a GET_ROOT_MSG, or the inode of the root directory, to the MDS; the MDS obtains the inode of the root directory (inode num = 2) and returns it to the client; the client puts the root_inode into the super block (sb->root_inode), and then all the client's access begins using sb->root_inode as the root directory of the current file system.
[0089] S202: Mount the file system subdirectory into the file root directory based on a subdirectory mount command.
[0090] In one embodiment, the mount command of the sub-directory of the current distributed file system is as follows: [root@localhost~]#mount 192.128.0.100: / sub_dir / mnt / local_path.
[0091] As shown in Figure 7, the difference between subdirectory mounting and file system mounting is that when sending a GET_ROOT_MGS message to the MDS, path = ' / sub_dir' conveys the subdirectory to be mounted. The MDS returns the inode of the subdirectory ' / sub_dir' to the client, which places it as the root_inode in the super block (sb->root_inode). All client accesses then begin using sb->root_inode as the root directory of the current file system. This way, the client can only access files in the subdirectory.
[0092] Furthermore, the client mounts the file system subdirectory locally; when the client reads and writes files in the subdirectory, the subdirectory information is sent to the server; the server sets a Qos restriction indicator for the file system subdirectory based on the Qos restriction scheme of the current distributed file system to implement the Qos scheme at the directory level of the distributed file system.
[0093] In one embodiment, as shown in FIG8 , the implementation scheme of sub-directory QoS is as follows:
[0094] The client mounts the subdirectory locally. At this point, sb->root_inode points to the inode where sub_dir resides. A field called sb->root_dir = " / subdir1" is added to the super block: [root@localhost~]#mount 192.128.0.100: / subdir1 / mnt / local_path. When the client reads or writes files in the subdirectory (e.g., / subdir1 / file1), sb->root_dir is also included in the I / O request, with req->root_dir = " / subdir1".
[0095] In one embodiment, the server-side OSS sets limits, weights, and reservations for different directories. It then retrieves the limits, weights, and reservations for the subdirs from these settings. It then follows the DMclock algorithm to perform the enqueue and dequeue processes. This completes QoS restrictions for the subdirectories.
[0096] Please refer to Figure 9, which is a schematic diagram of the structure of a first embodiment of a distributed file system directory-level QoS function implementation device provided by this application. The distributed file system directory-level QoS function implementation device is used to execute the aforementioned distributed file system directory-level QoS function implementation method. The distributed file system directory-level QoS function implementation device can be configured in a server.
[0097] As shown in FIG9 , the device 300 for implementing the directory-level QoS function of the distributed file system includes: a request order acquisition module 301 , an indicator calculation module 302 , a sub-directory acquisition module 303 and a directory-level QoS solution implementation module 304 .
[0098] The request sequence acquisition module 301 is used to acquire the request sequence corresponding to the IO request when the client sends the IO request to the server;
[0099] An indicator calculation module 302 is configured to calculate a quality of service (QoS) metric corresponding to the IO request based on a dmclock algorithm and the request order, and obtain a QoS restriction scheme for the current distributed file system.
[0100] The subdirectory obtaining module 303 is used to obtain the file system subdirectory mounted by the current distributed file system;
[0101] The directory-level QoS solution implementation module 304 is configured to set a QoS restriction index for the file system subdirectory based on the QoS restriction solution of the current distributed file system, so as to implement a QoS solution at the directory level of the distributed file system.
[0102] In one embodiment, the request order acquisition module 301 is further used to count the total number of IO requests sent by the client and the IO amount sent when the client sends the IO requests to each object storage service OSS; based on the total IO data volume and the IO amount sent, calculate the request order corresponding to the IO requests sent by each object storage service OSS.
[0103] In one embodiment, the indicator calculation module 302 is also used to calculate the IOPS label and bandwidth label corresponding to the IO request based on the dmclock algorithm and the request order; based on the maximum value function, compare the IOPS label and the bandwidth label to obtain the Qos measurement indicator corresponding to the IO request.
[0104] In one embodiment, the IOPS tag includes an IOPS reservation time tag, an IOPS weight time tag, and an IOPS upper limit time tag, and the bandwidth tag includes a bandwidth reservation time tag, a bandwidth weight time tag, and a bandwidth upper limit time tag;
[0105] The indicator calculation module 302 is also used to compare the IOPS reservation time label and the bandwidth reservation time label, the IOPS weight time label and the bandwidth weight time label, the IOPS upper limit time label and the bandwidth upper limit time label based on the maximum value function, and filter the reservation time label, weight time label and upper limit time label with the largest value as the Qos measurement indicator corresponding to the IO request.
[0106] In one embodiment, the distributed file system directory-level QoS function implementation device 300 also includes a directory mounting module, which is used to perform a mount operation on the current distributed file system through the client based on a file system mount command to obtain the file root directory of the current distributed file system; and mount the file system subdirectory into the file root directory based on a subdirectory mount command.
[0107] In one embodiment, the directory mounting module is also used for the client to connect to the metadata node MDS, and the MDS node returns an acknowledgment character ACK; the client sends the index node of the root directory to the MDS; the MDS obtains the root node of the root directory and returns it to the client; the client puts the root node into (sb->root_inode) in the super block, so that sb->root_inode serves as the file root directory of the current distributed file system.
[0108] In one embodiment, the directory mounting module is also used by the client to mount the file system subdirectory locally; when the client reads and writes files in the subdirectory, the subdirectory information is sent to the server; the server sets a Qos restriction indicator for the file system subdirectory based on the Qos restriction scheme of the current distributed file system to implement the Qos scheme at the directory level of the distributed file system.
[0109] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned distributed file system directory-level Qos function implementation method embodiment, and will not be repeated here.
[0110] The apparatus provided in the above embodiment may be implemented in the form of a computer program, which may be run on a computer device as shown in FIG10 .
[0111] Please refer to Figure 10, which is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a server.
[0112] 10 , the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0113] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, can enable the processor to execute any method for implementing the QoS function at the directory level of the distributed file system.
[0114] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0115] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any method for implementing the QoS function at the directory level of the distributed file system.
[0116] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that the structure shown in FIG10 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. A specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0117] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0118] In one embodiment, the processor is configured to execute a computer program stored in the memory to implement the following steps:
[0119] When the client sends an IO request to the server, obtain the request order corresponding to the IO request;
[0120] Based on the dmclock algorithm and the request order, the service quality (Qos) metric corresponding to the IO request is calculated to obtain the Qos restriction scheme of the current distributed file system;
[0121] Obtain the file system subdirectory mounted by the current distributed file system;
[0122] Based on the QoS restriction scheme of the current distributed file system, a QoS restriction index is set for the file system subdirectory to implement a QoS scheme at the directory level of the distributed file system.
[0123] When implementing the obtaining of the request order corresponding to the IO request, the processor is configured to implement:
[0124] Count the total number of IO requests sent by the client, and the IO volume sent when the client sends the IO requests to each object storage service OSS;
[0125] Based on the total IO data volume and the IO sent volume, a request order corresponding to the IO requests sent by each object storage service OSS is calculated.
[0126] When the processor calculates the quality of service (QoS) metric corresponding to the IO request based on the dmclock algorithm and the request order, the processor is configured to implement:
[0127] Based on the dmclock algorithm and the request order, respectively calculate the read and write times per second (IOPS) label and the bandwidth label corresponding to the IO request;
[0128] Based on the maximum value function, the IOPS label and the bandwidth label are compared to obtain the Qos metric corresponding to the IO request.
[0129] In one embodiment, the IOPS tag includes an IOPS reservation time tag, an IOPS weight time tag, and an IOPS upper limit time tag, and the bandwidth tag includes a bandwidth reservation time tag, a bandwidth weight time tag, and a bandwidth upper limit time tag;
[0130] When the processor implements the maximum value function-based comparison of the IOPS label and the bandwidth label to obtain the QoS metric corresponding to the IO request, it is configured to implement:
[0131] Based on the maximum value function, the IOPS reservation time label and the bandwidth reservation time label, the IOPS weight time label and the bandwidth weight time label, the IOPS upper limit time label and the bandwidth upper limit time label are compared respectively, and the reservation time label, weight time label and upper limit time label with the largest value are filtered as the Qos measurement indicator corresponding to the IO request.
[0132] In one embodiment, before obtaining the file system subdirectory mounted on the current distributed file system, the processor is further configured to:
[0133] Based on a file system mount command, the client performs a mount operation on the current distributed file system to obtain a file root directory of the current distributed file system;
[0134] Based on the subdirectory mount command, the file system subdirectory is mounted into the file root directory.
[0135] In one embodiment, when the processor implements the file system mount command and performs a mount operation on the current distributed file system through the client to obtain the file root directory of the current distributed file system, it is configured to implement:
[0136] The client connects to the metadata node MDS, and the MDS node returns an acknowledgment character ACK;
[0137] The client sends the index node of the root directory to the MDS;
[0138] The MDS obtains the root node of the root directory and returns it to the client;
[0139] The client puts the root node into (sb->root_inode) in the super block, so that sb->root_inode serves as the file root directory of the current distributed file system.
[0140] In one embodiment, when the processor implements the QoS restriction scheme based on the current distributed file system and sets a QoS restriction indicator for the file system subdirectory to implement the QoS scheme at the distributed file system directory level, the processor is configured to implement:
[0141] The client mounts the file system subdirectory locally;
[0142] When the client reads or writes files in a subdirectory, the client sends the subdirectory information to the server;
[0143] The server sets a Qos restriction index for the file system subdirectory based on the Qos restriction scheme of the current distributed file system, so as to implement a Qos scheme at the directory level of the distributed file system.
[0144] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and the computer program includes program instructions. The processor executes the program instructions to implement any distributed file system directory-level QoS function implementation method provided in the embodiment of the present application.
[0145] The computer-readable storage medium may be an internal storage unit of the computer device described in the aforementioned embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc., equipped on the computer device.
[0146] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for implementing the QoS function at the directory level of a distributed file system, characterized in that: The method comprises: When the client sends an IO request to the server, obtain the request order corresponding to the IO request; Based on the dmclock algorithm and the request order, the service quality Qos metric index corresponding to the IO request is calculated to obtain the Qos restriction scheme of the current distributed file system; Obtain the file system subdirectory mounted by the current distributed file system; Based on the QoS restriction scheme of the current distributed file system, a QoS restriction index is set for the file system subdirectory to implement a QoS scheme at the directory level of the distributed file system.
2. The method for implementing the QoS function at the directory level of a distributed file system according to claim 1, characterized in that: The obtaining the request order corresponding to the IO request includes: Count the total number of IO requests sent by the client and the IO sent when the client sends the IO request to each object storage service OSS; Based on the total IO data volume and the IO sent volume, a request order corresponding to the IO requests sent by each object storage service OSS is calculated.
3. The method for implementing the QoS function at the directory level of a distributed file system according to claim 1, characterized in that: The calculating the quality of service (Qos) metric corresponding to the IO request based on the dmclock algorithm and the request order includes: Based on the dmclock algorithm and the request order, respectively calculate the read and write times per second IOPS label and the bandwidth label corresponding to the IO request; Based on the maximum value function, the IOPS label and the bandwidth label are compared to obtain the Qos metric corresponding to the IO request.
4. The method for implementing the QoS function at the directory level of a distributed file system according to claim 3, characterized in that: The IOPS tag includes an IOPS reservation time tag, an IOPS weight time tag, and an IOPS upper limit time tag, and the bandwidth tag includes a bandwidth reservation time tag, a bandwidth weight time tag, and a bandwidth upper limit time tag; The IOPS label and the bandwidth label are compared based on the maximum value function to obtain the IOPS label. The QoS metrics corresponding to the request include: Based on the maximum value function, the IOPS reservation time label and the bandwidth reservation time label, the IOPS weight time label and the bandwidth weight time label, the IOPS upper limit time label and the bandwidth upper limit time label are compared respectively, and the reservation time label, weight time label and upper limit time label with the largest value are filtered out as the Qos measurement indicator corresponding to the IO request.
5. The method for implementing the QoS function at the directory level of a distributed file system according to claim 1, characterized in that: Before obtaining the file system subdirectory mounted by the current distributed file system, the method further includes: Based on the file system mount command, the client performs a mount operation on the current distributed file system to obtain a file root directory of the current distributed file system; Based on the sub-directory mount command, the file system sub-directory is mounted into the file root directory.
6. The method for implementing the QoS function at the directory level of a distributed file system according to claim 5, characterized in that: The step of performing a mount operation on the current distributed file system through the client based on the file system mount command to obtain a file root directory of the current distributed file system includes: The client connects to the metadata node MDS, and the MDS node returns an acknowledgment character ACK; The client sends the index node of the root directory to the MDS; The MDS obtains the root node of the root directory and returns it to the client; The client puts the root node into (sb->root_inode) in the super block, so that sb->root_inode serves as the file root directory of the current distributed file system.
7. The method for implementing the QoS function at the directory level of a distributed file system according to claim 5, characterized in that: The Qos restriction scheme based on the current distributed file system, setting a Qos restriction index for the file system subdirectory to implement a Qos scheme at the distributed file system directory level, includes: The client mounts the file system subdirectory locally; When the client reads and writes files in a subdirectory, the subdirectory information is sent to the server; The server side controls the file system based on the QoS restriction scheme of the current distributed file system. Set QoS limit indicators for system sub-directories to implement the QoS solution at the directory level of the distributed file system.
8. A device for implementing the QoS function at the directory level of a distributed file system, characterized in that: The distributed file system directory-level QoS function implementation device comprises: A request order acquisition module, used to acquire the request order corresponding to the IO request when the client sends the IO request to the server; An indicator calculation module, used to calculate the service quality Qos measurement indicator corresponding to the IO request based on the dmclock algorithm and the request order, and obtain the Qos restriction scheme of the current distributed file system; A subdirectory acquisition module, used to acquire the file system subdirectory mounted by the current distributed file system; The directory-level QoS solution implementation module is used to set QoS restriction indicators for the file system subdirectories based on the QoS restriction solution of the current distributed file system to implement the QoS solution at the directory level of the distributed file system.
9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the method for implementing the QoS function at the directory level of a distributed file system as described in any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for implementing the QoS function at the directory level of a distributed file system as claimed in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Storage system QoS (quality of service) control method and device
CN107133100A
Service quality control method and device and storage server
CN108881348A
Service quality control method and device, equipment and storage medium
CN115426374A
Method, system and device for realizing multiple tenants based on directory partition and medium
CN115859346A
Detecting stale storage layouts without using client locks
US20170249327A1
Cited By
File system performance determination method, product, distributed storage system and medium
CN119322721A
