Method for realizing automatic QoS control of single disk of cloud hard disk and medium

By adding a Cinder REST API interface and an extended verification toolset to the cloud disk system, independent QoS policy configuration and dynamic adjustment for individual cloud disks are achieved, solving the problems of coarse QoS control granularity and poor flexibility in existing technologies, and improving system efficiency and performance.

CN120896907APending Publication Date: 2025-11-04SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510852405.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Existing QoS solutions cannot set independent policies for individual cloud disks, lack dynamic adjustment capabilities, and cannot effectively cope with load changes.

Method used

By adding a new Cinder REST API interface and expanding the verification toolset, independent QoS policy configuration for individual cloud disks can be achieved. Combined with dynamic value conversion and dual-mode flow control settings, it supports hot policy updates and precise routing for both the front-end and back-end.

Benefits of technology

It enables precise QoS control of individual cloud disks, eliminates the problem of unreasonable resource allocation, supports dynamic adjustment and rapid response of policies, and reduces the performance loss of the host machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120896907A_ABST
    Figure CN120896907A_ABST
Patent Text Reader

Abstract

The invention discloses a method for realizing QoS automatic control of a single cloud hard disk and a medium, mainly relates to the technical field of the single cloud hard disk, and is used for solving the problems that an independent QoS strategy cannot be set for a single cloud hard disk and QoS strategy change cannot be implemented on an online cloud hard disk through an effective interface in the prior art. Comprising the following steps: when a scope is a rear end, directly finding a corresponding block device according to a cloud hard disk id in a QoS attribute of a single volume, and setting the QoS attribute of the single volume; a nova rest api interface is newly added to the management and control node; when the action range is a front end, generating a rest request corresponding to the converted QoS attribute of the single volume, and when a preset second legality verification rule is met, initiating the rest request to a computing management service in the computing node; and when the rest request does not contain the preset attribute, performing flow control setting in a host machine user mode, otherwise, performing flow control setting in a virtual machine kernel mode.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud hard disk single disk, and particularly relates to a method and medium for realizing automatic control of cloud hard disk single disk QoS. BACKGROUND

[0002] The QoS (Quality of Service) function is a key feature in network services, mainly used for fine control and management of virtual network traffic, to ensure that different applications or tenants can obtain network performance that meets their needs.

[0003] The existing QoS is mainly realized by global speed limiting of the storage backend, allowing administrators to define and implement service quality policies for volume types to ensure that storage performance meets the specific application requirements; the QoS Spec defines a set of service quality policies, including IO limits and bandwidth allocation, etc. The policies of QoS include front-end (host) and back-end (storage system).

[0004] The existing QoS function has the following defects: (1) the control granularity is coarse, only supporting global speed limiting of the storage type, and unable to set independent QoS policies for a single cloud hard disk; (2) lacking dynamic adjustment capability, the policies are statically bound, and when responding to different load changes, the QoS policy changes cannot be implemented for online cloud hard disks through effective interfaces. SUMMARY

[0005] The present application provides a method and medium for realizing automatic control of cloud hard disk single disk QoS, to solve the problems that the existing scheme cannot set independent QoS policies for a single cloud hard disk, and cannot implement QoS policy changes for online cloud hard disks through effective interfaces.

[0006] In a first aspect, the present application provides a method for realizing automatic control of cloud hard disk single disk QoS, the method comprising: adding a cinder rest api interface to a management and control node of a cloud hard disk single disk; and configuring a single volume QoS attribute through the cinder rest api interface; extending a cinder volume preset verification tool set in a block storage management service of the management and control node, and when a flow control attribute request corresponding to the single volume QoS attribute is received by an interface of the block storage management service, verifying whether the single volume QoS attribute conforms to a preset first legality verification rule in the cinder volume preset verification tool set; The block storage management service expands the cinder volume pre-design calculation tool set. After meeting preset legality verification rules, the block storage management service converts single volume QoS attributes into a content format suitable for front-end / back-end use. When preset attribute data is present in the single volume QoS attributes, the preset attribute data is converted into a preset dynamic value by using a preset calculation formula in the cinder volume pre-design calculation tool set. The scope of the converted single volume QoS attributes is read. When the scope is the back-end, the corresponding block device is found according to the cloud disk id in the single volume QoS attributes, and the single volume QoS attributes are set. A nova rest api interface is added to the control node. When the scope is the front-end, a rest request corresponding to the converted single volume QoS attributes is generated. The preset second legality verification rule is verified by the nova rest api interface, to check whether the rest request meets the preset second legality verification rule. When the preset second legality verification rule is met, a rest request is initiated to the compute management service in the compute node. When the rest request does not contain preset attributes, a host user mode is used for flow control setting, otherwise a virtual machine kernel mode is used for flow control setting.

