Service quality control method and device for distributed storage service and electronic equipment

By obtaining and persisting the number of request processing per second and bandwidth per second of the target volume from the distributed storage service when creating a virtual machine, the problem of inefficient creation of virtual machines in the existing technology is solved, and automated settings are realized and creation efficiency is improved.

CN120144267APending Publication Date: 2025-06-13BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311705569.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the prior art, when creating a virtual machine, the user needs to manually set the number of request processing per second and bandwidth per second, resulting in inefficient creation of a virtual machine.

Method used

When creating a target virtual machine, the number of request processing per second and bandwidth per second of the target volume is obtained from the server of the distributed storage service, and the parameters are persisted into the database through the computing service, rendered into the virtual machine's XML file, and the virtualization platform runs the XML file to create the target virtual machine.

Benefits of technology

By automatically obtaining and setting the number of request processing per second and bandwidth per second, the steps of manual input by users are avoided, and the efficiency of creating virtual machines is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144267A_ABST
    Figure CN120144267A_ABST
Patent Text Reader

Abstract

The invention relates to a service quality control method and device for a distributed storage service and electronic equipment. The method comprises the steps that when a target virtual machine is created, the number of request processing per second and the bandwidth per second of a target volume are obtained from a server of a distributed storage service, and the target volume is the volume of the distributed storage service used when the target virtual machine is created; the request processing number per second and the bandwidth per second of the target volume are persisted into a database by calling a virtual machine creation interface of the computing service, so that the computing service renders the request processing number per second and the bandwidth per second into an XML file of a target virtual machine; and running the XML file by the virtualization platform to create the target virtual machine. The technical problem of low virtual machine creation efficiency is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and in particular, to a method, apparatus, and electronic device for controlling the quality of service of a distributed storage service. Background Art

[0002] In the prior art, in order to control the number of requests processed per second and the bandwidth per second of the cloud disk used by a virtual machine, usually when creating a virtual machine, the user needs to set the above parameters to create the virtual machine. However, each time a virtual machine is created, the user needs to set the above parameters, resulting in low efficiency in creating virtual machines. Summary of the Invention

[0003] This application provides a method, apparatus, and electronic device for controlling the quality of service of a distributed storage service to solve the technical problem of low efficiency in creating virtual machines.

[0004] In a first aspect, this application provides a method for controlling the quality of service of a distributed storage service, including: when creating a target virtual machine, obtaining the number of requests processed per second and the bandwidth per second of a target volume from a server of the distributed storage service, where the target volume is a volume of the distributed storage service used when creating the target virtual machine; persistently storing the number of requests processed per second and the bandwidth per second of the target volume into a database by invoking a virtual machine creation interface of a computing service, so that the computing service renders the number of requests processed per second and the bandwidth per second into an XML file of the target virtual machine; and running the XML file by a virtualization platform to create the target virtual machine.

[0005] In a second aspect, this application provides an apparatus for controlling the quality of service of a distributed storage service, including: an obtaining module, configured to obtain the number of requests processed per second and the bandwidth per second of a target volume from a server of the distributed storage service when creating a target virtual machine, where the target volume is a volume of the distributed storage service used when creating the target virtual machine; a processing module, configured to persistently store the number of requests processed per second and the bandwidth per second of the target volume into a database by invoking a virtual machine creation interface of a computing service, so that the computing service renders the number of requests processed per second and the bandwidth per second into an XML file of the target virtual machine; and a control module, configured to run the XML file by a virtualization platform to create the target virtual machine.

[0006] As an optional example, the obtaining module includes: an obtaining unit, configured to obtain a creation instruction of the target virtual machine; read the volume type and volume size of the volume required by the target virtual machine from the creation instruction; send the volume type and the volume size to the server of the distributed storage service; and receive the number of requests processed per second and the bandwidth per second returned by the server.

