Service quality control method, device and equipment of virtual machine and storage medium

By using the token bucket mechanism to control service quality in the virtual machine cluster of cloud platform, the resource management problem caused by multiple virtual machines sending a large number of operation requests at the same time is solved, and the efficiency, stability and user satisfaction of the cloud computing environment are guaranteed.

CN119806733AActive Publication Date: 2025-04-11BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411864197.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

In a large-scale cloud platform system, multiple virtual machines send a large number of operation requests at the same time, making it difficult for cloud platform resource management to ensure the service quality of different users and applications.

Method used

The token bucket mechanism is used to control the service quality in the target layer of the virtual machine cluster. By generating tokens in the target token bucket, it is generated rhythmically according to the service quality upper limit, ensuring that operation requests can be issued and processed when the token is sufficient.

Benefits of technology

It effectively controls the service quality of virtual machines, ensures efficiency, stability and user satisfaction in the cloud computing environment, and avoids the impact of network congestion on the performance of cloud platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806733A_ABST
    Figure CN119806733A_ABST
Patent Text Reader

Abstract

The invention provides a service quality control method, device and equipment of a virtual machine and a storage medium, belongs to the technical field of computers, and particularly relates to the technical fields of cloud computing, virtualization, big data and the like. According to the specific implementation scheme, under the condition that the quantity of available tokens in a target token bucket of a target layer of a virtual machine cluster cannot meet the quantity of target tokens required by an operation request, the operation request is stored in a target queue corresponding to the target layer; wherein the tokens of the target layer are periodically generated according to the service quality upper limit of the target layer; under the condition that the available token quantity in the target token bucket is updated to meet the target token quantity required by the operation request, deducting the target token quantity from the updated available token quantity; and under the condition that the target token quantity is deducted successfully, issuing the operation request from the target queue to the target layer for processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to technical fields such as cloud computing, virtualization, and big data. Background Art

[0002] Currently, cloud computing has become a widely adopted solution in the industry, providing powerful computing and storage capabilities for enterprises and individuals. Open source cloud computing platforms use virtualization technology to abstract computing, network and storage resources into resource pools, thereby providing users with elastic, scalable and stable cloud infrastructure solutions.

[0003] Among them, device-level QoS (Quality of Service) is a commonly used resource management strategy in cloud platform systems. Its core lies in the allocation and management of physical device resources (disks) to ensure the service quality of different users and applications. Summary of the invention

[0004] The present invention provides a method, apparatus, device and storage medium for controlling the quality of service of a virtual machine.

[0005] According to one aspect of the present disclosure, a method for controlling quality of service of a virtual machine is provided, comprising:

[0006] When the amount of available tokens in the target token bucket of the target layer of the virtual machine cluster cannot meet the target token amount required by the operation request, the operation request is stored in the target queue corresponding to the target layer; wherein the tokens of the target layer are generated periodically according to the service quality upper limit of the target layer;

[0007] When the available token amount in the target token bucket is updated to the target token amount required to satisfy the operation request, the target token amount is deducted from the updated available token amount;

[0008] When the target token amount is successfully deducted, the operation request is sent from the target queue to the target layer for processing.

[0009] According to another aspect of the present disclosure, a service quality control device for a virtual machine is provided, comprising:

[0010] The first processing module is used to store the operation request in the target queue corresponding to the target layer when the available token amount in the target token bucket of the target layer of the virtual machine cluster cannot meet the target token amount required by the operation request; wherein the token of the target layer is periodically generated according to the service quality upper limit of the target layer;

[0011] A second processing module is used to deduct the target token amount from the updated available token amount when the available token amount in the target token bucket is updated to the target token amount required to satisfy the operation request;

[0012] The sending module is used to send the operation request from the target queue to the target layer for processing when the target token amount is successfully deducted.

[0013] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.

[0017] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.

[0018] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.

[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0021] Figure 1 is a flow chart of a method for controlling quality of service of a virtual machine according to an embodiment of the present disclosure;

[0022] Figure 2 is an architectural diagram of a virtual machine according to an embodiment of the present disclosure;

[0023] Figure 3 is a schematic diagram of service quality control according to an embodiment of the present disclosure;

[0024] Figure 4 is a schematic diagram of a process of generating a token of a target layer according to an embodiment of the present disclosure;

[0025] Figure 5 It is a schematic diagram of the overall process of a method for controlling the quality of service of a virtual machine according to an embodiment of the present disclosure;

[0026] Figure 6is a structural diagram of a service quality control device for a virtual machine according to an embodiment of the present disclosure;

[0027] Figure 7 It is a block diagram of an electronic device used to implement the service quality control method of a virtual machine according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0029] The terms "first", "second", etc. in this disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or precedence. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, including a series of steps or units. The method, system, product or device is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] In the scenario of running multiple user virtual machines on a large-scale cloud platform system, multiple virtual machines may send a large number of operation requests at the same time, and these operation requests require the resources of the cloud platform to process. Therefore, it is necessary to control the service quality of the virtual machine to ensure the efficiency, stability and user satisfaction in the cloud computing environment.

[0031] In the embodiment of the present disclosure, a method for controlling the quality of service of a virtual machine is proposed. Figure 1 The flowchart of the method is shown, which includes the following contents:

[0032] S101, when the amount of available tokens in the target token bucket of the target layer of the virtual machine cluster cannot meet the target token amount required by the operation request, the operation request is stored in the target queue corresponding to the target layer; wherein the tokens of the target layer are periodically generated according to the service quality upper limit of the target layer.

[0033] The virtual machine cluster can be divided into different levels according to the requirements, and each level can be used as the target layer. For example, if you want to control the service quality of the entire virtual machine cluster, you can use the entire virtual machine cluster as the target layer. If you want to control the service quality of some virtual machines, you can use these virtual machines as the target layer.

[0034] During implementation, different levels will perform service quality control independently, and the target layer of control can be flexibly defined to achieve flexible management and control of service quality at different levels.

[0035] In the disclosed embodiment, the target layer uses a token bucket mechanism to control the service quality. The target layer can set a corresponding service quality upper limit. When the upper limit is exceeded, the available tokens in the target token bucket of the target layer will be in short supply, and the newly added operation request will be suspended and placed in the target queue to wait because there are not enough available tokens.