[0007] In an implementation manner of the present application, the single volume QoS attributes include: an upper limit flow control attribute, a burst flow control management attribute, and a lower limit guarantee attribute.

[0008] In an implementation manner of the present application, the preset first legality verification rule at least includes: Whether the preset burst flow control management attribute in the flow control attribute request exists simultaneously with the preset upper limit flow control attribute of the same type; Whether the preset burst flow control attribute value in the flow control attribute request is higher than the preset upper limit flow control attribute value of the same type; Whether the preset burst flow control attribute is set simultaneously with the preset burst flow control duration attribute; Whether the preset flow control attribute related to single disk QoS is a preset high priority, and whether the priority is higher than the preset flow control attribute related to global QoS.

[0009] In an implementation manner of the present application, the preset attribute data is converted into a preset dynamic value by using a preset calculation formula in the cinder volume pre-design calculation tool set, specifically including: The preset attribute data is converted into a preset dynamic value by using a preset calculation formula. ), The preset attribute data is converted into a preset dynamic value ; Wherein, represents preset base flow control attribute_base in single volume QoS attribute, represents the amount of flow control attribute growth per 1 GB of cloud disk capacity growth in single volume QoS attribute s_per_gb, represents the actual capacity of the cloud disk in single volume QoS attribute, represents the lower limit in dynamic flow control attribute in single volume QoS attribute s_per_gb_min, represents the upper limit value in dynamic flow control attribute in single volume QoS attribute s_max.

[0010] In an implementation manner of the present application, reading the scope of the converted single volume QoS attribute, specifically includes: obtaining the flow control attribute scope input by the single volume QoS attribute through the cinder volume driver manager in the management node; when the scope is front-end, the scope is front-end; when the scope is back-end, the scope is back-end.

[0011] In an implementation manner of the present application, when the scope is back-end, the corresponding block device is directly found according to the cloud disk id in the single volume QoS attribute to perform the setting of the single volume QoS attribute, specifically includes: when the scope is back-end, the corresponding block device is found on the interfaced back-end storage according to the cloud disk id in the single volume QoS attribute to perform the setting of the single volume QoS attribute.

[0012] In an implementation manner of the present application, the preset attribute at least includes bandwidth attribute, iops burst attribute, and burst duration attribute.

[0013] In an implementation manner of the present application, when the preset attribute is not contained in the rest request, the flow control setting is performed by using the host user mode, specifically includes: when the preset attribute is not contained in the rest request, the computing node creates a cgroup directory named with the virtual machine domain object name, and simultaneously obtains the device number MAJ:MIN of the corresponding virtual machine disk device through the lsblk command; a file with a name corresponding to the rest request name is created under the cgroup directory; the device number and the flow control attribute value in the rest request are written into the file; finally, the virtual machine qemu process is bound to the cgroup directory.

[0014] In an implementation manner of the present application, after the flow control setting is performed by using the host user mode when the preset attribute is not contained in the rest request, or the flow control setting is performed by using the virtual machine kernel mode, the method further includes: The rest request corresponding flow control attribute name is converted into the corresponding iotune attribute name recognizable by libvirt, and is updated into the local xml definition file of the virtual machine.

[0015] In a second aspect, the present application provides a non-volatile computer storage medium having computer instructions stored thereon, the computer instructions, when executed, implement a method for automatically controlling QoS of a cloud hard disk as any one of the above.

[0016] From the above technical solutions, the present application has the following advantages: The present application realizes independent QoS policy configuration for a single cloud hard disk by adding a cinder rest api interface and extending a verification tool set. Specifically, 1) the management and control node can implement differentiated flow control settings for the cloud hard disk ID of each volume, eliminating the problem of unreasonable resource allocation caused by the original global speed limiting policy; 2) a preset verification rule set performs double legality verification on input parameters, including second-layer verification of the front-end nova interface, to ensure compliance of the single-disk policy setting; and 3) through a dynamic value conversion mechanism, preset attribute data is processed into executable parameters through a calculation formula, so that the single-disk QoS policy can accurately adapt to different hardware configurations.