[0007] As an alternative example, the above-mentioned server is further configured to, when receiving the above-mentioned volume type and the above-mentioned volume size, determine the requests processed per second per unit corresponding to the above-mentioned volume type and the bandwidth per second per unit, and determine the requests processed per second of the above-mentioned target volume as the product of the requests processed per second per unit and the above-mentioned volume size, and determine the bandwidth per second of the above-mentioned target volume as the product of the bandwidth per second per unit and the above-mentioned volume size.

[0008] As an alternative example, the above-mentioned apparatus further includes: a mounting module, configured to, after running the above-mentioned XML file by a virtualization platform to create the above-mentioned target virtual machine, when receiving a mounting instruction, determine a first volume to be mounted by the above-mentioned target virtual machine; determine the requests processed per second and the bandwidth per second of the above-mentioned first volume according to the volume type and the volume size of the above-mentioned first volume; render the requests processed per second and the bandwidth per second of the above-mentioned first volume into the XML file of the above-mentioned target virtual machine; and run the above-mentioned XML file by the virtualization platform to mount the above-mentioned first volume for the above-mentioned target virtual machine.

[0009] As an alternative example, the above-mentioned apparatus further includes: an expansion module, configured to, after running the above-mentioned XML file by a virtualization platform to create the above-mentioned target virtual machine, when receiving an expansion instruction, determine a second volume to be expanded by the above-mentioned target virtual machine; obtain the volume type of the above-mentioned second volume and determine the volume size of the above-mentioned second volume after expansion; determine the requests processed per second and the bandwidth per second of the above-mentioned second volume according to the volume type of the above-mentioned second volume and the volume size after expansion; render the requests processed per second and the bandwidth per second of the above-mentioned second volume into the XML file of the above-mentioned target virtual machine; and run the above-mentioned XML file by the virtualization platform to expand the volume size of the above-mentioned second volume.

[0010] As an alternative example, the above-mentioned apparatus further includes: a setting module, configured to, during the process of running the above-mentioned XML file by a virtualization platform to create the above-mentioned target virtual machine, when reading the requests processed per second and the bandwidth per second of a target volume during the process of running the above-mentioned XML by the above-mentioned virtualization platform, determine the requests processed per second as the maximum value of requests processed per second by the above-mentioned target volume, and determine the bandwidth per second as the maximum bandwidth allowed to be used per second by the above-mentioned target volume.

[0011] As an alternative example, the above-mentioned apparatus further includes: a monitoring module, configured to monitor, during the running of the above-mentioned target virtual machine, the numerical value m1 of the requests received per second of the above-mentioned target volume or the bandwidth value n1 of the bandwidth occupied per second; when the numerical value m1 is greater than the requests processed per second m2, place m1 - m2 requests in a waiting state and start processing them in the next second; or, when the bandwidth value n1 is greater than the bandwidth per second n2, place the task occupying the bandwidth of n1 - n2 in a waiting state and start processing it in the next second.

[0012] In a third aspect, the present application provides an electronic device, including: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the memory stores a computer program, and the processor is configured to implement the service quality control method of the distributed storage service in any one of the above when executing the computer program.

[0013] In a fourth aspect, the present application further provides a computer storage medium storing computer-executable instructions for executing the service quality control method of the distributed storage service in any one of the above of the present application.

[0014] Compared with the prior art, the above technical solution provided by the embodiments of the present application has the following advantages: In the solution provided by the embodiments of the present application, when creating a target virtual machine, for the target volume of the distributed storage service to be used, the number of requests processed per second and the bandwidth per second of the target volume are obtained from the server of the distributed storage service and persisted in the database, and the computing service renders the number of requests processed per second and the bandwidth per second into an XML file. Thus, when creating the target virtual machine, the number of requests processed per second and the bandwidth per second of the target volume used by the target virtual machine are restricted, and there is no need for the user to input the number of requests processed per second and the bandwidth per second, improving the efficiency of creating the virtual machine. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present invention and used together with the specification to explain the principles of the present invention.

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