[0036] It is understandable that the purpose of periodic generation of target layer tokens is to rhythmically generate new tokens for subsequent operation requests based on the target layer's service quality upper limit. As a limited consumable resource, tokens can achieve the purpose of controlling the target layer's service quality.

[0037] S102: When the available token amount in the target token bucket is updated to the target token amount required to satisfy the operation request, the target token amount is deducted from the updated available token amount.

[0038] S103, when the target token amount is successfully deducted, the operation request is sent from the target queue to the target layer for processing.

[0039] For example, if the available token amount of the target layer is A, the target token amount required for the operation request is B, and A is less than B, it means that the available token amount of the target layer of the virtual machine cluster cannot meet the target token amount required for the operation request, and it is necessary to wait for the available token amount of the target layer to be updated. When the target token amount required for the operation request is met, the target token amount is deducted from the updated available token amount. If the target token amount is successfully deducted, the operation request is sent from the target queue to the target layer for processing.

[0040] In the disclosed embodiment, the generation rate of the service quality control token is controlled based on the target layer, so that the amount of available tokens of the target layer is controlled within the service quality upper limit, while the transmission efficiency of the operation request is improved to the greatest extent possible. In addition, the target queue can store operation requests that exceed the service quality upper limit of the target layer, so that the operation request is as complete as possible and the task will not be lost. When there are sufficient available tokens, the operation request is resent to the corresponding target layer for processing, which can not only process the operation request in a timely manner, but also avoid network congestion affecting the performance of the cloud platform. Based on the method proposed in the disclosed embodiment, the service quality control of the virtual machine can be achieved, and the resources of the virtual machine platform can be reasonably utilized. In addition, based on the different definitions of the target layer, flexible control of the service quality can be achieved, and the convenience of service quality control is improved.

[0041] Accordingly, in some embodiments, when the available token amount of the target layer meets the target token amount required by the operation request and when the target token amount is successfully deducted from the available token amount, the operation request is sent to the target layer for processing.

[0042] During implementation, the available token amount of the target layer is A, the target token amount required for the operation request is C, and if A is greater than C, it means that the available token amount of the target layer of the virtual machine cluster meets the target token amount required for the operation request. In this case, the target token amount can be directly deducted from the available token amount, and the operation request can be sent to the target layer for processing.

[0043] In the disclosed embodiment, combined with the token bucket mechanism, when there are enough available tokens, the operation request can be directly sent to the target layer for execution, so as to improve the overall service quality.

[0044] In the related art, using SPDK (Storage Performance Development Kit) is a mainstream virtualized IO (Input / Output) acceleration solution. The overall architecture of SPDK, such as Figure 2 As shown in the figure: Qemu-KVM (Qemu-Kernel Virtual Machine) creates Vhost-ctrlr (simulated disk device) on the virtual machine side, and injects virtioblk (semi-virtualized disk) type devices into the virtual machine based on the Hypervisor (software layer). The virtioblk driver implements the front end of the virtual IO queue. SPDK acts as a proxy layer between the virtual machine and the NVMeSSD (non-volatile memory express Solid State Disk) disk hardware, builds a connection between the back end of the virtual IO queue and the front end of the virtual IO queue on the upstream virtual machine side, and provides the Nvme user-level driver (User-level NVMe Driver) to manage the downstream physical disk. In the specific implementation, SPDK processes the requests on the IO queue and the responses of the Nvme disk in a polling manner, reducing the loss of asynchronous event notification and interrupt injection. Bdev (Block Device) is a general block storage abstraction layer in SPDK, which shields the implementation details of the underlying storage device and provides a unified interface to the outside.

[0045] In some embodiments, the operation request includes a write operation request and / or a read operation request for a Bdev of the virtual machine cluster.

[0046] The write operation request of Bdev is an operation of writing data to Bdev; the read operation request of Bdev is an operation of reading data from Bdev.

[0047] In the disclosed embodiment, in a virtual machine cluster based on the SPDK architecture, the IO operation of Bdev can be controlled based on the target layer to reasonably utilize the resources of Bdev.

[0048] In some embodiments, the target layer includes at least one of the following control layers:

[0049] 1) The whole machine layer includes multiple virtual machines in a virtual machine cluster and is used to control the overall service quality of the multiple virtual machines based on the target token bucket of the whole machine layer.

[0050] In the disclosed embodiment, by taking the whole machine layer as the target layer, service quality control can be added at the whole machine level to achieve the management and control of the overall service quality of the virtual machine cluster.

[0051] 2) Virtual machine layer: The virtual machine layer is used to control the service quality of each virtual machine among multiple virtual machines by using the target token bucket of the virtual machine.

[0052] The virtual machine can be Qemu-KVM, and Qemu is a common virtual machine simulator in the industry. After startup, Qemu is a user process running on a physical machine, used to simulate various disks, network cards and other external devices of the virtual machine; KVM is a kernel module used to implement virtualization technology, which realizes the CPU instructions and memory access simulation of the virtual machine; Qemu-KVM work together to provide customers with a complete virtual machine simulation.

[0053] The service quality control at the virtual machine layer can achieve separate control of the service quality of each virtual machine. For example, a virtual machine cluster includes m virtual machines. At the virtual machine layer, the service quality of these m virtual machines can be controlled separately, and each virtual machine has its own corresponding target token bucket. The token generation rate in the target token bucket of different virtual machines can be determined according to the service quality upper limit of each virtual machine. For example, the service quality upper limit of virtual machine m1 is a, and the service quality upper limit of virtual machine m2 is b. When a is greater than b, the amount of tokens generated per unit time in the target token bucket of virtual machine m1 is higher than that of virtual machine m2. In this way, different virtual machines are isolated at the virtual machine layer to achieve separate control of the service quality of different virtual machines.

[0054] In the embodiment of the present disclosure, by adding a service quality upper limit limit at the virtual machine level, the service quality of different virtual machines can be controlled separately. For example, differentiated resource allocation can be performed for different virtual machines to improve resource management efficiency and flexibility.