[0017] The present application constructs an online policy update channel: 1) a scope determination mechanism automatically selects a backend direct connection or a front-end interface path according to the converted QoS attribute, realizing hot update of the policy without interrupting the service; 2) a dual-mode flow control setting (host user state / virtual machine kernel state) can be dynamically switched according to the request attribute, shortening the response time while maintaining the original performance isolation of the virtual machine; and 3) a pre-designed calculation tool set supports conversion of static policy parameters into dynamic thresholds, so that a single cloud hard disk can automatically adjust the IOPS limit according to the load change. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0019] Figure 1 is a method flowchart for automatically controlling QoS of a cloud hard disk provided by an embodiment of the present application. DETAILED DESCRIPTION

[0020] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall into the protection scope of the present application.

[0021] Those skilled in the art should understand that the embodiments described below are only preferred embodiments of the present disclosure, and do not represent the only way to implement the present disclosure. The preferred embodiments are only used to explain the technical principles of the present disclosure, and are not used to limit the protection scope of the present disclosure. Based on the preferred embodiments provided by the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall into the protection scope of the present disclosure.

[0022] It should also be noted that the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed, or other elements inherent in such a process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0023] The present application provides a method and medium for implementing automatic control of single cloud hard disk QoS to accurately control the QoS of a single cloud hard disk in a cloud computing environment, solves the problems of coarse control granularity and poor flexibility of OpenStack cloud hard disk QoS control, and is suitable for financial, video processing and other scenarios sensitive to storage performance. In some scenarios, the performance loss of the host caused by QoS control can be significantly reduced, which is beneficial to cost savings for users.

[0024] The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0025] The embodiments provide a method for implementing automatic control of a single cloud hard disk QoS, as shown in Figure 1 The method provided by the embodiments of the present application mainly includes the following steps: Step 110, adding a cinder rest api interface to a management and control node of a single cloud hard disk; and configuring a single volume QoS attribute through the cinder rest api interface.

[0026] In some embodiments, the single volume QoS attribute includes an upper limit flow control attribute, a burst flow control management attribute, and a lower limit guarantee attribute.

[0027] Specifically, a new module volume_quality_of_service can be defined under the cinder / api / v3 / directory, an interface named volume-qos is added to the module, and methods for creating, updating, and deleting resources corresponding to the interface are defined; when the creation and update methods of the volume-qos interface are called, the flow control attribute scope and the QoS flow control attribute should be passed in the request body, and the interface will check the request body structure, field length, and field type.

[0028] Among them, the upper limit flow control attribute is %(option)s_bytes_sec, %(options)s_iops_sec. Burst flow control management attribute: %(option)s_bytes_sec_max_burst, %(option)s_iops_sec_max_burst, %(option)s_bytes_sec_max_burst_length, %(option)s_iops_sec_max_burst_length. Lower limit guarantee attribute: %(option)s_bytes_sec_min, %(option)s_iops_sec_min.

[0029] Wherein, option represents read, write or total.

[0030] It should be noted that this step realizes the fine control of single-disk QoS by adding a cinder rest api interface in the cinder service, which mainly brings three improvements: first, the interface supports the configuration of upper limit flow control (bytes_sec / iops_sec), burst management (max_burst related attributes), and lower limit guarantee (bytes_sec_min, etc.), and distinguishes the read / write direction (read / write / total) through the option parameter, which improves the single-disk bandwidth control precision from a global uniform value to an independent threshold that can distinguish IO types. Secondly, the structured request body design combined with field length / type checking reduces the configuration failure rate caused by illegal parameters.

[0031] Step 120, expand the cinder volume preset verification tool set in the block storage management service of the management node, when the block storage management service interface receives a flow control attribute request corresponding to a single volume QoS attribute, check whether the single volume QoS attribute meets the preset first legality verification rule in the cinder volume preset verification tool set.