[0017] One or more embodiments are exemplarily illustrated by the pictures in the corresponding accompanying drawings. These exemplary illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the drawings do not constitute a proportional limitation.

[0018] Figure 1 It is a flowchart of a service quality control method for a distributed storage service provided by an embodiment of the present application;

[0019] Figure 2Flow chart of another service quality control method for distributed storage service provided by an embodiment of the present application;

[0020] Figure 3 Flow chart of yet another service quality control method for distributed storage service provided by an embodiment of the present application;

[0021] Figure 4 Flow chart of yet another service quality control method for distributed storage service provided by an embodiment of the present application;

[0022] Figure 5 Flow chart of creating a virtual machine for a service quality control method of distributed storage service provided by an embodiment of the present application;

[0023] Figure 6 Schematic structural diagram of a service quality control device for distributed storage service provided by an embodiment of the present application;

[0024] Figure 7 Schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0025] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0026] The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, components and settings of specific examples are described below. Of course, they are only examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. Such repetition is for the purpose of simplification and clarity and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0027] To solve the technical problem of low efficiency in creating virtual machines in the prior art, the present application provides a service quality control method for distributed storage service, which can achieve the effect of improving the efficiency of creating virtual machines.

[0028] Figure 1 Flow chart of a service quality control method for distributed storage service provided by an embodiment of the present application. As Figure 1 shown, the above service quality control method for distributed storage service includes:

[0029] S102. When creating a target virtual machine, obtain the number of requests processed per second and the bandwidth per second of the target volume from the server of the distributed storage service, where the target volume is the volume of the distributed storage service used when creating the target virtual machine;

[0030] S104. Persist the number of requests processed per second and the bandwidth per second of the target volume into the database by calling the virtual machine creation interface of the computing service, so that the computing service renders the number of requests processed per second and the bandwidth per second into the XML file of the target virtual machine;

[0031] S106. Let the virtualization platform run the XML file to create the target virtual machine.

[0032] The above-mentioned distributed storage server can be the server of the Elastic Block Store (EBS). The server can provide cloud disk services for virtual machines. The server can include multiple volumes. The target volume is the volume allocated for the target virtual machine and is used by the target virtual machine. When creating the target virtual machine, the server allocates the number of requests processed per second and the bandwidth per second of the target volume according to the target virtual machine. The number of requests processed per second (Input / Output Operations PerSecond, IOPS) represents the number of requests received and processed per second, and the bandwidth per second (bit per second, BPS) represents the number of bits transmitted per second, that is, the data signal rate.

[0033] After the main control system obtains the number of requests processed per second and the bandwidth per second of the target volume from the server of the distributed storage service, it persists the number of requests processed per second and the bandwidth per second into the database by calling the virtual machine creation interface of the computing service. The above-mentioned computing service can be the Nova component, which is responsible for the computing part. The computing service is also responsible for rendering the number of requests processed per second and the bandwidth per second into the XML file of the target virtual machine. When creating the target virtual machine, the target virtual machine can be created by running the XML file. Since the number of requests processed per second and the bandwidth per second are rendered in the XML file, the number of requests processed per second and the bandwidth per second of the target volume of the distributed storage service used by the target virtual machine can be restricted.

[0034] In the solution provided by the embodiment of the present application, when creating a target virtual machine, for the target volume of the distributed storage service to be used, obtain the number of requests processed per second and the bandwidth per second of the target volume from the server of the distributed storage service, and persist them into the database, so that the computing service renders the number of requests processed per second and the bandwidth per second into the XML file. Thus, when creating the target virtual machine, the number of requests processed per second and the bandwidth per second of the target volume used by the target virtual machine are restricted, and there is no need for the user to input the number of requests processed per second and the bandwidth per second, improving the efficiency of creating virtual machines.

[0035] As an optional example, as Figure 2 shown, when creating a target virtual machine, obtaining the number of requests processed per second and the bandwidth per second of the target volume from the server of the distributed storage service includes:

[0036] S202, obtaining a creation instruction for the target virtual machine;

[0037] S204, reading the volume type and volume size of the volume required by the target virtual machine from the creation instruction;

[0038] S206, sending the volume type and volume size to the server of the distributed storage service;

[0039] S208, receiving the number of requests processed per second and the bandwidth per second returned by the server.

[0040] In this embodiment, the number of requests processed per second and the bandwidth per second of the target volume obtained by the main control system from the server are calculated by the server. The basis for the calculation is the volume type and volume size of the volume. The volume type refers to different types of volumes, such as whether the type is a removable disk or a solid-state disk, or different throughput means different types, etc. The sizes of different types of volumes are different, and the volume size represents the size of this type of volume. Sending the volume type and volume size of the volume to the server of the distributed storage service allows the server to calculate the number of requests processed per second and the bandwidth per second based on the volume type and volume size, and then send the calculated number of requests processed per second and the bandwidth per second to the main control system.

[0041] As an optional example, the server is also used to, when receiving the volume type and volume size, determine the number of requests processed per second per unit and the bandwidth per second per unit corresponding to the volume type, and determine the product of the number of requests processed per second per unit and the volume size as the number of requests processed per second of the target volume, and determine the product of the bandwidth per second per unit and the volume size as the bandwidth per second of the target volume.

[0042] In this embodiment, before the server calculates the number of requests processed per second and the bandwidth per second of the target volume, the server stores the number of requests processed per second per unit and the bandwidth per second per unit of each type of volume. When it is necessary to determine the number of requests processed per second and the bandwidth per second of the target volume, first, according to the volume type of the target volume, obtain the number of requests processed per second per unit and the bandwidth per second per unit of the target volume, and then, determine the product of the number of requests processed per second per unit and the volume size as the number of requests processed per second of the target volume, and determine the product of the bandwidth per second per unit and the volume size as the bandwidth per second of the target volume. For example, if the number of requests processed per second per unit corresponding to the volume type of the target volume is 10, the bandwidth per second per unit is 10 Gbps / second, and the volume size is 10 G, then the number of requests processed per second of the volume is 10 * 10 = 100, and the bandwidth per second is 10 * 10 = 100 Gbps / second.

[0043] As an alternative example, as Figure 3 shown, after running the XML file by the virtualization platform to create the target virtual machine, the above method further includes:

[0044] S302, when receiving a mounting instruction, determining a first volume to be mounted by the target virtual machine;

[0045] S304, determining the number of requests processed per second and the bandwidth per second of the first volume according to the volume type and volume size of the first volume;

[0046] S306, rendering the number of requests processed per second and the bandwidth per second of the first volume into the XML file of the target virtual machine;

[0047] S308, running the XML file by the virtualization platform to mount the first volume for the target virtual machine.

[0048] In this embodiment, after creating the target virtual machine, a volume can be mounted for the target virtual machine. Mounting a volume means adding a new volume, such as the first volume, to the target virtual machine in addition to the target volume. Both the first volume and the target volume are used by the target virtual machine and do not conflict with each other. For the mounted first volume, the number of requests processed per second and the bandwidth per second also need to be set. Then, the server of the distributed storage service can calculate the number of requests processed per second and the bandwidth per second of the first volume according to the volume type and volume size of the first volume, and then the main control center can obtain the number of requests processed per second and the bandwidth per second of the first volume from the server, render them into the XML file of the target virtual machine, and mount the first volume for the target virtual machine by running the XML file.

[0049] As an alternative example, as Figure 4 shown, after running the XML file by the virtualization platform to create the target virtual machine, the above method further includes:

[0050] S402, when receiving an expansion instruction, determining a second volume to be expanded by the target virtual machine;

[0051] S404, obtaining the volume type of the second volume and determining the volume size after expansion of the second volume;

[0052] S406, determining the number of requests processed per second and the bandwidth per second of the second volume according to the volume type of the second volume and the volume size after expansion;