[0055] 3) The block device Bdev layer is used to control the service quality of each Bdev of the virtual machine cluster using the target token bucket corresponding to the Bdev.

[0056] Among them, block device Bdev is the basic abstract concept of SPDK, which is used to represent storage devices, which can be traditional hard disk drives, solid-state drives, NVMe SSDs, etc. SPDK represents a virtualized IO acceleration solution. It serves as a proxy layer between virtual machine simulated disk devices and physical machine disk hardware. It builds a virtual IO queue backend to connect with the virtual machine simulated device, provides user-mode NVMe driver management of disk devices, and processes requests on the IO queue and responses of NVMe disks by polling, which can reduce the loss on the virtual machine IO path.

[0057] One SPDK can manage multiple Bdevs. Different Bdevs can correspond to their own target token buckets to achieve service quality control for different Bdevs.

[0058] In the disclosed embodiment, the service quality control of different Bdevs is implemented at the block device Bdev layer, and the flexible service quality control of the block device layer is achieved.

[0059] In some embodiments, the service quality upper limit of each virtual machine in the virtual machine layer is determined based on the performance of each virtual machine; similarly, the service quality upper limit of each Bdev in the Bdev layer is determined based on the performance of each Bdev layer.

[0060] The service quality upper limit may be set as follows: the service quality upper limit of the whole machine layer>the service quality upper limit of the virtual machine layer>the service quality upper limit of the block device Bdev layer.

[0061] During implementation, the target layer includes the whole machine layer, virtual machine layer, and block device Bdev layer, and the whole machine layer, virtual machine layer, and block device Bdev layer can all enable the use of token buckets to perform service quality control. For example, Figure 3 The following is a specific example showing the upper limits of the service quality of the above three layers. Figure 3In the table, the IOPS (Input / Output Per Second) of level 1 represents the upper limit of the number of operations per second of the entire machine layer, and the BPS (bits per second) of level 1 is the upper limit of the bit rate corresponding to the bandwidth, which is the upper limit of the amount of data that can be transmitted by the entire machine layer per unit time; the IOPS of level 0 represents the upper limit of the number of operations per second of the virtual machine layer, and the BPS of level 0 is the upper limit of the bit rate corresponding to the bandwidth, which is the upper limit of the amount of data that can be transmitted by the virtual layer per unit time. Each virtual machine layer can set BPS and IOPS based on its own actual situation, which can be the same or different. The IOPS and BPS of Bdev respectively represent the upper limit of the number of operations per second and the upper limit of the amount of data transmitted per unit time of each Bdev.

[0062] In the disclosed embodiment, since the conditions of each layer are different, a service quality upper limit is set based on its actual conditions so that the service quality of each device is within a reasonable and controllable range, thereby improving the efficiency of service quality control.

[0063] In the SPDK-based architecture in the related art, only the service quality control at the Bdev layer can be implemented, but the management of storage resources and network resources cannot be effectively distinguished. In view of this, in the embodiment of the present disclosure, for the target layer, the service quality includes at least one of the following service items: number of operations per second, bandwidth; wherein each service item uses a separate token bucket for service quality control.

[0064] The number of operations per second refers to the number of input / output operations per second, which is an important indicator for measuring the performance test of the storage device of the target layer, and indicates the number of read and write operations that the storage device can complete per second.

[0065] Bandwidth refers to the amount of data that can be transmitted per unit time, reflecting the capacity of the data transmission channel, where the unit time can be within 1 second.

[0066] It can be understood that each service item uses its own token bucket to control the quality of service.

[0067] For example, for the whole machine layer, virtual machine layer and Bdev layer, the first token bucket can be used to implement the service quality control of the number of operations per second; the second token bucket can be used to implement the service quality control of the bandwidth. Among them, the service quality control of the first token bucket and the second token bucket is performed independently. In this way, independent control of bandwidth resources and storage resources can be achieved at the target layer. When the service quality control is performed on the number of operations per second of the target layer, the first token bucket is the target token bucket. When the service quality control is performed on the bandwidth of the target layer, the second token bucket is the target token bucket. When the service quality control is required for both the bandwidth and the number of operations per second, the first token bucket and the second token bucket are respectively used as target token buckets to decide whether to issue the operation request. When the available token amount of at least one of the first token bucket and the second token bucket cannot meet the target token amount required by the operation request, the operation request needs to be suspended and stored in the target queue and can only be issued when the token amount is sufficient.

[0068] Taking the whole machine layer as an example, the whole machine layer controls the service quality of the entire virtual machine cluster as a whole, so there is a first token bucket and a second token bucket. When the service quality control is performed on the number of operations per second of the whole machine layer, the first token bucket is the target token bucket. When the service quality control is performed on the bandwidth of the whole machine layer, the second token bucket is the target token bucket. When the service quality control is required for both the bandwidth and the number of operations per second, the first token bucket and the second token bucket are respectively used as target token buckets to decide whether to issue the operation request. When the amount of available tokens in at least one of the first token bucket and the second token bucket cannot meet the target token amount required for the operation request, the operation request needs to be suspended and stored in the target queue corresponding to the whole machine layer, and can only be issued when the token amount is sufficient.

[0069] Taking a single virtual machine in the virtual machine layer as an example, the virtual machine layer controls the quality of service of each virtual machine separately, and each virtual machine has a corresponding first token bucket and a second token bucket. When the quality of service is controlled for the number of operations per second of the virtual machine, the first token bucket of the virtual machine is the target token bucket. When the quality of service is controlled for the bandwidth of the virtual machine, the second token bucket of the virtual machine is the target token bucket. When the bandwidth and the number of operations per second of the virtual machine need to be controlled for quality of service, the first token bucket and the second token bucket of the virtual machine are respectively used as target token buckets to decide whether to issue an operation request. When the available token amount of at least one of the first token bucket and the second token bucket cannot meet the target token amount required for the operation request, the operation request needs to be suspended and stored in the target queue corresponding to the virtual machine, and can only be issued when the token amount is sufficient.