[0032] It should be noted that the preset first legality verification rule at least includes: whether the preset burst flow control management attribute in the flow control attribute request exists simultaneously with the preset upper limit flow control attribute of the same type; whether the preset burst flow control attribute value in the flow control attribute request is higher than the preset upper limit flow control attribute value of the same type; whether the preset burst flow control attribute is set simultaneously with the preset burst flow control duration attribute; whether the preset flow control attribute related to single-disk QoS is of preset high priority, and whether the priority is higher than that of the preset flow control attribute related to global QoS.

[0033] Those skilled in the art can understand that the cinder volume preset verification tool set is used to implement the QoS verification module, supports legality verification of single-disk QoS specific content, and priority sorting of single-disk QoS and global QoS. Specifically, in terms of legality verification, the related coexistence attributes are verified: 1) the burst flow control management attribute must exist simultaneously with the upper limit flow control attribute of the same type; 2) the burst flow control attribute value must be higher than the upper limit flow control attribute value of the same type; 3) the burst flow control attribute must be set simultaneously with the burst flow control duration attribute. In terms of priority sorting, the single-disk QoS related flow control attribute is of high priority, and the global QoS related flow control attribute is of low priority. When the single-disk QoS flow control attribute conflicts with the global QoS flow control attribute, the single-disk QoS flow control attribute is mainly reserved.

[0034] It should be noted that this step realizes fine management and control of the single-disk QoS strategy by expanding the cinder volume preset verification tool set in the block storage management service. The verification tool set includes four types of core verification rules: through attribute coexistence verification to ensure that the burst flow control management attribute must exist simultaneously with the upper limit flow control attribute of the same type, to reduce the error configuration ratio; through numerical logic verification to require that the burst flow control value must be higher than the upper limit flow control value, to intercept the numerical conflict configuration; through duration association verification to force the burst attribute to be set simultaneously with the duration attribute, to avoid incomplete configuration; through the priority processing mechanism to establish that the single-disk QoS strategy is prior to the global strategy, to solve the problem of conflict scenarios. This set of verification mechanisms reduces storage performance abnormalities caused by configuration errors, and reduces parameter verification time before the strategy takes effect. In particular, the attribute coexistence verification can use precompiled regular expression matching to improve verification efficiency.

[0035] Step 130, expand the cinder volume pre-design calculation tool set in the block storage management service, and convert the single volume QoS attribute into a content format suitable for front-end / back-end use after meeting the preset legality verification rules; when there is preset attribute data in the single volume QoS attribute, use the pre-design calculation formula in the cinder volume pre-design calculation tool set to convert the preset attribute data into a preset dynamic value.

[0036] It should be noted that the cinder volume pre-design calculation tool set is used to implement the cloud hard disk QoS flow control attribute conversion module, which supports single cloud hard disk QoS flow control attribute dynamic following volume capacity change within the range of incoming flow control upper and lower limits.

[0037] Among them, the preset attribute data is converted into a preset dynamic value by using the pre-design calculation formula in the cinder volume pre-design calculation tool set, which can be specifically: Through the pre-design calculation formula: ), Convert the preset attribute data into a preset dynamic value ; Among them, represents a preset basic flow control attribute_base in the single volume QoS attribute, represents the amount of flow control attribute growth per GB of cloud hard disk capacity growth_per_gb in the single volume QoS attribute, represents the actual capacity of the cloud hard disk in the single volume QoS attribute, represents the lower limit of the dynamic flow control attribute per_gb_min in the single volume QoS attribute, represents the upper limit of the dynamic flow control attribute %s_max in the single volume QoS attribute.

[0038] It should be noted that this step realizes the dynamic calculation and format conversion function of QoS attribute by expanding the cinder volume pre-design calculation tool set. Its core value is reflected in three aspects: first, the dynamic calculation mechanism based on the formula makes the flow control threshold value linearly expand with the volume capacity. The configuration workload is reduced, and at the same time, the threshold deviation caused by manual calculation is avoided. Secondly, the format conversion module supports two output formats of front-end (cgroup / libvirt) and back-end (device driver), which reduces the format error compared with the static configuration scheme. In particular, the dynamic calculation process strictly follows the preset upper and lower limit constraints (%s_per_gb_min and %s_max), which prevents the boundary value condition.

[0039] Step 140, read the scope of the converted single volume QoS attribute; when the scope is back-end, directly find the corresponding block device according to the cloud disk id in the single volume QoS attribute to set the single volume QoS attribute.