[0053] S408, rendering the number of requests processed per second and the bandwidth per second of the second volume into the XML file of the target virtual machine;

[0054] S410, running the XML file by the virtualization platform to expand the volume size of the second volume.

[0055] In this embodiment, the target volume of the target virtual machine and the first mounted volume can be expanded. Volume expansion means expanding the volume from its original size to a new size, such as expanding from 10G to 20G. The second volume is the volume to be expanded. When expanding a volume, first determine the volume size to which the second volume is to be expanded according to the expansion instruction. The volume type is known and can also be obtained from the expansion instruction. Determine the number of requests processed per second and the bandwidth per second of the second volume according to the volume type and the expanded volume size, and write them into the XML file of the target virtual machine. Expand the volume size of the second volume by running the XML file.

[0056] As an alternative example, during the process of creating the target virtual machine by the virtualization platform running the XML file, the method further includes: during the process of the virtualization platform running the XML, when the number of requests processed per second and the bandwidth per second of the target volume are read, determine the number of requests processed per second as the maximum value of the requests processed per second by the target volume, and determine the bandwidth per second as the maximum bandwidth allowed to be used per second by the target volume.

[0057] In this embodiment, during the process of the virtualization platform running the XML file to create the target virtual machine, when the number of requests processed per second and the bandwidth per second of the target volume in the XML file are read, the above two values can be stored. Then, constrain the number of requests processed per second by the target volume through the number of requests processed per second, and constrain the amount of data transmitted per second by the target volume through the bandwidth per second.

[0058] As an alternative example, after creating the target virtual machine, the above method further includes: during the operation of the target virtual machine, monitor the value m1 of the number of requests received per second or the bandwidth value n1 of the bandwidth occupied per second of the target volume; in the case where the value m1 is greater than the number of requests processed per second m2, place m1 - m2 requests in a waiting state and start processing them in the next second; or, in the case where the bandwidth value n1 is greater than the bandwidth per second n2, place the task occupying the bandwidth of n1 - n2 in a waiting state and start processing it in the next second.

[0059] In this embodiment, after creating the target virtual machine, the target volume is constrained by the number of requests processed per second and the bandwidth per second of the target volume. Specifically, the number value of requests received by the target volume per second and the bandwidth value of the bandwidth occupied per second can be monitored. If the number value of requests received in the current second is greater than the number of requests processed per second, then, in the order of receipt of the requests, the subsequent requests exceeding the number of requests processed per second are delayed to the next second for processing. If the requests received in the next second also exceed the number of requests processed per second, then the processing of the requests within the number of requests processed per second received first in the next second is guaranteed first, and the requests exceeding in the current second and the requests exceeding in the next second are postponed to the second after the next second for processing. When the duration for which a request is delayed exceeds a pre-set constraint value, the request can return an error message to initiate the request again. In addition, if the bandwidth value occupied by the data to be transmitted within one second is greater than the bandwidth per second, the excess part is left for processing in the next second until the data is processed or the duration for which the data is delayed exceeds the constraint value. The above m1 and m2 represent the number of requests and are positive integers, and the above n1 and n2 represent the bandwidth occupied within one second, with the unit of bps.

[0060] Figure 5 is the flowchart for creating a virtual machine or mounting a volume or expanding a volume in this embodiment. When creating a virtual machine, in the first step, the master control system obtains the QoS of a volume of a specified type and size from the ebs according to the open interface OPEN.API of the ebs, then creates an ebs virtual machine, passes in the QoS, the nova node stores the QoS in the block_device_mapping of the database, and passes the QoS to the virtualization platform, and the virtualization platform creates a virtual machine. The code for obtaining the QoS of the volume can be:

[0061] {q os_spec

[0062] {

[0063] “write_bytes_sec”:5120000,

[0064] “total_bytes_sec”:0,

[0065] “total_iops_sec”:0,

[0066] “read_iops_sec”:5000,

[0067] “read_bytes_sec”:5120000,

[0068] “write_iops_sec”:5000,

[0069] }

[0070] }