[0070] Taking a single Bdev of the Bdev layer as an example, the Bdev layer controls the quality of service of each Bdev separately. Each Bdev corresponds to a first token bucket and a second token bucket. When the quality of service is controlled for the number of operations per second of the Bdev, the first token bucket of the Bdev is the target token bucket. When the quality of service is controlled for the bandwidth of the Bdev, the second token bucket of the Bdev is the target token bucket. When the quality of service is controlled for both the bandwidth and the number of operations per second of the Bdev, the first token bucket and the second token bucket of the Bdev are respectively used as target token buckets to decide whether to issue an operation request. When the amount of available tokens in at least one of the first token bucket and the second token bucket of the Bdev cannot meet the target token amount required for the operation request, the operation request needs to be suspended and stored in the target queue of the Bdev layer, and can only be issued when the token amount is sufficient.

[0071] In the disclosed embodiment, the number of operations per second can limit the number of read and write operations that can be completed per second, and the bandwidth can limit the amount of data transmitted. The combination of the two can achieve independent control of bandwidth and storage resources, thereby limiting the service quality control efficiency of the target layer as a whole.

[0072] In some embodiments, when the service item includes operations per second, the target token bucket includes at least one first sub-token bucket, and at least one of the following first sub-control items in the operations per second is controlled separately using the corresponding first sub-token bucket:

[0073] The total number of write and read operations per second;

[0074] The write limit of write operations per second;

[0075] The read limit for read operations per second.

[0076] Among them, the upper limit of the total number of write operations and read operations per second, the write upper limit of write operations per second, and the read upper limit of read operations per second can be set based on the actual situation of the target layer itself, and the embodiment of the present disclosure does not limit this.

[0077] During implementation, for different layers, the first token bucket of the corresponding layer can be divided into the first sub-token bucket 1, the first sub-token bucket 2 and the first sub-token bucket 3. For example, for the whole machine layer, the virtual machine layer and the Bdev layer, the first sub-token bucket 1 implements the quality of service control of the number of write operations per second, the first sub-token bucket 2 implements the quality of service control of the number of read operations per second, and the first sub-token bucket 3 implements the quality of service control of the total number of read and write operations per second. Among them, the quality of service control of the number of write operations and the number of read operations based on the first sub-token bucket 1 and the first sub-token bucket 2 is independently executed, and the quality of service control of the total number of read and write operations is implemented based on the first sub-token bucket 3. In this way, independent control of each sub-control item at the target layer can be achieved.

[0078] When the operation request is a write operation, the first sub-token bucket 1 is the target token bucket. If the total number of read and write operations is controlled, the first sub-token bucket 3 is also the target token bucket. Similarly, when the operation request is a read operation, the first sub-token bucket 2 is the target token bucket. If the total number of read and write operations is controlled, the first sub-token bucket 3 is also the target token bucket. When the operation request includes write operations and read operations, the first sub-token bucket 1, the first sub-token bucket 2 and the first sub-token bucket 3 are respectively used as target token buckets. When the available token amount of at least one of the target token buckets cannot meet the target token amount required by the operation request, the operation request needs to be suspended and stored in the target queue corresponding to the target layer, and can only be issued when the available token amount is sufficient.

[0079] Taking the whole machine layer as an example, the whole machine layer controls the service quality of the whole virtual machine cluster as a whole, so there are first sub-token bucket 1, first sub-token bucket 2 and first sub-token bucket 3 in the first token bucket. When the service quality control is performed on the number of operations per second of the whole machine layer, if the operation request is a write operation, the first sub-token bucket 1 is the target token bucket. If the total number of read and write operations of the whole machine layer is controlled, the first sub-token bucket 3 is also the target token bucket. Similarly, if the operation request is a read operation, the first sub-token bucket 2 is the target token bucket; if the total number of read and write operations of the whole machine layer is controlled, the first sub-token bucket 3 is also the target token bucket. In the case where the operation request includes write operations and read operations, the first sub-token bucket 1, the first sub-token bucket 2 and the first sub-token bucket 3 are respectively used as target token buckets. When the available token amount of at least one of the target token buckets cannot meet the target token amount required by the operation request, the operation request needs to be suspended and stored in the target queue corresponding to the whole machine layer, and can only be issued when the available token amount is sufficient.

[0080] Taking a single virtual machine of the virtual machine layer as an example, the virtual machine layer controls the service quality of each virtual machine separately, so there are first sub-token bucket 1, first sub-token bucket 2 and first sub-token bucket 3 in the first token bucket. When the service quality control is performed on the number of operations per second of the virtual machine layer, if the operation request is a write operation, the first sub-token bucket 1 is the target token bucket. If the total number of read and write operations of the virtual machine layer is controlled, the first sub-token bucket 3 is also the target token bucket. Similarly, if the operation request is a read operation, the first sub-token bucket 2 is the target token bucket; if the total number of read and write operations of the virtual machine layer is controlled, the first sub-token bucket 3 is also the target token bucket. In the case where the operation request includes write operations and read operations, the first sub-token bucket 1, the first sub-token bucket 2 and the first sub-token bucket 3 are respectively used as target token buckets. When the available token amount of at least one of the target token buckets cannot meet the target token amount required by the operation request, the operation request needs to be suspended and stored in the target queue corresponding to the virtual machine layer, and can only be issued when the available token amount is sufficient.

[0081] Taking a single Bdev of the Bdev layer as an example, the Bdev layer controls the service quality of each single Bdev separately, so there are the first sub-token bucket 1, the first sub-token bucket 2 and the first sub-token bucket 3 in the first token bucket. When the service quality control is performed on the number of operations per second of the Bdev layer, if the operation request is a write operation, the first sub-token bucket 1 is the target token bucket. If the total number of read and write operations of the Bdev layer is controlled, the first sub-token bucket 3 is also the target token bucket. Similarly, if the operation request is a read operation, the first sub-token bucket 2 is the target token bucket; if the total number of read and write operations of the Bdev layer is controlled, the first sub-token bucket 3 is also the target token bucket. In the case where the operation request includes write operations and read operations, the first sub-token bucket 1, the first sub-token bucket 2 and the first sub-token bucket 3 are respectively used as target token buckets. When the available token amount of at least one of the target token buckets cannot meet the target token amount required by the operation request, the operation request needs to be suspended and stored in the target queue corresponding to the block device Bdev layer, and wait for the available token amount to be sufficient before it can be issued.