[0040] In some embodiments, reading the scope of the converted single volume QoS attribute specifically includes: By managing the cinder volume driver manager in the node, the flow control attribute scope input by the single volume QoS attribute is obtained; When the scope is front-end, the scope is front-end. When the scope is back-end, the scope is back-end.

[0041] Those skilled in the art can understand that the QoS scheduler (cinder volume driver manager) is implemented in the block storage service. The single disk QoS attribute supports the configuration of the flow control attribute scope. In the block storage service driver manager (cinder volume driver manager), according to whether the flow control attribute scope input by the single disk QoS is front-end or back-end, the setting of the flow control attribute is scheduled to the computing management service or the back-end storage. Specifically, if the scope is front-end, the setting request of the flow control attribute is sent to the computing management service interface; if the scope is back-end, the request is directly sent to the storage back-end device, and the storage directly sets the flow control attribute for the cloud disk.

[0042] When the scope is back-end, the corresponding block device is directly found according to the cloud disk id in the single volume QoS attribute to set the single volume QoS attribute, which can be specifically: When the scope is back-end, the corresponding block device is found on the interfaced back-end storage according to the cloud disk id in the single volume QoS attribute to set the single volume QoS attribute.

[0043] It should be noted that the present step realizes accurate routing and execution of the QoS policy through the scope differentiation mechanism. When the scope of the QoS attribute is identified as the backend, the system directly sets through the cloud disk ID to the corresponding block storage device, avoiding the additional overhead of forwarding through the computing node. This direct connection reduces the number of network hops, significantly reducing the QoS configuration delay of the backend storage device. The request of the front-end scope is routed to the computing management service, maintaining the original control path. The scope differentiation mechanism enables different types of QoS policies to select the optimal execution path: front-end policies that need to be coordinated with virtual machine scheduling go through the computing node, while pure storage-level back-end policies directly act on the storage device. This division not only ensures the efficiency of policy execution, but also maintains the clarity of the system architecture. The scheme also centrally processes scope resolution through a unified cinder volume driver manager, avoiding logical inconsistencies caused by individual component judgments. The direct mapping mechanism from cloud disk ID to block device improves the reliability of backend settings and reduces configuration errors that may be introduced by intermediate links. The entire process maintains compatibility with the existing cinder driver architecture and does not disrupt the original API interface specifications. This design enables QoS policies to select the most suitable execution path based on their actual target objects, optimizing system performance while maintaining functional integrity.

[0044] Step 150, adding a nova rest api interface in the management and control node; when the scope is front-end, generating a rest request corresponding to the converted single volume QoS attribute, and verifying whether the rest request meets the preset second legality verification rule through the preset second legality verification rule in the nova rest api interface.

[0045] It should be noted that the nova rest api interface supports setting flow control attributes with a front-end scope for virtual machine instance devices and supports hot changes and persistence of attributes. Specifically, the nova rest api interface receives a rest request sent by the cinder-volume (block storage management service) and performs legality verification, and then schedules the (rest request) to the virtual machine specific computing node backend manager nova compute manager.

[0046] Step 160, when the preset second legality verification rule is met, initiating a rest request to the computing management service in the computing node; when the rest request does not contain the preset attribute, using the host user mode to set the flow control, otherwise using the virtual machine kernel mode to set the flow control.

[0047] Among them, the preset attribute at least includes a bandwidth attribute, an iops burst attribute, and a burst duration attribute.

[0048] When the preset attribute is not included in the rest request, the flow control setting is performed in the host user mode, which can be specifically: When the preset attribute is not included in the rest request, the computing node creates a cgroup directory named after the virtual machine domain object name, and obtains the device number MAJ:MIN of the corresponding virtual machine disk device through the lsblk command; a file with a name corresponding to the name of the rest request is created in the cgroup directory; the device number and the flow control attribute value in the rest request are written into the file; finally, the virtual machine qemu process is bound to the cgroup directory (when the number of cloud disks mounted by the computing node virtual machine is large, this front-end speed limiting method can obviously reduce the additional cpu overhead of the computing node).

[0049] After the flow control setting is performed in the host user mode when the preset attribute is not included in the rest request, or the flow control setting is performed in the virtual machine kernel mode, the method can further include: The flow control attribute name corresponding to the rest request is converted into the corresponding iotune attribute name recognizable by libvirt, and is updated to the local xml definition file of the virtual machine (the local xml file of the virtual machine is modified, the related flow control attribute content is synchronized, and the attribute configuration is prevented from being lost).