[0071] Figure 6 This is a schematic structural diagram of a service quality control device for a distributed storage service provided by an embodiment of the present application. As Figure 6 shown, the service quality control device for the above-mentioned distributed storage service includes:

[0072] An acquisition module 602, configured to obtain the number of requests processed per second and the bandwidth per second of a target volume from a server of the distributed storage service when creating a target virtual machine, where the target volume is a volume of the distributed storage service used when creating the target virtual machine;

[0073] A processing module 604, configured to persist the number of requests processed per second and the bandwidth per second of the target volume into a database by calling a virtual machine creation interface of a computing service, so that the computing service renders the number of requests processed per second and the bandwidth per second into an XML file of the target virtual machine;

[0074] A control module 606, configured to run the XML file by a virtualization platform to create the target virtual machine.

[0075] The above-mentioned distributed storage server may be a server of a distributed block storage service (Elastic Block Store, EBS). The server may provide a cloud hard disk service for virtual machines. The server may include multiple volumes, and the target volume is a volume allocated for the target virtual machine and used by the target virtual machine. When creating the target virtual machine, the server allocates the number of requests processed per second and the bandwidth per second of the target volume according to the target virtual machine. The number of requests processed per second (Input / Output Operations PerSecond, IOPS) represents the number of requests received and processed per second, and the bandwidth per second (bit per second, BPS) represents the number of bits transmitted per second, that is, the data signal rate.

[0076] After the main control system obtains the number of requests processed per second and the bandwidth per second of the target volume from the server of the distributed storage service, it persists the number of requests processed per second and the bandwidth per second into the database by calling a virtual machine creation interface of the computing service. The above-mentioned computing service may be a Nova component, which is responsible for the computing part. The computing service is also responsible for rendering the number of requests processed per second and the bandwidth per second into an XML file of the target virtual machine. When creating the target virtual machine, the target virtual machine can be created by running the XML file. Since the number of requests processed per second and the bandwidth per second are rendered in the XML file, the number of requests processed per second and the bandwidth per second of the target volume of the distributed storage service used by the target virtual machine can be restricted.

[0077] In the solution provided by the embodiment of this application, when creating a target virtual machine, for the target volume of the distributed storage service to be used, the number of requests processed per second and the bandwidth per second of the target volume are obtained from the server of the distributed storage service and persisted in the database, and the computing service renders the number of requests processed per second and the bandwidth per second into an XML file. Thus, when creating the target virtual machine, the number of requests processed per second and the bandwidth per second of the target volume used by the target virtual machine are constrained, and there is no need for the user to input the number of requests processed per second and the bandwidth per second, improving the efficiency of creating the virtual machine.

[0078] For other examples of this embodiment, please refer to the above examples and will not be elaborated here.

[0079] As Figure 7 shown, the embodiment of this application provides an electronic device, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114. Among them, the processor 111, the communication interface 112, and the memory 113 complete mutual communication through the communication bus 114.

[0080] The memory 113 is used to store a computer program.

[0081] In an embodiment of this application, when the processor 111 executes the program stored on the memory 113, it implements the method for controlling the quality of service of the distributed storage service provided by any one of the foregoing method embodiments.

[0082] The embodiment of this application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the method for controlling the quality of service of the distributed storage service provided by any one of the foregoing method embodiments.

[0083] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0084] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution or the part that contributes to the related technology can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0085] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" as used herein may also include the plural forms. The terms "comprising", "including", "containing", and "having" are inclusive and thus specify the presence of the stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the particular order described or illustrated, unless the order of performance is explicitly stated. It should also be understood that additional or alternative steps may be used.