[0082] In the disclosed embodiment, the number of operations per second controls the upper limit of read operations and write operations, which can improve the efficiency of managing the storage performance of the target layer, thereby further improving resource management efficiency.

[0083] In some embodiments, when the service item includes bandwidth, the target token bucket includes at least one second sub-token bucket, and at least one of the following second sub-control items in the bandwidth is controlled separately using the corresponding second sub-token bucket:

[0084] The total bandwidth limit for write and read operations per second;

[0085] The bandwidth limit for write operations per second;

[0086] The upper limit of the bandwidth for read operations per second.

[0087] Among them, the total bandwidth limit of write operations and read operations per second, the bandwidth limit of write operations per second, and the bandwidth limit of read operations per second can be set based on the actual situation of the target layer itself, and the embodiments of the present disclosure do not limit this.

[0088] During implementation, when the second token bucket is used to implement bandwidth quality control, the second token bucket can be divided into a second sub-token bucket 1, a second sub-token bucket 2, and a second sub-token bucket 3. For example, for the entire machine layer, the virtual machine layer, and the Bdev layer, the second sub-token bucket 1 implements the quality of service control of the bandwidth for write operations per second, the second sub-token bucket 2 implements the quality of service control of the bandwidth for read operations per second, and the second sub-token bucket 3 implements the quality of service control of the total amount of bandwidth read and written per second. The bandwidth quality control based on the second sub-token bucket 1 and the second sub-token bucket 2 is independently executed. The quality of service control of the total amount of read and write bandwidth based on the second sub-token bucket 3 can achieve independent control of each sub-control item at the target layer.

[0089] When the operation request is a write operation, the second sub-token bucket 1 is the target token bucket; if the total bandwidth for reading and writing is controlled, the second sub-token bucket 3 is also the target token bucket. Similarly, when the operation request is a read operation, the second sub-token bucket 2 is the target token bucket; if the total bandwidth for reading and writing is controlled, the second sub-token bucket 3 is also the target token bucket. When the operation request includes write operations and read operations, the second sub-token bucket 1, the second sub-token bucket 2, and the second sub-token bucket 3 are respectively used as target token buckets. When the available token amount of at least one of the target token buckets cannot meet the target token amount required by the operation request, the operation request needs to be suspended and stored in the target queue corresponding to the target layer, and can only be issued when the available token amount is sufficient.

[0090] Taking the whole machine layer as an example, the whole machine layer controls the service quality of the whole virtual machine cluster as a whole, so the second token bucket contains the second sub-token bucket 1, the second sub-token bucket 2 and the second sub-token bucket 3. When the service quality of the bandwidth per second of the whole machine layer is controlled, if the operation request is a write operation, the second sub-token bucket 1 is the target token bucket. If the total bandwidth of the read and write operations of the whole machine layer is controlled, the second sub-token bucket 3 is also the target token bucket. Similarly, if the operation request is a read operation, the second sub-token bucket 2 is the target token bucket; if the total bandwidth of the read and write operations of the whole machine layer is controlled, the second sub-token bucket 3 is also the target token bucket. In the case where the operation request includes a write operation and a read operation, the second sub-token bucket 1, the second sub-token bucket 2 and the second sub-token bucket 3 are respectively used as the target token bucket. When the available token amount of at least one of the target token buckets cannot meet the target token amount required by the operation request, the operation request needs to be suspended and stored in the target queue corresponding to the whole machine layer, and can only be issued when the available token amount is sufficient.

[0091] Taking a single virtual machine of the virtual machine layer as an example, the virtual machine layer controls the service quality of each virtual machine separately, so there are second sub-token bucket 1, second sub-token bucket 2 and second sub-token bucket 3 in the second token bucket. When the service quality of the bandwidth per second of the virtual machine layer is controlled, if the operation request is a write operation, the second sub-token bucket 1 is the target token bucket. If the total bandwidth of the read and write operations of the virtual machine layer is controlled, the second sub-token bucket 3 is also the target token bucket. Similarly, if the operation request is a read operation, the second sub-token bucket 2 is the target token bucket; if the total bandwidth of the read and write operations of the virtual machine layer is controlled, the second sub-token bucket 3 is also the target token bucket. In the case where the operation request includes write operations and read operations, the second sub-token bucket 1, the second sub-token bucket 2 and the second sub-token bucket 3 are respectively used as target token buckets. When the available token amount of at least one of the target token buckets cannot meet the target token amount required by the operation request, the operation request needs to be suspended and stored in the target queue corresponding to the virtual machine layer, and can only be issued when the available token amount is sufficient.

[0092] Taking a single Bdev of the Bdev layer as an example, the Bdev layer controls the service quality of each single Bdev separately, so there are second sub-token bucket 1, second sub-token bucket 2 and second sub-token bucket 3 in the second token bucket. When the service quality of the bandwidth per second of the Bdev layer is controlled, if the operation request is a write operation, the second sub-token bucket 1 is the target token bucket. If the total bandwidth of the read and write operations of the Bdev layer is controlled, the second sub-token bucket 3 is also the target token bucket. Similarly, if the operation request is a read operation, the second sub-token bucket 2 is the target token bucket; if the total bandwidth of the read and write operations of the Bdev layer is controlled, the second sub-token bucket 3 is also the target token bucket. In the case where the operation request includes write operations and read operations, the second sub-token bucket 1, the second sub-token bucket 2 and the second sub-token bucket 3 are respectively used as target token buckets. When the available token amount of at least one of the target token buckets cannot meet the target token amount required by the operation request, the operation request needs to be suspended and stored in the target queue corresponding to the Bdev layer, and can only be issued when the available token amount is sufficient.

[0093] Continuing from the above, when the operation request is a write request, and the number of operations per second and the bandwidth of the target layer are controlled for quality of service, the first sub-token bucket 1 and the second sub-token bucket 1 are used as target token buckets. If the number of operations per second and the total bandwidth of the read and write operations of the target layer are controlled, the first sub-token bucket 3 and the second sub-token bucket 3 are also target token buckets. When the operation request is a read request, when the number of operations per second and the bandwidth of the target layer are controlled for quality of service, the first sub-token bucket 2 and the second sub-token bucket 2 are used as target token buckets. If the number of operations per second and the total bandwidth of the read and write operations of the target layer are controlled, the first sub-token bucket 3 and the second sub-token bucket 3 are also target token buckets.