[0050] Based on the above description, as a specific embodiment of the method: The single volume QoS attribute is configured through a cinder rest api interface. The cinder api of the block storage management service interface receives a flow control attribute request corresponding to the single volume QoS attribute, sets the flow control attribute for the cloud disk specified by the single volume QoS attribute, and after the request format and content of the flow control attribute request are checked for legality (preset first legality check rule) by the cinder volume preset check tool set, the block storage management service interface dispatches the request for setting the single disk flow control attribute to the block storage management service cinder-volume corresponding to the actual backend of the cloud disk. The block storage management service first stores the related flow control attribute content in the database, and then attempts to set the flow control attribute through the front-end or back-end method. This operation is synchronous, and if the setting fails, the corresponding updated database will be rolled back. The block storage management service converts the single volume QoS attribute into a content format suitable for the front-end / back-end, and when there is preset attribute data in the single volume QoS attribute, the preset attribute data is converted into a preset dynamic value using the preset calculation formula in the cinder volume preset calculation tool set. Then, the block storage service selects a specific flow control attribute setting method according to the scope of the single volume QoS attribute. If the flow control attribute scope is the backend, the block storage management service directly finds the corresponding block device on the backend storage it connects to according to the cloud disk id, and sets the flow control attribute. This method is also suitable for setting the lower limit guarantee type of flow control attribute. If the flow control attribute scope is the front-end, the block storage management service then initiates a request to the nova api of the computing management service interface to set the flow control attribute in the front-end. If the flow control attribute does not contain bandwidth, iops burst, and burst duration related attributes, the computing management service will preferentially use the host user mode, i.e. cgroup blockio, for flow control setting after receiving the related request. Otherwise, the virtual machine kernel mode is used, i.e. the libvirt interface is called to set the flow control of the virtual machine block device. Finally, the virtual machine local xml file is modified, and the related flow control attribute content is synchronized to prevent attribute configuration loss.

[0051] Based on the above description, the application realizes independent configuration of single-disk QoS policy by adding a cinder rest API interface. The core value is reflected in three aspects: first, the interface design covers three types of attributes, including upper limit flow control, burst management and lower limit guarantee, supports read / write / total separation configuration, and improves the single-disk bandwidth control precision from the original global unified value to independent threshold values that can distinguish different IO types. Second, the verification tool set intercepts illegal parameter combinations at the API layer through the preset 4 types of legality rules (attribute coexistence verification, numerical logic verification, time length correlation verification, and priority conflict verification). Finally, the dynamic calculation formula (v=%_base+%s_per_gb×capacity) realizes linear expansion of the flow control threshold with the volume capacity, which can reduce the pre-configuration workload in the 100GB-10TB capacity range, and avoid the threshold setting deviation caused by manual calculation.

[0052] The scope determination and double-path execution mechanism significantly improve system efficiency: 1) the backend direct connection path uses device ID direct mapping, and the policy takes effect with reduced delay; 2) the front-end path uses the nova interface for secondary verification and cgroup / libvirt dual-mode setting, which reduces the host CPU overhead while ensuring policy persistence. In particular, the forced association verification mechanism of burst attributes and basic flow control effectively prevents storage performance jitter caused by configuration conflicts.

[0053] In addition, the embodiment of the application further provides a non-volatile computer storage medium, which stores executable instructions, and when the executable instructions are executed, a method for realizing automatic control of cloud hard disk single-disk QoS is realized.