[0086] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious 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 present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather will be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for quality of service control of a distributed storage service, characterized in that, it includes: When creating a target virtual machine, obtain the number of requests processed per second and the bandwidth per second of the target volume from the server of the distributed storage service, where the target volume is the volume of the distributed storage service used when creating the target virtual machine; Persist the number of requests processed per second and the bandwidth per second of the target volume into a database by calling the virtual machine creation interface of the computing service, so that the computing service renders the number of requests processed per second and the bandwidth per second into the XML file of the target virtual machine; The virtualization platform runs the XML file to create the target virtual machine.

2. The method according to claim 1, characterized in that, When creating the target virtual machine, obtaining the number of requests processed per second and the bandwidth per second of the target volume from the server of the distributed storage service includes: Obtain the creation instruction of the target virtual machine; Read the volume type and volume size of the volume required by the target virtual machine from the creation instruction; Send the volume type and the volume size to the server of the distributed storage service; Receive the number of requests processed per second and the bandwidth per second returned by the server.

3. The method according to claim 2, characterized in that, The server is further configured to, when receiving the volume type and the volume size, determine the number of requests processed per unit second and the bandwidth per unit second corresponding to the volume type, and determine the product of the number of requests processed per unit second and the volume size as the number of requests processed per second of the target volume, and determine the product of the bandwidth per unit second and the volume size as the bandwidth per second of the target volume.

4. The method according to claim 1, characterized in that, After the virtualization platform runs the XML file to create the target virtual machine, the method further includes: When receiving a mount instruction, determine the first volume to be mounted by the target virtual machine; Determine the number of requests processed per second and the bandwidth per second of the first volume according to the volume type and volume size of the first volume; Render the number of requests processed per second and the bandwidth per second of the first volume into the XML file of the target virtual machine; The virtualization platform runs the XML file to mount the first volume for the target virtual machine.

5. The method according to claim 1, characterized in that, After the virtualization platform runs the XML file to create the target virtual machine, the method further includes: When receiving an expansion instruction, determine the second volume to be expanded by the target virtual machine; Obtain the volume type of the second volume and determine the volume size after the expansion of the second volume; Determine the number of requests processed per second and the bandwidth per second of the second volume according to the volume type and the expanded volume size of the second volume; Render the number of requests processed per second and the bandwidth per second of the second volume into the XML file of the target virtual machine; The virtualization platform runs the XML file to expand the volume size of the second volume.

6. The method according to claim 1, characterized in that, During the process of creating the target virtual machine by running the XML file on the virtualization platform, the method further includes: During the process of running the XML on the virtualization platform, when the number of requests processed per second and the bandwidth per second of the target volume are read, the number of requests processed per second is determined as the maximum value of requests processed per second for the target volume, and the bandwidth per second is determined as the maximum bandwidth allowed to be used per second for the target volume.

7. The method according to claim 6, wherein, after creating the target virtual machine, the method further includes: during the running process of the target virtual machine, monitoring the number value m1 of requests received per second or the bandwidth value n1 of the bandwidth occupied per second of the target volume; in the case where the number value m1 is greater than the number of requests processed per second m2, putting m1 - m2 requests in a waiting state and starting to process them in the next second; or, in the case where the bandwidth value n1 is greater than the bandwidth per second n2, putting the task occupying the bandwidth of n1 - n2 in a waiting state and starting to process it in the next second.

8. A service quality control device for a distributed storage service, wherein, it includes: an acquisition module, configured to obtain the number of requests processed per second and the bandwidth per second of a target volume from a server of the distributed storage service when creating a target virtual machine, where the target volume is a volume of the distributed storage service used when creating the target virtual machine; a processing module, configured to persist the number of requests processed per second and the bandwidth per second of the target volume into a database by calling a virtual machine creation interface of a computing service, so that the computing service renders the number of requests processed per second and the bandwidth per second into an XML file of the target virtual machine; a control module, configured to run the XML file on a virtualization platform to create the target virtual machine.

9. An electronic device, wherein, it includes: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, the storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the method described in any one of claims 1 to 7 of the present application.