[0094] In the disclosed embodiment, by controlling the upper limits of read operations and write operations based on bandwidth, the network performance of the target layer can be effectively managed and controlled, thereby further improving resource management efficiency.

[0095] In some embodiments, a token of a target layer is generated. The specific process is as follows: Figure 4 As shown:

[0096] S401, when a target control item in the service quality of the target layer reaches a speed limit upper limit, determining an update frequency of a token of the target control item based on the speed limit upper limit of the target control item.

[0097] S402, generating a token of a target control item of a target layer based on an update frequency of the token.

[0098] During implementation, when the target control item is that the total bandwidth upper limit of write operations and read operations per second is a, the number of bytes supported every 1s is a*1024*1024 bytes, and the number of bytes generated every 1ms is (a*1024*1024) / 1000. Assuming that a token supports n bytes, the update frequency of the token is n / [(a*1024*1024) / 1000]ms, that is, a token is generated every n / [(a*1024*1024) / 1000]ms.

[0099] During implementation, when the target control item is that the bandwidth upper limit of write operations per second is b, the number of bytes generated every 1s is b*1024*1024 bytes, and the number of bytes generated every 1ms is (b*1024*1024) / 1000. Assuming that a token supports n bytes, the update frequency of the token is n / [(b*1024*1024) / 1000]ms, that is, a token is generated every n / [(b*1024*1024) / 1000]ms.

[0100] In implementation, when the target control item is that the bandwidth limit of read operations per second is c, the number of bytes generated per 1s is c*1024*1024 bytes, and the number of bytes generated per 1ms is (c*1024*1024) / 1000. Assuming that a token supports n bytes, the token update frequency is n / [(c*1024*1024) / 1000]ms, that is, a token is generated once every n / [(c*1024*1024) / 1000]ms. It should be noted that b and c are both positive numbers less than a, and n is a positive number.

[0101] During implementation, when the target control item is that the total number of write operations and read operations per second is capped at d times, the number of operations that can be processed every 1s is d times, and the number of operations that can be processed in 1ms is d / 1000. Assuming that a token supports n operations, the update frequency of the token is n / (d / 1000)ms, that is, a token is generated every n / (d / 1000)ms.

[0102] During implementation, when the target control item is that the upper limit of the number of write operations per second is e times, the number of write operations that can be processed every 1s is e times, and the number of operations that can be processed in 1ms is e / 1000. Assuming that a token supports n operations, the update frequency of the token is n / (e / 1000)ms, that is, a token is generated every n / (e / 1000)ms.

[0103] During implementation, when the target control item is that the upper limit of the number of read operations per second is f, the number of read operations that can be processed every 1s is f, and the number of operations that can be processed in 1ms is f / 1000. Assuming that a token supports n operations, the token update frequency is n / (f / 1000)ms, that is, a token is generated every n / (f / 1000)ms. Among them, d is greater than e and f, and d, e, and f are all positive numbers.

[0104] In the disclosed embodiment, on the basis of reaching the speed limit, the target layer tokens are generated based on the token update frequency, which can effectively control the balance between token update and consumption to improve the service quality control accuracy.

[0105] In some embodiments, in response to an operation of enabling service quality control by enabling a token bucket for the target layer, the service quality of the target layer is controlled by using a token bucket; or, in response to a message that the service quality control by not enabling a token bucket for the target layer, the service quality of the target layer is controlled in a default manner.

[0106] Among them, the service quality of the target layer can be determined based on actual conditions and turned on or off.

[0107] The service quality of the target layer is controlled in a default manner, that is, a service quality control method other than the token bucket mechanism is adopted.

[0108] Among them, at least one of the first sub-control items and the second sub-control items in the service items in the target layer can be enabled or disabled. When the target layer enables the control of the service quality of write operations per second in the number of operations per second, the first sub-token bucket 1 is enabled as the target token bucket. When the target layer enables the control of the service quality of read operations per second in the number of operations per second, the first sub-token bucket 2 is enabled as the target token bucket. By analogy, each sub-token bucket can be opened or closed separately.

[0109] In the disclosed embodiment, whether the target layer opens the token bucket is controlled for service quality based on actual conditions, making this method more universal.

[0110] When the target layer includes the whole machine layer, virtual machine layer, and block device Bdev layer, and the whole machine layer, virtual machine layer, and Bdev layer all enable the token bucket mechanism for service quality control, the entire process is implemented as follows: Figure 5 As shown, including:

[0111] S501, receiving an operation request;

[0112] S502, determining whether the available token quantity of the entire machine layer meets the target token quantity required by the operation request, if not, executing S503; if satisfied, executing S504;

[0113] S503, storing in the target queue of the whole machine layer, waiting for the update of the available token quantity of the whole machine layer, and executing S504 when the available token quantity of the whole machine layer is updated to the target token quantity required to satisfy the operation request;

[0114] S504, when the target token amount is successfully deducted from the available token amount of the whole machine layer, the operation request is sent to the whole machine layer for processing;

[0115] S505, determining whether the amount of available tokens at the virtual machine layer meets the target amount of tokens required by the operation request, if not, executing S506; if satisfied, executing S507;

[0116] S506, storing in the target queue of the virtual machine layer, waiting for the update of the available token amount of the virtual machine layer, and executing S507 when the available token amount of the virtual machine layer is updated to the target token amount required to satisfy the operation request;

[0117] S507, when the target token amount is successfully deducted from the available token amount of the virtual machine layer, the operation request is sent to the virtual machine layer for processing;

[0118] S508, determining whether the available token amount of the block device Bdev layer meets the target token amount required by the operation request, if not, executing S509; if satisfied, executing S510;

[0119] S509, storing in the target queue of the block device Bdev layer, waiting for the update of the available token amount of the block device Bdev layer, and executing S510 when the available token amount of the block device Bdev layer is updated to the target token amount required to satisfy the operation request;