[0054] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for implementing automatic control of single-disk QoS of a cloud hard disk, characterized in that, The method comprises: A cinder rest api interface is added in a cloud disk single disk management node; a single volume QoS attribute is configured through the cinder rest api interface; A cinder volume preset verification tool set is extended in a block storage management service of the management node; when a flow control attribute request corresponding to the single volume QoS attribute is received in an interface of the block storage management service, it is verified whether the single volume QoS attribute conforms to a preset first legality verification rule in the cinder volume preset verification tool set; A cinder volume preset calculation tool set is extended in the block storage management service; after the preset legality verification rule is met, the block storage management service converts the single volume QoS attribute into a content format suitable for front-end / back-end use; when preset attribute data exists in the single volume QoS attribute, the preset attribute data is converted into a preset dynamic value by using a preset calculation formula in the cinder volume preset calculation tool set; The scope of the converted single volume QoS attribute is read; when the scope is back-end, a corresponding block device is found according to a cloud disk id in the single volume QoS attribute, and the single volume QoS attribute is set; A nova rest api interface is added in the management node; when the scope is front-end, a rest request corresponding to the converted single volume QoS attribute is generated, and a preset second legality verification rule in the nova rest api interface is used to verify whether the rest request conforms to the preset second legality verification rule; When the preset second legality verification rule is met, the rest request is initiated to a computing management service in a computing node; when the rest request does not contain preset attributes, a host user mode is used for flow control setting, otherwise a virtual machine kernel mode is used for flow control setting. 2.The method of claim 1, wherein, The single volume QoS attribute comprises: an upper limit flow control attribute, a burst flow control management attribute, and a lower limit guarantee attribute. 3.The method of claim 1, wherein, The preset first legality verification rule at least comprises: Whether the preset burst flow control management attribute in the flow control attribute request exists simultaneously with the preset upper limit flow control attribute of the same type; Whether the preset burst flow control attribute value in the flow control attribute request is higher than the preset upper limit flow control attribute value of the same type; Whether the preset burst flow control attribute is set simultaneously with the preset burst flow control duration attribute; Whether the preset flow control attribute related to the single disk QoS is a preset high priority, and whether the priority is higher than the preset flow control attribute related to the global QoS.

4. The method of claim 1, wherein the method further comprises: The preset attribute data is converted into the preset dynamic value by using the preset calculation formula in the cinder volume preset calculation tool set, and specifically comprises: The preset calculation formula is used to: ), Converting preset attribute data into preset dynamic values ; wherein, represents a preset base flow control attribute_base in the single volume QoS attribute, represents a flow control attribute growth per GB s_per_gb in the single volume QoS attribute, represents an actual capacity of the cloud disk in the single volume QoS attribute, represents a lower limit s_per_gb_min in the dynamic flow control attribute in the single volume QoS attribute, represents an upper limit value s_max in the dynamic flow control attribute in the single volume QoS attribute.

5. The method for implementing cloud hard disk single disk QoS automatic control according to claim 1, characterized in that, The scope of the converted single volume QoS attribute is read, and specifically comprises: The flow control attribute scope of the single volume QoS attribute is obtained through a cinder volume driver manager in the management node; When the scope is front-end, the scope is front-end; When the scope is back-end, the scope is back-end.

6. The method for automatically controlling single-disk QoS of a cloud hard disk according to claim 1, wherein, When the scope is the backend, the corresponding block device is found according to the cloud disk id in the single volume QoS attribute, and the single volume QoS attribute is set, specifically including: When the scope is the backend, the corresponding block device is found on the interfaced backend storage according to the cloud disk id in the single volume QoS attribute, and the single volume QoS attribute is set.

7. The method for automatically controlling single-disk QoS of a cloud hard disk according to claim 1, wherein, The preset attribute at least includes a bandwidth attribute, an iops burst attribute, and a burst duration attribute.

8. The method for automatically controlling single-disk QoS of a cloud hard disk according to claim 1 or 7, wherein, When the rest request does not contain the preset attribute, the flow control setting is performed in a host user mode, specifically including: When the rest request does not contain the preset attribute, the computing node creates a cgroup directory named after the virtual machine domain object name, and obtains the device number MAJ:MIN of the corresponding virtual machine disk device through the lsblk command; a file with a name corresponding to the rest request name is created in the cgroup directory; the device number and the flow control attribute value in the rest request are written into the file; finally, the virtual machine qemu process is bound to the cgroup directory.

9. The method for automatically controlling single-disk QoS of a cloud hard disk according to claim 1, wherein, After the flow control setting is performed in the host user mode when the rest request does not contain the preset attribute, or the flow control setting is performed in the virtual machine kernel mode, the method further includes: The flow control attribute name corresponding to the rest request is converted into a corresponding iotune attribute name recognizable by libvirt, and is updated into the local xml definition file of the virtual machine.

10. A non-transitory computer storage medium, comprising, A computer readable storage medium having stored thereon computer instructions which, when executed, implement a method for automatically controlling cloud disk QoS according to any one of claims 1-9.