[0120] S510, when the target token amount is successfully deducted from the available token amount of the block device Bdev layer, the operation request is sent to the block device Bdev layer for processing.

[0121] In related technologies, QoS is generally only implemented on the Bdev layer. During implementation, storage performance is uniformly managed and controlled at the Bdev layer to ensure that different applications or services can access storage resources according to predetermined performance requirements. SPDK defines a variety of QoS indicators at the Bdev layer, such as IOPS, BPS, etc. However, in cloud computing platforms, since there are hundreds of virtual machines sharing the underlying hardware resources, setting QoS only at the Bdev layer may have the following problems:

[0122] 1. Uneven global resource allocation: The QoS of the Bdev layer mainly manages the performance of block devices, but cannot globally consider the resource allocation among multiple virtual machines. This may cause some virtual machines to occupy excessive resources, while other virtual machines cannot get sufficient performance guarantee.

[0123] 2. Confusion of network and storage resources: In cloud computing platforms, network and storage are two core resources. Setting QoS only at the Bdev layer cannot effectively distinguish and manage these two types of resources, which may cause network congestion to affect storage performance, or storage bottlenecks to limit network efficiency.

[0124] Therefore, in the embodiment of the present disclosure, three levels of QoS indicators, IOPS, BPS, etc., are defined in combination with the overall performance of the virtual machine and the individual performance of each virtual machine, so that resource allocation among multiple virtual machines can be considered globally. In addition, independent control of bandwidth and storage resources can be achieved, and these two types of resources can be distinguished and managed, thereby ensuring the overall control efficiency of the service quality of the cloud computing platform.

[0125] Based on the same technical concept, the embodiment of the present disclosure also proposes a virtual machine service quality control device 600, such as Figure 6 As shown, including:

[0126] The first processing module 601 is used for storing the operation request in a target queue corresponding to the target layer when the available token amount in the target token bucket of the target layer of the virtual machine cluster cannot meet the target token amount required by the operation request; wherein the token of the target layer is periodically generated according to the service quality upper limit of the target layer;

[0127] A second processing module 602 is configured to, when the available token amount in the target token bucket is updated to the target token amount required to satisfy the operation request, deduct the target token amount from the updated available token amount;

[0128] The sending module 603 is used to send the operation request from the target queue to the target layer for processing when the target token amount is successfully deducted.

[0129] In some embodiments, the target layer includes at least one of the following control layers:

[0130] An entire machine layer, the entire machine layer including multiple virtual machines in the virtual machine cluster, and used to control the overall quality of service of the multiple virtual machines based on the target token bucket of the entire machine layer;

[0131] A virtual machine layer, the virtual machine layer being used to control the quality of service of each virtual machine among the multiple virtual machines by using a target token bucket of the virtual machine;

[0132] The block device Bdev layer is used to control the service quality of each Bdev of the virtual machine cluster by using a target token bucket corresponding to the Bdev.

[0133] In some embodiments, the service quality upper limit of each virtual machine in the virtual machine layer is determined based on the performance of each virtual machine;

[0134] The service quality upper limit of each Bdev in the Bdev layer is determined based on the performance of each Bdev layer.

[0135] In some embodiments, a third processing module is further included, configured to:

[0136] In response to an operation of enabling the target layer to perform service quality control by enabling a token bucket, starting to control the service quality of the target layer by using a token bucket; or,

[0137] In response to a message that the target layer performs quality of service control in a manner in which a token bucket is not enabled, the quality of service of the target layer is controlled in a default manner.

[0138] In some embodiments, for the target layer, the quality of service includes at least one of the following service items: operations per second, bandwidth;

[0139] Each service item uses a separate token bucket to control the quality of service.

[0140] In some embodiments, when the service item includes the number of operations per second, the target token bucket includes at least one first sub-token bucket, and at least one of the following first sub-control items in the number of operations per second is controlled separately using the corresponding first sub-token bucket:

[0141] The total number of write and read operations per second;

[0142] The write limit of write operations per second;

[0143] The read limit for read operations per second.

[0144] In some embodiments, when the service item includes the bandwidth, the target token bucket includes at least one second sub-token bucket, and at least one of the following second sub-control items in the bandwidth is controlled separately using the corresponding second sub-token bucket:

[0145] The total bandwidth limit for write and read operations per second;

[0146] The bandwidth limit for write operations per second;

[0147] The upper limit of the bandwidth for read operations per second.

[0148] In some embodiments, the system further includes a generating module for:

[0149] In the case where the target control item in the quality of service of the target layer reaches the upper speed limit, determining the update frequency of the token of the target control item based on the upper speed limit of the target control item;

[0150] Based on the update frequency of the token, a token of the target control item of the target layer is generated.

[0151] In some embodiments, a fourth processing module is further included, configured to:

[0152] When the available token amount of the target layer meets the target token amount required by the operation request and the target token amount is successfully deducted from the available token amount, the operation request is sent to the target layer for processing.

[0153] In some embodiments, the operation request includes a write operation request and / or a read operation request for the Bdev of the virtual machine cluster.

[0154] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.

[0155] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0156] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0157] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0158] like Figure 7As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0159] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0160] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a quality of service control method for a virtual machine. For example, in some embodiments, the quality of service control method for a virtual machine may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the quality of service control method for the virtual machine described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute the quality of service control method for the virtual machine in any other appropriate manner (e.g., by means of firmware).

[0161] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0162] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0163] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0164] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0165] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0166] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0167] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0168] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for controlling the quality of service of a virtual machine, comprising: When the amount of available tokens in the target token bucket of the target layer of the virtual machine cluster cannot meet the target token amount required by the operation request, the operation request is stored in the target queue corresponding to the target layer; wherein the tokens of the target layer are periodically generated according to the service quality upper limit of the target layer; When the available token amount in the target token bucket is updated to the target token amount required to satisfy the operation request, deducting the target token amount from the updated available token amount; When the target token amount is successfully deducted, the operation request is sent from the target queue to the target layer for processing.

2. The method according to claim 1, wherein: The target layer includes at least one of the following control layers: An entire machine layer, the entire machine layer including multiple virtual machines in the virtual machine cluster, and used to control the overall quality of service of the multiple virtual machines based on the target token bucket of the entire machine layer; A virtual machine layer, the virtual machine layer being used to control the quality of service of each virtual machine among the multiple virtual machines by using a target token bucket of the virtual machine; The block device Bdev layer is used to control the service quality of each Bdev of the virtual machine cluster by using a target token bucket corresponding to the Bdev.

3. The method according to claim 2, wherein: The service quality upper limit of each virtual machine in the virtual machine layer is determined based on the performance of each virtual machine; The service quality upper limit of each Bdev in the Bdev layer is determined based on the performance of each Bdev layer.

4. The method according to claim 2, further comprising: In response to an operation of enabling the target layer to perform service quality control by enabling a token bucket, starting to control the service quality of the target layer by using a token bucket; or, In response to a message that the target layer performs quality of service control in a manner in which a token bucket is not enabled, the quality of service of the target layer is controlled in a default manner.

5. The method according to claim 1 or 2, wherein for the target layer, the quality of service includes at least one of the following service items: operations per second, bandwidth; in, Each service item uses a separate token bucket for service quality control.

6. The method according to claim 5, wherein: In the case where the service item includes the number of operations per second, the target token bucket includes at least one first sub-token bucket, and at least one of the following first sub-control items in the number of operations per second is controlled separately using the corresponding first sub-token bucket: The total number of write and read operations per second; The write limit of write operations per second; The read limit for read operations per second.

7. The method according to claim 5, wherein: In the case where the service item includes the bandwidth, the target token bucket includes at least one second sub-token bucket, and at least one of the following second sub-control items in the bandwidth is controlled separately using the corresponding second sub-token bucket: The total bandwidth limit for write and read operations per second; The bandwidth limit for write operations per second; The upper limit of the bandwidth for read operations per second.

8. The method according to any one of claims 1 to 7, wherein: Generating a token of the target layer, comprising: In the case where the target control item in the quality of service of the target layer reaches the upper speed limit, determining the update frequency of the token of the target control item based on the upper speed limit of the target control item; Based on the update frequency of the token, a token of the target control item of the target layer is generated.

9. The method according to any one of claims 1 to 8, further comprising: When the available token amount of the target layer meets the target token amount required by the operation request and the target token amount is successfully deducted from the available token amount, the operation request is sent to the target layer for processing.

10. The method according to claim 1, wherein: The operation request includes a write operation request and / or a read operation request for the Bdev of the virtual machine cluster.

11. A service quality control device for a virtual machine, comprising: The first processing module is used for storing the operation request in a target queue corresponding to the target layer when the amount of available tokens in the target token bucket of the target layer of the virtual machine cluster cannot meet the target amount of tokens required by the operation request; wherein the tokens of the target layer are periodically generated according to the service quality upper limit of the target layer; A second processing module is used to deduct the target token amount from the updated available token amount when the available token amount in the target token bucket is updated to the target token amount required to satisfy the operation request; The sending module is used to send the operation request from the target queue to the target layer for processing when the target token amount is successfully deducted.

12. The device according to claim 11, wherein The target layer includes at least one of the following control layers: An entire machine layer, the entire machine layer including multiple virtual machines in the virtual machine cluster, and used to control the overall quality of service of the multiple virtual machines based on the target token bucket of the entire machine layer; A virtual machine layer, the virtual machine layer being used to control the quality of service of each virtual machine among the multiple virtual machines by using a target token bucket of the virtual machine; The block device Bdev layer is used to control the service quality of each Bdev of the virtual machine cluster by using a target token bucket corresponding to the Bdev.

13. The device according to claim 12, wherein: The service quality upper limit of each virtual machine in the virtual machine layer is determined based on the performance of each virtual machine; The service quality upper limit of each Bdev in the Bdev layer is determined based on the performance of each Bdev layer.

14. The apparatus according to claim 12, further comprising a third processing module, configured to: In response to an operation of enabling the target layer to perform service quality control by enabling a token bucket, starting to control the service quality of the target layer by using a token bucket; or, In response to a message that the target layer performs quality of service control in a manner in which a token bucket is not enabled, the quality of service of the target layer is controlled in a default manner.

15. The apparatus according to claim 11 or 12, wherein for the target layer, the quality of service comprises at least one of the following service items: operations per second, bandwidth; in, Each service item uses a separate token bucket for service quality control.

16. The device according to claim 15, wherein: In the case where the service item includes the number of operations per second, the target token bucket includes at least one first sub-token bucket, and at least one of the following first sub-control items in the number of operations per second is controlled separately using the corresponding first sub-token bucket: The total number of write and read operations per second; The write limit of write operations per second; The read limit for read operations per second.

17. The device according to claim 15, wherein: In the case where the service item includes the bandwidth, the target token bucket includes at least one second sub-token bucket, and at least one of the following second sub-control items in the bandwidth is controlled separately using the corresponding second sub-token bucket: The total bandwidth limit for write and read operations per second; The bandwidth limit for write operations per second; The upper limit of the bandwidth for read operations per second.

18. The apparatus according to any one of claims 11 to 17, further comprising a generating module, configured to: In the case where the target control item in the quality of service of the target layer reaches the upper speed limit, determining the update frequency of the token of the target control item based on the upper speed limit of the target control item; Based on the update frequency of the token, a token of the target control item of the target layer is generated.

19. The apparatus according to any one of claims 11 to 18, further comprising a fourth processing module, configured to: When the available token amount of the target layer meets the target token amount required by the operation request and the target token amount is successfully deducted from the available token amount, the operation request is sent to the target layer for processing.

20. The device according to claim 11, wherein The operation request includes a write operation request and / or a read operation request for the Bdev of the virtual machine cluster.

21. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.

22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.

23. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Dynamic disk bandwidth allocation method in virtualization environment

    CN102270104A

  • Virtual machine starting method and device, computer readable storage medium and electronic equipment

    CN111090498A

  • A method and apparatus for controlling distributed block storage logical volume burst quality of service

    CN112463066A

  • Virtual machine boot storm processing method and device, equipment and medium

    CN114860334A

  • Dynamic flow control management method and system based on token bucket

    CN118449910A