CN114860334A - Method, device, equipment and medium for processing virtual machine start storm - Google Patents

Method, device, equipment and medium for processing virtual machine start storm Download PDF

Info

Publication number
CN114860334A
CN114860334A CN202210453908.2A CN202210453908A CN114860334A CN 114860334 A CN114860334 A CN 114860334A CN 202210453908 A CN202210453908 A CN 202210453908A CN 114860334 A CN114860334 A CN 114860334A
Authority
CN
China
Prior art keywords
token
target
logical volume
service request
tokens
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210453908.2A
Other languages
Chinese (zh)
Other versions
CN114860334B (en
Inventor
韩勇
刘立黎
康撼宇
郭丰雅
张新凤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dawning Information Industry Beijing Co Ltd
Original Assignee
Dawning Information Industry Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dawning Information Industry Beijing Co Ltd filed Critical Dawning Information Industry Beijing Co Ltd
Priority to CN202210453908.2A priority Critical patent/CN114860334B/en
Publication of CN114860334A publication Critical patent/CN114860334A/en
Application granted granted Critical
Publication of CN114860334B publication Critical patent/CN114860334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for processing a virtual machine start storm, wherein the method comprises the following steps: acquiring service request queues of the logical volumes corresponding to the target storage nodes, and acquiring the number of tokens required by the service request queues of the target logical volumes when detecting that a virtual machine starting storm occurs in the target logical volumes according to the service request queues; and if the required token quantity is determined to be larger than the current token quantity of the target token bucket, calculating to obtain a first token quantity difference value between the required token quantity and the current token quantity, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through the node token bucket. According to the technical scheme, token supplementation is carried out on the token bucket corresponding to the logical volume where the virtual machine start storm occurs through the node token bucket, the storage service quality requirement can be met when the virtual machine start storm is met, and meanwhile waste of storage resources after the virtual machine start storm is finished is avoided.

Description

Method, device, equipment and medium for processing virtual machine start storm
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a medium for processing a virtual machine start storm.
Background
The virtual machine start storm refers to a phenomenon that a large number of virtual machines are started at the same time in a short time, so that a large number of I/O (Input/Output) memories are caused. When the storage service capability of the backend storage is weak, the virtual machine start storm can easily cause the storage system to crash or a large number of virtual machines fail to start.
At present, in a block storage system, a method for processing a virtual machine startup storm by adding a fast storage device in cooperation with a Logical Unit Number Quality of Service (LUN QoS) policy is generally adopted, and the storage Service Quality of the storage system is optimized by allocating I/O data streams according to a flow demand, so as to cope with the virtual machine startup storm.
However, the LUN QoS policy may improve the storage service quality of the storage system to some extent, but it is still difficult to meet the storage service quality requirement when the virtual machine startup storm is most intensive. In addition, after the virtual machine is started, the storage I/O will be sharply reduced, that is, the demand for storage quality of service will be greatly reduced, so if the LUN QoS policy is configured according to the most intensive condition of the virtual machine start storm, the storage resource will be seriously wasted.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a medium for processing a virtual machine start storm, which can meet a requirement for storage service quality when a virtual machine starts a storm, and avoid waste of storage resources after the virtual machine is started.
In a first aspect, an embodiment of the present invention provides a method for processing a virtual machine start storm, including:
the method comprises the steps of obtaining a service request queue of each logical volume corresponding to a target storage node, and obtaining the number of tokens required by the service request queue of each target logical volume when detecting that a target logical volume virtual machine starting storm exists in each logical volume according to the service request queue of each logical volume;
judging whether the required token quantity corresponding to the service request queue of the target logical volume is larger than the current token quantity of a target token bucket corresponding to the target logical volume;
if yes, calculating to obtain a first token quantity difference value between the required token quantity corresponding to the service request queue of the target logic volume and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through a node token bucket corresponding to a target storage node.
Optionally, detecting that a target logical volume exists in each logical volume according to the service request queue of each logical volume, where the target logical volume generates a virtual machine startup storm, includes:
acquiring the queue length of the service request queue of each logical volume, and respectively judging whether the queue length of the service request queue of each logical volume is greater than a preset queue length threshold value;
if the queue length of the service request queue with at least one abnormal logical volume in each logical volume is detected to be larger than a preset queue length threshold, acquiring a service type corresponding to each service request in the service request queue of each abnormal logical volume;
when detecting that at least one service request corresponding to the service request exists in a service request queue of one abnormal logical volume and the service type is virtual machine starting service, judging whether the number of the service requests of which the service types corresponding to the service request queue of the detected abnormal logical volume are virtual machine starting service is larger than or equal to a preset service request number threshold value or not;
if the number of the service requests of which the service types are virtual machine starting services corresponding to the service request queues of the detected abnormal logical volumes is larger than or equal to a preset service request number threshold value, determining the detected abnormal logical volumes as target logical volumes, and determining that the target logical volumes generate virtual machine starting storms.
By adopting the technical scheme, whether the logical volume generates the virtual machine starting storm can be accurately judged, and the misjudgment probability of the virtual machine starting storm can be reduced.
Optionally, supplementing tokens corresponding to the first token quantity difference to the target token bucket through the node token bucket corresponding to the target storage node, including:
judging whether the current token quantity of a node token bucket corresponding to the target storage node is larger than or equal to the first token quantity difference value or not;
if the current token quantity of the node token bucket corresponding to the target storage node is determined to be larger than or equal to the first token quantity difference, obtaining tokens corresponding to the first token quantity difference from the node token bucket corresponding to the target storage node and adding the tokens to the target token bucket.
By adopting the technical scheme, when the logical volume is determined to generate the virtual machine starting storm, the node token bucket can be adopted to supplement enough tokens to the token bucket corresponding to the logical volume generating the virtual machine starting storm, so that the storage service quality of the logical volume can be temporarily improved, and the successful response to the virtual machine starting storm can be realized.
Optionally, after determining whether the current token number of the node token bucket corresponding to the target storage node is greater than or equal to the first token number difference, the method further includes:
if the current token quantity of the node token bucket corresponding to the target storage node is determined to be smaller than the first token quantity difference value, calculating to obtain a second token quantity difference value between the current token quantity of the node token bucket corresponding to the target storage node and the first token quantity difference value;
obtaining the residual token quantity of other token buckets corresponding to other logic volumes, and obtaining tokens corresponding to the difference value of the second token quantity from other token buckets and adding the tokens to the node token bucket corresponding to the target storage node according to the residual token quantity of other token buckets;
and obtaining tokens corresponding to the first token quantity difference from a node token bucket corresponding to the target storage node and adding the tokens to the target token bucket.
By adopting the technical scheme, when the logical volume generation virtual machine starting storm is determined to exist, the storage service quality of the logical volume is ensured to be improved, the need of adding an additional storage unit can be avoided, and the waste of storage resources can be avoided.
Optionally, obtaining tokens corresponding to the second token quantity difference from other token buckets according to the remaining token quantities of the other token buckets, and adding the tokens to the node token bucket corresponding to the target storage node, includes:
calculating to obtain token recycling weights corresponding to the other token buckets according to the residual token quantity of the other token buckets;
obtaining the quantity of the recovered tokens corresponding to each of the other token buckets according to the token recovery weight corresponding to each of the other token buckets and the second token quantity difference;
and respectively adding tokens with the quantity matched with the quantity of the recycling tokens corresponding to the other token buckets to the node token bucket corresponding to the target storage node through the other token buckets.
By adopting the technical scheme, the quantity of the recovered tokens from other token buckets can be balanced, so that the service quality of each logic volume after the tokens are recovered can be balanced, and the stability of the storage nodes can be improved.
Optionally, the technical solution of this embodiment further includes:
generating a preset number of tokens to be added to a node token bucket corresponding to the target storage node at preset time intervals;
calculating to obtain the number of tokens corresponding to each logical volume according to the number of the logical volumes corresponding to the target storage node and the preset number;
and adding tokens with the quantity matched with that of the tokens corresponding to each logical volume into the token bucket corresponding to each logical volume through the node token bucket corresponding to the target storage node.
By adopting the technical scheme, the real-time supplement of the tokens in the token bucket corresponding to each logical volume can be realized, and the storage service quality of the storage nodes can be ensured to be kept constant.
Optionally, before generating a preset number of tokens to be added to the node token bucket corresponding to the target storage node at every preset time interval, the method further includes:
and acquiring the service request processing performance corresponding to the target storage node, and setting the preset number according to the service request processing performance corresponding to the target storage node.
By adopting the technical scheme, the accuracy of setting the preset number can be improved, the service processing pressure is prevented from exceeding the bearable range of the storage nodes, and the stability of the storage nodes can be further improved.
In a second aspect, an embodiment of the present invention further provides a device for processing a virtual machine start storm, including:
the system comprises a required token quantity obtaining module, a required token quantity obtaining module and a required token quantity obtaining module, wherein the required token quantity obtaining module is used for obtaining a service request queue of each logical volume corresponding to a target storage node, and obtaining the required token quantity corresponding to the service request queue of the target logical volume when detecting that a target logical volume virtual machine starting storm exists in each logical volume according to the service request queue of each logical volume;
the token quantity judging module is used for judging whether the required token quantity corresponding to the service request queue of the target logical volume is larger than the current token quantity of the target token bucket corresponding to the target logical volume;
and if so, calculating to obtain a first token quantity difference value between the required token quantity corresponding to the service request queue of the target logical volume and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through the node token bucket corresponding to the target storage node.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for handling the virtual machine startup storm according to any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for handling a virtual machine startup storm according to any embodiment of the present invention.
According to the technical scheme provided by the embodiment of the invention, the number of tokens required corresponding to the service request queue of the target logical volume is obtained by obtaining the service request queue of each logical volume corresponding to the target storage node and when the virtual machine starting storm generated by the target logical volume is detected according to the service request queue of each logical volume; if the required token quantity corresponding to the service request queue of the target logic volume is larger than the current token quantity of the target token bucket corresponding to the target logic volume, calculating to obtain a first token quantity difference value between the required token quantity and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through the node token bucket corresponding to the target storage node; token supplement is carried out on the token bucket corresponding to the logical volume where the virtual machine start storm occurs through the node token bucket, so that the storage service quality requirement can be met when the virtual machine start storm is met, and meanwhile, the waste of storage resources after the virtual machine start storm is finished is avoided.
Drawings
Fig. 1A is a flowchart of a method for processing a virtual machine startup storm according to an embodiment of the present invention;
fig. 1B is a schematic diagram of a starting process of a virtual machine according to an embodiment of the present invention;
fig. 2A is a flowchart of a method for processing a virtual machine startup storm according to a second embodiment of the present invention;
fig. 2B is a schematic diagram illustrating a flow of detecting a virtual machine start storm according to a second embodiment of the present invention;
fig. 2C is a flowchart illustrating a token over-provisioning method for a token bucket according to a second embodiment of the present invention;
fig. 3A is a flowchart of a method for processing a virtual machine startup storm according to a third embodiment of the present invention;
fig. 3B is a schematic diagram of a token replenishment process of a target token bucket according to a third embodiment of the present invention;
fig. 3C is a flowchart illustrating a method for processing a virtual machine startup storm according to a third embodiment of the present invention;
fig. 3D is a schematic diagram of a token over-provisioning flow of a target logical volume according to a third embodiment of the present invention;
fig. 4 is a block diagram illustrating a structure of a processing apparatus for a virtual machine start storm according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1A is a flowchart of a method for processing a virtual machine startup storm according to an embodiment of the present invention, which is applicable to a situation where a large number of virtual machines are synchronously started in a short time for a logical volume; the method may be executed by a processing apparatus for a virtual machine startup storm in an embodiment of the present invention, where the apparatus may be implemented by software and/or hardware and integrated on an electronic device, and may typically be integrated on a computer device, and the method specifically includes the following steps:
s110, obtaining service request queues of all the logical volumes corresponding to the target storage nodes, and obtaining the number of tokens required by the service request queues of the target logical volumes when detecting that virtual machine starting storms occur in the target logical volumes according to the service request queues of all the logical volumes.
The target storage node may be a single storage device, such as a hard disk, a memory, or a distributed storage system composed of a plurality of storage devices. In this embodiment, the storage resources of the target storage node may be divided as required to form a plurality of virtual disks, i.e., logical volumes. For each logical volume, a corresponding service request queue may be preset to buffer service requests that cannot be processed in real time.
In this embodiment, multiple virtual machines may be established on each logical volume, each virtual machine may run a different operating system, and the application programs may run in mutually independent spaces. The starting process of the virtual machine may be as shown in fig. 1B. During the starting process of the virtual machine, a series of storage I/O requests are generated, and when a large number of virtual machines exist in a certain logical volume in a short time for synchronous starting, a large number of burst storage I/O requests are generated in a short time. Due to the limited storage service quality of the logical volume (the limited number of service requests that can be processed in a unit time), a large backlog of service requests exists in the service request queue corresponding to the logical volume.
Therefore, in this embodiment, the service request queue of each logical volume may be obtained, and whether a logical volume virtual machine start storm exists may be determined by determining whether the queue length of the service request queue of each logical volume exceeds a set queue length. When it is determined that a virtual machine start storm occurs in a certain logical volume, the logical volume may be determined as a target logical volume, and the number of service requests in a service request queue of the target logical volume is counted to obtain the number of tokens required corresponding to the service request queue.
The service requests correspond to the tokens one by one, so that the number of the service requests in the service request queue is equal to the number of the required tokens. In this embodiment, each to-be-processed service request needs to obtain its corresponding token in the corresponding token bucket, and only a service request that successfully obtains the corresponding token is processed. By adjusting the token replenishment rate of the token bucket corresponding to the logical volume, the control of the service request processing rate can be realized, and thus the effective control of the storage service quality of the logical volume can be realized.
S120, judging whether the required token number corresponding to the service request queue of the target logic volume is larger than the current token number of the target token bucket corresponding to the target logic volume.
In this embodiment, a corresponding token bucket is preset for each logical volume, and the token bucket may issue a corresponding token to each service request of the corresponding logical volume; and the target token bucket is a token bucket corresponding to a preset target logical volume. The maximum quantity of tokens stored in the token bucket is fixed, and the tokens in each token bucket can be supplemented according to a preset token supplementing speed through the node token bucket corresponding to the storage node.
Specifically, after the required number of tokens corresponding to the service request queue of the target logical volume is obtained, the current number of tokens of the target token bucket corresponding to the target logical volume is counted, and whether the required number of tokens is greater than the current number of tokens is further determined, so as to determine whether the existing tokens in the target token bucket can successfully cope with the current virtual machine start storm.
S130, if yes, calculating to obtain a first token quantity difference value between the required token quantity corresponding to the service request queue of the target logic volume and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through the node token bucket corresponding to the target storage node.
It should be noted that, when the number of required tokens is greater than the current token number, synchronous processing of all the service requests in the service request queue cannot be realized only by the existing tokens in the target token bucket, so that processing of a large number of service requests is prone to fail, and virtual machine startup fails.
In view of the above problem, in this embodiment, after determining that the number of required tokens is greater than the current token number, a token number difference between the number of required tokens and the current token number, that is, a first token number difference, is obtained through calculation. Then, the target token bucket may generate a token over-supply request based on the first token quantity difference value, and send the token over-supply request to a node token bucket corresponding to the target storage node to request the node token bucket to replenish tokens in the target token bucket. After receiving a token over-supply request sent by a target token bucket, a node token bucket may acquire tokens corresponding to the first token quantity difference from tokens reserved by the node token bucket and replenish the tokens into the target token bucket, or may recycle tokens corresponding to the first token quantity difference from other token buckets corresponding to other logical volumes where a virtual machine start storm never occurs and replenish the tokens into the target token bucket.
After the target token bucket receives the tokens supplemented by the node token bucket, the token bucket can meet the token requirements of the target logical volume, and can successfully process all the service requests in the service request queue, so that the successful response to the virtual machine starting storm of the target logical volume can be realized. In addition, after the virtual machine starts the storm, each token bucket can return to the normal mode, and the node token bucket does not need to supplement extra tokens to the token bucket corresponding to each logical volume.
The node token bucket is a preset token bucket corresponding to a target storage node; in this embodiment, the node token bucket may supplement tokens by itself according to a preset token generation rate, and may distribute its tokens to the token buckets corresponding to the logical volumes according to a preset allocation rule.
In this embodiment, when a target logic volume generating virtual machine start storm exists and the current token number of the corresponding target token bucket is less than the required token number, the node token bucket supplements the target token bucket with the missing tokens, so as to successfully cope with the virtual machine start storm. In addition, in the process, the number of the whole tokens of the storage node does not need to be supplemented, that is, an additional storage unit (for example, a Solid State Disk (SSD)) does not need to be added to improve the service processing performance of the storage node, so that the waste of storage resources after the virtual machine start storm is over can be avoided.
According to the technical scheme provided by the embodiment of the invention, the number of tokens required corresponding to the service request queue of the target logical volume is obtained by obtaining the service request queue of each logical volume corresponding to the target storage node and when the virtual machine starting storm generated by the target logical volume is detected according to the service request queue of each logical volume; if the required token quantity corresponding to the service request queue of the target logic volume is larger than the current token quantity of the target token bucket corresponding to the target logic volume, calculating to obtain a first token quantity difference value between the required token quantity and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through the node token bucket corresponding to the target storage node; token supplement is carried out on the token bucket corresponding to the logical volume where the virtual machine start storm occurs through the node token bucket, so that the storage service quality requirement can be met when the virtual machine start storm is met, and meanwhile, the waste of storage resources after the virtual machine start storm is finished is avoided.
In an optional implementation manner of this embodiment, the technical solution of this embodiment may further include: generating a preset number of tokens to be added to a node token bucket corresponding to the target storage node at preset time intervals; calculating to obtain the number of tokens corresponding to each logical volume according to the number of the logical volumes corresponding to the target storage node and the preset number; and adding tokens with the quantity matched with that of the tokens corresponding to each logical volume into the token bucket corresponding to each logical volume through the node token bucket corresponding to the target storage node.
The preset time may be a preset interval time for supplementing tokens into the node token bucket. The preset number may be a preset number of tokens to be replenished into the node token bucket each time. It should be noted that the hardware resources of the storage node are fixed, that is, the number of service requests that can be accepted by the storage node per unit time is fixed, that is, the storage service quality that can be provided by the storage node is fixed. Thus, the number of tokens added to the node token bucket per unit time is constant.
In this embodiment, the tokens in the token bucket corresponding to each logical volume may be obtained by allocating the corresponding node token bucket, so that the sum of the token numbers of the token buckets corresponding to each logical volume is fixed. Specifically, when the node token bucket allocates tokens, the tokens can be evenly allocated according to the number of the logical volumes, and no token is left in the node token bucket; for example, if the predetermined number is 30 and the token bucket corresponding to each logical volume includes LUN1, LUN2, and LUN3, the node token bucket may allocate 10 tokens to each token bucket on average.
Optionally, the node token bucket may also reserve a certain number of tokens first, and then perform average distribution on the remaining tokens; for example, the preset number is 32, the token bucket corresponding to each logical volume includes LUN1, LUN2, and LUN3, and a node token bucket may reserve 2 tokens and allocate 10 tokens for each token bucket. In addition, the node token bucket can reserve a certain number of tokens firstly, and then distribute the rest tokens according to a preset proportion; for the previous example, a node token bucket may reserve 2 tokens and allocate the remaining tokens in a ratio of 1:1:3, so LUN1 is allocated 6 tokens, LUN2 is allocated 6 tokens, and LUN3 is allocated 18 tokens.
It should be noted that, in order to avoid a large impact on the storage service quality of the storage node, the number of reserved tokens of the storage node should be much smaller than the number of tokens allocated to the token bucket corresponding to each logical volume.
Optionally, before generating a preset number of tokens to be added to the node token bucket corresponding to the target storage node at every preset time, the method may further include: and acquiring the service request processing performance corresponding to the target storage node, and setting the preset number according to the service request processing performance corresponding to the target storage node.
The service request processing performance corresponding to the target storage node may be the number of service requests that the target storage node can bear in unit time, so the service request processing performance of the target storage node may determine the number of tokens to be supplemented to the node token bucket every preset time interval. Therefore, in this embodiment, the service processing performance corresponding to the target storage node may be obtained in advance, and the preset number may be determined according to the service processing performance.
The advantage of above-mentioned setting lies in, can promote the accuracy of setting up of predetermineeing quantity, avoids the business processing pressure to surpass the bearable scope of storage node, can promote storage node's stability.
Example two
Fig. 2A is a flowchart of a method for processing a virtual machine startup storm according to a second embodiment of the present invention, which is embodied on the basis of the foregoing embodiment, in this embodiment, whether a target logical volume generates a virtual machine startup storm is determined in each logical volume according to a service request queue of each logical volume, where the method specifically includes:
s210, acquiring a service request queue of each logical volume corresponding to the target storage node.
S220, acquiring the queue length of the service request queue of each logical volume, and respectively judging whether the queue length of the service request queue of each logical volume is larger than a preset queue length threshold value.
The preset queue length threshold may be a preset queue length value used for determining whether the queue length of the service request queue is abnormal; for the service request queue greater than the preset queue length threshold, it can be considered that there is an abnormality; and regarding the service request queue less than or equal to the preset queue length threshold value, the service request queue is considered to be normal.
And S230, if the queue length of the service request queue with at least one abnormal logical volume in each logical volume is detected to be larger than a preset queue length threshold, acquiring the service type corresponding to each service request in the service request queue of each abnormal logical volume.
In this embodiment, when determining whether each logical volume has a virtual machine start storm, a preset queue length threshold may be first adopted to perform a first determination on each logical volume, so as to obtain a logical volume with a queue length greater than the preset queue length threshold by screening as an abnormal logical volume. It should be noted that, in some specific scenarios, for example, there may be a large number of users operating a certain logical volume at the same time, and there may also be a large number of burst service requests, so that it is determined whether there is a virtual machine start storm in the logical volume only by the queue length, and there may be a case of misdetermination.
Aiming at the problems, after the abnormal logical volume of which the queue length is larger than the preset queue length threshold is obtained through preliminary screening, the service type corresponding to each service request in the service request queue of the abnormal logical volume is further judged. Specifically, firstly, the size and composition of the service request corresponding to the virtual machine startup service can be obtained through pre-analysis, so as to obtain a service request model corresponding to the virtual machine startup service. Then, each service request in the service request queue of the abnormal logical volume may be respectively matched and compared with the service request model to determine whether each service request belongs to a virtual machine startup service.
The advantage of the above arrangement is that the logical volumes can be preliminarily screened, the service types corresponding to all service requests in the service request queues of all the logical volumes can be prevented from being identified, the detection workload of the virtual machine start storm can be greatly reduced, and the detection efficiency of the virtual machine start storm can be improved.
S240, when it is detected that at least one service request corresponding to the service request exists in the service request queue of one abnormal logical volume and the service type is the virtual machine starting service, judging whether the number of the service requests of which the service types corresponding to the service request queue of the detected abnormal logical volume are the virtual machine starting service is larger than or equal to a preset service request number threshold value or not.
The preset service request quantity threshold may be a preset service request quantity value for determining whether the logical volume reaches the start storm degree. The start storm means that a large number of virtual machines are synchronously started in a short time, so that the number of the synchronous starts of the virtual machines is required to be larger than a certain value.
In this embodiment, when it is detected that a service request queue of an abnormal logical volume includes service requests of a plurality of virtual machine startup services, it may be preliminarily determined that the abnormal logical volume has a plurality of virtual machines to start up synchronously at this time. And then, judging whether the number of the service requests of the virtual machine starting service in the service request queue of the abnormal logical volume is greater than or equal to a preset service request number threshold value or not so as to judge whether the virtual machine starting of the abnormal logical volume reaches the degree of a starting storm or not.
And S250, if the number of the service requests of which the service types are virtual machine starting services in the service request queue of the detected abnormal logical volume is determined to be larger than or equal to a preset service request number threshold, determining the detected abnormal logical volume as a target logical volume, and determining that the target logical volume generates a virtual machine starting storm.
Specifically, if it is determined that the number of service requests for starting services of the virtual machines in the service request queue of the detected abnormal logical volume is greater than or equal to the preset service request number threshold, it may be determined that the virtual machines started synchronously in a short time reach the start storm degree. At this time, the detected abnormal logical volume may be determined as a target logical volume, and it may be determined that a virtual machine start storm occurs in the target logical volume.
In a specific example, the flow of detecting a virtual machine startup storm may be as shown in fig. 2B. Specifically, first, the service request queues of the logical volumes are sampled by the analysis thread to obtain the queue length of each service request queue. And then, judging whether the queue length of each service request queue exceeds a preset threshold value. And then, performing I/O mode analysis on each service request in the service request queue with the queue length exceeding a preset threshold value to judge whether the service request queue is a virtual machine starting I/O request. Further, for a service request queue including virtual machine startup I/O requests, counting the number of stacked virtual machine startup I/O requests, and determining whether the number of stacked virtual machine startup I/O requests conforms to a virtual machine startup storm model (whether the number of stacked virtual machine startup I/O requests is greater than or equal to a preset number value), if so, determining that a logical volume corresponding to the service request queue generates a virtual machine startup storm, and marking that the logical volume needs to be over-provisioned, that is, a token needs to be supplemented.
S260, acquiring the number of required tokens corresponding to the service request queue of the target logical volume.
S270, judging whether the required token number corresponding to the service request queue of the target logic volume is larger than the current token number of the target token bucket corresponding to the target logic volume.
And S280, if so, calculating to obtain a first token quantity difference value between the required token quantity corresponding to the service request queue of the target logical volume and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through the node token bucket corresponding to the target storage node.
In one specific example, the flow of the token over-provisioning method for the token bucket may be as shown in FIG. 2C. Specifically, first, the total service request queue of each logical volume is sampled to obtain the number of required tokens corresponding to the service request queue of the current logical volume, and it is determined whether the number of required tokens is less than or equal to the current token number of the token bucket corresponding to the logical volume, that is, whether the tokens in the token bucket are sufficient. If so, the consumption token sequentially processes all service requests in the service request queue; if not, further judging whether each service request in the service request queue is Burst I/O (virtual machine starting storm I/O). And if the determination is that the Burst I/O is detected, requesting an over-supply from the node token bucket to supplement the lack of tokens. And if the business request queue is determined not to be Burst I/O, the business request queue of the current logical volume is hung back to the total business request queue of the logical volume.
In this embodiment, for a logical volume in which a virtual machine startup storm (a large number of burst service requests) exists, a token over-provisioning mechanism is added, so that the logical volume can process a large number of service requests exceeding its own configuration capability in a short time, and the startup time when the virtual machines are synchronously started can be greatly shortened, for example, when there are 100 VMware virtual machines synchronously started, the startup time can be shortened from 1 minute or more to within 20 seconds.
According to the technical scheme provided by the embodiment of the invention, the queue length of the service request queue of each logical volume is obtained, and when the queue length of the service request queue with a plurality of abnormal logical volumes in each logical volume is detected to be larger than a preset queue length threshold value, the service type corresponding to each service request in the service request queue of each abnormal logical volume is obtained; when the fact that the service types corresponding to the service requests in the service request queue of one abnormal logical volume are virtual machine starting services is detected, when the fact that the number of the service requests of which the service types corresponding to the virtual machine starting services in the service request queue of the detected abnormal logical volume are larger than or equal to a preset service request number threshold value is determined, the detected abnormal logical volume is determined as a target logical volume, and the target logical volume is determined to generate a virtual machine starting storm, so that accurate and efficient detection of the virtual machine starting storm can be achieved, and the processing efficiency of the virtual machine starting storm can be improved.
EXAMPLE III
Fig. 3A is a flowchart of a method for processing a virtual machine startup storm according to a third embodiment of the present invention, which is embodied on the basis of the foregoing embodiments, and in this embodiment, tokens corresponding to a first token quantity difference are supplemented to a target token bucket by a node token bucket corresponding to a target storage node, where the method specifically includes:
s310, acquiring the service request queue of each logical volume corresponding to the target storage node.
S320, obtaining the queue length of the service request queue of each logical volume, and respectively judging whether the queue length of the service request queue of each logical volume is larger than a preset queue length threshold value.
S330, if the queue length of the service request queue with at least one abnormal logical volume in each logical volume is detected to be larger than a preset queue length threshold, acquiring the service type corresponding to each service request in the service request queue of each abnormal logical volume.
S340, when it is detected that at least one service request corresponding to the service request exists in the service request queue of one abnormal logical volume and the service type is the virtual machine starting service, judging whether the number of the service requests of which the service types corresponding to the service request queue of the detected abnormal logical volume are the virtual machine starting service is larger than or equal to a preset service request number threshold value or not.
And S350, if the number of the service requests of which the service types are virtual machine starting services in the service request queue of the detected abnormal logical volume is determined to be larger than or equal to a preset service request number threshold, determining the detected abnormal logical volume as a target logical volume, and determining that the target logical volume generates a virtual machine starting storm.
S360, acquiring the number of the required tokens corresponding to the service request queue of the target logical volume.
S370, judging whether the required token number corresponding to the service request queue of the target logical volume is larger than the current token number of the target token bucket corresponding to the target logical volume.
And S380, if so, calculating to obtain a first token quantity difference value between the required token quantity corresponding to the service request queue of the target logical volume and the current token quantity of the target token bucket.
S390, judging whether the current token quantity of the node token bucket corresponding to the target storage node is larger than or equal to the first token quantity difference value.
In this embodiment, because only a small number of tokens are usually reserved in the node token bucket, or no token is reserved, when the tokens are replenished to the target token bucket through the node token bucket, it is first determined whether the current token number in the node token bucket is greater than or equal to the first token number difference, that is, whether the current token in the node token bucket is enough to replenish the tokens lacking in the target token bucket is determined.
S3100, if it is determined that the current token number of the node token bucket corresponding to the target storage node is greater than or equal to the first token number difference, obtaining tokens corresponding to the first token number difference from the node token bucket corresponding to the target storage node and adding the tokens to the target token bucket.
Specifically, if it is determined that the current token number is greater than or equal to the first token number difference, tokens of the first token number difference may be directly obtained from the node token bucket and added to the target token bucket, so as to implement token supplementation for the target token bucket.
According to the technical scheme provided by the embodiment of the invention, after a first token quantity difference value between the required token quantity corresponding to the service request queue of the target logical volume and the current token quantity of the target token bucket is obtained through calculation, if the current token quantity of the node token bucket is determined to be larger than or equal to the first token quantity difference value, tokens corresponding to the first token quantity difference value are obtained from the node token bucket and added to the target token bucket; if the current token quantity of the node token bucket is smaller than the first token quantity difference value, calculating to obtain a second token quantity difference value between the current token quantity of the node token bucket and the first token quantity difference value; obtaining the residual token quantity of other token buckets corresponding to other logic volumes, and obtaining tokens corresponding to the second token quantity difference value from other token buckets according to the residual token quantity of other token buckets and adding the tokens to the node token bucket; further obtaining tokens corresponding to the first token quantity difference from the node token bucket and adding the tokens to the target token bucket; the token compensation of the target token bucket corresponding to the target logical volume with the virtual machine start storm can be successfully realized under different scenes, the successful coping probability of the virtual machine start storm can be improved, and the stability of the storage node can be further improved.
In an optional implementation manner of this embodiment, after determining whether the current token number of the node token bucket corresponding to the target storage node is greater than or equal to the first token number difference, the method may further include:
if the current token quantity of the node token bucket corresponding to the target storage node is determined to be smaller than the first token quantity difference value, calculating to obtain a second token quantity difference value between the current token quantity of the node token bucket corresponding to the target storage node and the first token quantity difference value;
obtaining the residual token quantity of other token buckets corresponding to other logical volumes, and obtaining tokens corresponding to the second token quantity difference from the other token buckets and adding the tokens to the node token bucket corresponding to the target storage node according to the residual token quantity of the other token buckets;
and obtaining tokens corresponding to the first token quantity difference from a node token bucket corresponding to the target storage node and adding the tokens to the target token bucket.
In another case, if the current token number is smaller than the first token number difference, the tokens in the node token bucket alone cannot be used to fully replenish the tokens required by the target token bucket. At this time, a second token quantity difference between the first token quantity difference and the current token quantity may be further calculated, that is, the quantity of tokens that the node token bucket needs to be additionally increased.
In this embodiment, the node token bucket may recover tokens from the token buckets corresponding to the respective logical volumes, and therefore, when the current token number of the node token bucket is insufficient, the remaining token numbers of the respective other token buckets except the target token bucket may be counted. The node token bucket may then reclaim a total second token quantity difference of tokens from the other token buckets based on the remaining token quantities of each of the other token buckets.
Optionally, the node token bucket may perform an average recycling on each of the other token buckets, that is, divide the second token number difference by the number of the other token buckets to determine an average recycling token number, and then recycle the average recycling token number of tokens from each of the other token buckets. Or, the node token bucket may recycle tokens of different proportions from other token buckets corresponding to different remaining token quantities; for example, for other token buckets with a smaller number of remaining tokens, a smaller number of tokens are recycled, and for other token buckets with a larger number of remaining tokens, a larger number of tokens are recycled.
Further, the node token bucket may add the tokens of the first token quantity difference to the target token bucket after recovering the tokens of the second token quantity difference from the other token buckets, where the quantity of tokens in the node token bucket is equal to the first token quantity difference.
In one specific example, the flow of the node token bucket supplementing the target token bucket with tokens may be as shown in fig. 3B. Specifically, when the node token bucket receives a token over-provisioning request of the target token bucket, the token over-provisioning request may be analyzed to obtain a first token quantity difference of the target token bucket. Then, the node token bucket may determine whether the current token number of the node token bucket is greater than or equal to the first token number difference, so as to determine whether tokens of the node token bucket are sufficient. If it is determined that the node token bucket has insufficient tokens, the node token bucket may compute and reallocate tokens from other token buckets in addition to the target token bucket to reclaim enough tokens from the other token buckets to replenish the target token bucket. And if the token of the node token bucket is determined to be enough, the over-supply token can be directly provided for the target token bucket.
In another optional implementation manner of this embodiment, obtaining tokens corresponding to the second token quantity difference from other token buckets according to the remaining token quantities of the other token buckets, and adding the tokens to the node token bucket corresponding to the target storage node may include:
calculating to obtain token recycling weights corresponding to the other token buckets according to the residual token quantity of the other token buckets; obtaining the quantity of the recovered tokens corresponding to each of the other token buckets according to the token recovery weight corresponding to each of the other token buckets and the second token quantity difference; and respectively adding tokens with the quantity matched with the quantity of the recycling tokens corresponding to the other token buckets to the node token bucket corresponding to the target storage node through the other token buckets.
In this embodiment, when the node token bucket recovers tokens from each other token bucket, a ratio of the remaining token number of each other token bucket to the total remaining token number (sum of the remaining token numbers) may be used as a token recovery weight corresponding to each other token bucket; and then, determining the recovery token quantity corresponding to each other token bucket according to the recovery weight of each token and the difference value of the second token quantity. And finally, according to the quantity of the recovered tokens corresponding to each other token bucket, recovering the tokens from each other token bucket.
In a specific example, the other token buckets include LUN2 and LUN3, where the remaining number of tokens of LUN2 is 4, the remaining number of tokens of LUN3 is 6, and the total remaining number of tokens is 10. At this time, the token collection weight corresponding to LUN2 is 4/10-0.4, and similarly, the token collection weight corresponding to LUN3 is 6/10-0.6. If the second token number difference is 5, the number of recycle tokens corresponding to LUN2 is 5 × 0.4 — 2, and the number of recycle tokens corresponding to LUN3 is 5 × 0.6 — 3.
In this embodiment, the tokens of the token buckets corresponding to the plurality of logical volumes are recalculated and redistributed, so that the effects of token borrowing and token rotation can be achieved, and the condition that the storage node is overloaded due to the fact that a virtual machine of a target logical volume is started to deal with a storm can be avoided. In addition, through the token recovery mechanism, the number of recovered tokens from other token buckets can be balanced, so that the service quality of each logic volume after token recovery can be balanced, and the stability of the storage node can be improved.
In a specific implementation manner of this embodiment, a flow of the processing method for the virtual machine startup storm may be as shown in fig. 3C. Specifically, take the example that the storage node includes two logical volumes LUN1 and LUN 2. Firstly, the business request queues of the logical volumes can be detected and identified in real time through a Burst I/O identifier so as to judge whether a logical volume generation virtual machine starting storm exists or not. When a virtual machine startup storm is detected for target logical volume LUN2, the token bucket of LUN2 will send an over-provisioning request to the node token bucket requesting additional tokens. The node token bucket may obtain the remaining token number of the token bucket of LUN1 at this time through pressure feedback of the token buckets of the respective logical volumes. Node token buckets may then be token recomputed based on the remaining token number for the token bucket of LUN1 and the excess token number requested for the token bucket of LUN2 to reclaim enough tokens from the token bucket of LUN1 to replenish the token bucket of LUN 2.
In addition, since the storage service quality of the storage node is constant, a fixed number of tokens may be generated by the node token bucket at certain intervals, and then the generated tokens may be distributed to the token buckets of the logical volumes on average or according to a preset ratio by the node token bucket to achieve pre-sorting of the tokens.
The token over-provisioning process for the target logical volume may be as shown in fig. 3D. Specifically, for the target token bucket of the target logical volume where the virtual machine start storm occurs, the node token bucket supplements the reserved tokens to the target token bucket. And for other token buckets of other logical volumes without the virtual machine starting storm, when detecting that the node token bucket has insufficient tokens, selecting a certain number of tokens from the remaining tokens of the node token bucket to supplement the tokens to the node token bucket.
Example four
Fig. 4 is a block diagram of a structure of a processing apparatus for a virtual machine startup storm according to a fourth embodiment of the present invention, where the apparatus specifically includes: a required token number obtaining module 410, a token number judging module 420 and a token supplementing module 430; wherein the content of the first and second substances,
a required token number obtaining module 410, configured to obtain a service request queue of each logical volume corresponding to a target storage node, and obtain a required token number corresponding to the service request queue of the target logical volume when detecting that a target logical volume virtual machine start storm exists in each logical volume according to the service request queue of each logical volume;
a token number determining module 420, configured to determine whether a required number of tokens corresponding to a service request queue of the target logical volume is greater than a current number of tokens of a target token bucket corresponding to the target logical volume;
and a token supplementing module 430, configured to calculate a first token quantity difference between a required token quantity corresponding to the service request queue of the target logical volume and the current token quantity of the target token bucket if the token quantity difference is greater than the first token quantity difference, and supplement tokens corresponding to the first token quantity difference to the target token bucket through a node token bucket corresponding to the target storage node.
According to the technical scheme provided by the embodiment of the invention, the number of tokens required corresponding to the service request queue of the target logical volume is obtained by obtaining the service request queue of each logical volume corresponding to the target storage node and when the virtual machine starting storm generated by the target logical volume is detected according to the service request queue of each logical volume; if the required token quantity corresponding to the service request queue of the target logic volume is larger than the current token quantity of the target token bucket corresponding to the target logic volume, calculating to obtain a first token quantity difference value between the required token quantity and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through the node token bucket corresponding to the target storage node; token supplement is carried out on the token bucket corresponding to the logical volume where the virtual machine start storm occurs through the node token bucket, so that the storage service quality requirement can be met when the virtual machine start storm is met, and meanwhile, the waste of storage resources after the virtual machine start storm is finished is avoided.
Optionally, on the basis of the foregoing technical solution, the required token number obtaining module 410 includes:
a queue length judging unit, configured to obtain a queue length of the service request queue of each logical volume, and respectively judge whether the queue length of the service request queue of each logical volume is greater than a preset queue length threshold;
a service type obtaining unit, configured to obtain a service type corresponding to each service request in a service request queue of each abnormal logical volume if it is detected that a queue length of the service request queue of at least one abnormal logical volume in each logical volume is greater than a preset queue length threshold;
the service request quantity judging unit is used for judging whether the quantity of the service requests of which the service types are virtual machine starting services corresponding to the service request queues of the detected abnormal logical volumes is greater than or equal to a preset service request quantity threshold value or not when the condition that at least one service request corresponding to the service request exists in the service request queue of one abnormal logical volume is a virtual machine starting service is detected;
and the target logical volume determining unit is used for determining the detected abnormal logical volume as the target logical volume and determining that the target logical volume generates a virtual machine starting storm if the number of the service requests of which the service types are virtual machine starting services in the service request queue of the detected abnormal logical volume is greater than or equal to a preset service request number threshold.
Optionally, on the basis of the foregoing technical solution, the token supplementing module 430 includes:
a token quantity difference judgment unit, configured to judge whether a current token quantity of a node token bucket corresponding to the target storage node is greater than or equal to the first token quantity difference;
and the first token adding unit is used for acquiring tokens corresponding to the first token quantity difference from the node token bucket corresponding to the target storage node and adding the tokens to the target token bucket if the current token quantity of the node token bucket corresponding to the target storage node is determined to be greater than or equal to the first token quantity difference.
Optionally, on the basis of the above technical solution, the token supplementing module 430 further includes:
a token quantity difference calculation unit, configured to calculate a second token quantity difference between the current token quantity of the node token bucket corresponding to the target storage node and the first token quantity difference if it is determined that the current token quantity of the node token bucket corresponding to the target storage node is smaller than the first token quantity difference;
a second token adding unit, configured to obtain the remaining token number of other token buckets corresponding to each other logical volume, and obtain, according to the remaining token number of each other token bucket, a token corresponding to the second token number difference from the other token buckets and add the token to the node token bucket corresponding to the target storage node;
and the third token adding unit is used for acquiring tokens corresponding to the first token quantity difference from the node token bucket corresponding to the target storage node and adding the tokens to the target token bucket.
Optionally, on the basis of the foregoing technical solution, the second token adding unit includes:
the token recovery weight calculation subunit is used for calculating the token recovery weight corresponding to each other token bucket according to the residual token quantity of each other token bucket;
a recovered token quantity obtaining subunit, configured to obtain, according to the token recovery weight corresponding to each of the other token buckets and the second token quantity difference, a recovered token quantity corresponding to each of the other token buckets;
and the token adding subunit is used for respectively adding tokens with the quantity matched with the quantity of the recovered tokens corresponding to each other token bucket to the node token bucket corresponding to the target storage node through each other token bucket.
Optionally, on the basis of the above technical solution, the apparatus for processing the virtual machine start storm further includes:
the first token adding module is used for generating tokens of a preset number at preset time intervals and adding the tokens to a node token bucket corresponding to the target storage node;
the token quantity calculation module is used for calculating to obtain the token quantity corresponding to each logical volume according to the quantity of the logical volumes corresponding to the target storage node and the preset quantity;
and a second token adding module, configured to add tokens with the number matching the token quantity corresponding to each logical volume to the token bucket corresponding to each logical volume through the node token bucket corresponding to the target storage node.
Optionally, on the basis of the above technical solution, the apparatus for processing the virtual machine start storm further includes:
and the preset number setting module is used for acquiring the service request processing performance corresponding to the target storage node and setting the preset number according to the service request processing performance corresponding to the target storage node.
The processing device for the virtual machine start storm provided by the embodiment of the invention can execute the processing method for the virtual machine start storm provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention, as shown in fig. 5, the electronic device includes a processor 50, a memory 51, an input device 52, and an output device 53; the number of the processors 50 in the electronic device may be one or more, and one processor 50 is taken as an example in fig. 5; the processor 50, the memory 51, the input device 52 and the output device 53 in the electronic apparatus may be connected by a bus or other means, and the bus connection is exemplified in fig. 5.
The memory 51 is used as a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the processing method of the virtual machine startup storm in the embodiment of the present invention (for example, the required token number obtaining module 410, the token number judging module 420, and the token supplementing module 430 in the processing apparatus of the virtual machine startup storm). The processor 50 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the memory 51, that is, implements the processing method of the virtual machine startup storm described above, that is:
the method comprises the steps of obtaining a service request queue of each logical volume corresponding to a target storage node, and obtaining the number of tokens required by the service request queue of each target logical volume when detecting that a target logical volume virtual machine starting storm exists in each logical volume according to the service request queue of each logical volume;
judging whether the required token quantity corresponding to the service request queue of the target logical volume is larger than the current token quantity of a target token bucket corresponding to the target logical volume;
if yes, calculating to obtain a first token quantity difference value between the required token quantity corresponding to the service request queue of the target logic volume and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through a node token bucket corresponding to a target storage node.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 51 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 51 may further include memory located remotely from the processor 50, which may be connected to the electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 52 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic apparatus. The output device 53 may include a display device such as a display screen.
EXAMPLE six
The sixth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method according to any embodiment of the present invention. Of course, the computer-readable storage medium provided in the embodiments of the present invention may perform related operations in a method for processing a virtual machine startup storm according to any embodiment of the present invention. That is, the program when executed by the processor implements:
the method comprises the steps of obtaining a service request queue of each logical volume corresponding to a target storage node, and obtaining the number of tokens required by the service request queue of each target logical volume when detecting that a target logical volume virtual machine starting storm exists in each logical volume according to the service request queue of each logical volume;
judging whether the required token quantity corresponding to the service request queue of the target logical volume is larger than the current token quantity of a target token bucket corresponding to the target logical volume;
if yes, calculating to obtain a first token quantity difference value between the required token quantity corresponding to the service request queue of the target logic volume and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through a node token bucket corresponding to a target storage node.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the processing apparatus for a virtual machine startup storm, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for processing a virtual machine start storm is characterized by comprising the following steps:
the method comprises the steps of obtaining a service request queue of each logical volume corresponding to a target storage node, and obtaining the number of tokens required by the service request queue of each target logical volume when detecting that a target logical volume virtual machine starting storm exists in each logical volume according to the service request queue of each logical volume;
judging whether the required token quantity corresponding to the service request queue of the target logical volume is larger than the current token quantity of a target token bucket corresponding to the target logical volume;
if yes, calculating to obtain a first token quantity difference value between the required token quantity corresponding to the service request queue of the target logical volume and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through a node token bucket corresponding to a target storage node.
2. The method of claim 1, wherein detecting that a target logical volume spawning virtual machine startup storm exists in the logical volumes according to the service request queue of the logical volumes comprises:
acquiring the queue length of the service request queue of each logical volume, and respectively judging whether the queue length of the service request queue of each logical volume is greater than a preset queue length threshold value;
if the queue length of the service request queue with at least one abnormal logical volume in each logical volume is detected to be larger than a preset queue length threshold, acquiring a service type corresponding to each service request in the service request queue of each abnormal logical volume;
when detecting that at least one service request corresponding to a service request exists in a service request queue of an abnormal logical volume and the service type is a virtual machine starting service, judging whether the number of the service requests of which the service types are virtual machine starting services in the service request queue of the detected abnormal logical volume is larger than or equal to a preset service request number threshold value or not;
if the number of the service requests of which the service types are virtual machine starting services corresponding to the service request queues of the detected abnormal logical volumes is larger than or equal to a preset service request number threshold value, determining the detected abnormal logical volumes as target logical volumes, and determining that the target logical volumes generate virtual machine starting storms.
3. The method of claim 1, wherein supplementing the target token bucket with tokens corresponding to the first token quantity difference by the node token bucket corresponding to the target storage node comprises:
judging whether the current token quantity of a node token bucket corresponding to the target storage node is larger than or equal to the first token quantity difference value or not;
if the current token quantity of the node token bucket corresponding to the target storage node is determined to be larger than or equal to the first token quantity difference, obtaining tokens corresponding to the first token quantity difference from the node token bucket corresponding to the target storage node and adding the tokens to the target token bucket.
4. The method of claim 3, wherein after determining whether the current token number of the node token bucket corresponding to the target storage node is greater than or equal to the first token number difference, further comprising:
if the current token quantity of the node token bucket corresponding to the target storage node is determined to be smaller than the first token quantity difference value, calculating to obtain a second token quantity difference value between the current token quantity of the node token bucket corresponding to the target storage node and the first token quantity difference value;
obtaining the residual token quantity of other token buckets corresponding to other logical volumes, and obtaining tokens corresponding to the second token quantity difference from the other token buckets and adding the tokens to the node token bucket corresponding to the target storage node according to the residual token quantity of the other token buckets;
and obtaining tokens corresponding to the first token quantity difference from a node token bucket corresponding to the target storage node and adding the tokens to the target token bucket.
5. The method of claim 4, wherein obtaining tokens corresponding to the second token quantity difference from the other token buckets according to the remaining token quantities of the other token buckets and adding the tokens to the node token bucket corresponding to the target storage node comprises:
calculating to obtain token recycling weights corresponding to the other token buckets according to the residual token quantity of the other token buckets;
obtaining the quantity of the recovered tokens corresponding to each of the other token buckets according to the token recovery weight corresponding to each of the other token buckets and the second token quantity difference;
and respectively adding tokens with the quantity matched with the quantity of the recycling tokens corresponding to the other token buckets to the node token bucket corresponding to the target storage node through the other token buckets.
6. The method of claim 1, further comprising:
generating a preset number of tokens to be added to a node token bucket corresponding to the target storage node at preset time intervals;
calculating to obtain the number of tokens corresponding to each logical volume according to the number of the logical volumes corresponding to the target storage node and the preset number;
and adding tokens with the quantity matched with that of the tokens corresponding to each logical volume into the token bucket corresponding to each logical volume through the node token bucket corresponding to the target storage node.
7. The method of claim 6, wherein before generating a preset number of tokens to be added to the node token bucket corresponding to the target storage node at preset time intervals, the method further comprises:
and acquiring the service request processing performance corresponding to the target storage node, and setting the preset number according to the service request processing performance corresponding to the target storage node.
8. A processing apparatus for a virtual machine start storm, comprising:
the system comprises a required token quantity obtaining module, a required token quantity obtaining module and a required token quantity obtaining module, wherein the required token quantity obtaining module is used for obtaining a service request queue of each logical volume corresponding to a target storage node, and obtaining the required token quantity corresponding to the service request queue of the target logical volume when detecting that a target logical volume virtual machine starting storm exists in each logical volume according to the service request queue of each logical volume;
the token quantity judging module is used for judging whether the required token quantity corresponding to the service request queue of the target logical volume is larger than the current token quantity of the target token bucket corresponding to the target logical volume;
and if so, calculating to obtain a first token quantity difference value between the required token quantity corresponding to the service request queue of the target logical volume and the current token quantity of the target token bucket, and supplementing tokens corresponding to the first token quantity difference value to the target token bucket through the node token bucket corresponding to the target storage node.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of handling a virtual machine start storm as recited in any one of claims 1-7.
10. A computer-readable storage medium on which a computer program is stored, which program, when executed by a processor, performs a method of handling a virtual machine start storm as claimed in any one of claims 1 to 7.
CN202210453908.2A 2022-04-24 2022-04-24 Processing method, device, equipment and medium for virtual machine starting storm Active CN114860334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210453908.2A CN114860334B (en) 2022-04-24 2022-04-24 Processing method, device, equipment and medium for virtual machine starting storm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210453908.2A CN114860334B (en) 2022-04-24 2022-04-24 Processing method, device, equipment and medium for virtual machine starting storm

Publications (2)

Publication Number Publication Date
CN114860334A true CN114860334A (en) 2022-08-05
CN114860334B CN114860334B (en) 2024-01-26

Family

ID=82633532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210453908.2A Active CN114860334B (en) 2022-04-24 2022-04-24 Processing method, device, equipment and medium for virtual machine starting storm

Country Status (1)

Country Link
CN (1) CN114860334B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120230348A1 (en) * 2011-03-10 2012-09-13 Donald Pannell Data blocking systems for non-arbitrary networks
CN103763208A (en) * 2014-01-29 2014-04-30 华为技术有限公司 Data flow limiting method and device
CN104734989A (en) * 2013-12-23 2015-06-24 腾讯数码(天津)有限公司 Data transmission flow scheduling method and system based on token buckets
US20150178015A1 (en) * 2013-12-19 2015-06-25 International Business Machines Corporation Dynamic feedback-based throughput control for black-box storage systems
CN105389185A (en) * 2015-11-16 2016-03-09 北京汉柏科技有限公司 Method and apparatus for processing boot storm of virtual cloud desktops
CN105409171A (en) * 2013-06-25 2016-03-16 亚马逊科技公司 Burst mode control
US9639398B1 (en) * 2015-03-31 2017-05-02 Amazon Technologies, Inc. Burst throttling with sequential operation detection
US10268419B1 (en) * 2017-04-27 2019-04-23 EMC IP Holding Company LLC Quality of service for storage system resources
US20190129653A1 (en) * 2017-10-27 2019-05-02 EMC IP Holding Company, LLC System and method for end to end qos solution for data storage systems
CN110213173A (en) * 2019-06-06 2019-09-06 北京百度网讯科技有限公司 Flow control methods and device, system, server, computer-readable medium
CN110221775A (en) * 2019-05-05 2019-09-10 华为技术有限公司 The distribution method and device of token in storage system
CN111245732A (en) * 2018-11-29 2020-06-05 阿里巴巴集团控股有限公司 Flow control method, device and equipment
CN112463066A (en) * 2020-12-11 2021-03-09 苏州浪潮智能科技有限公司 Method and equipment for controlling burst service quality of distributed block storage logical volume
CN112752307A (en) * 2021-01-04 2021-05-04 欧普照明股份有限公司 Control method, data processing apparatus, control system, and storage medium
CN113765820A (en) * 2020-10-30 2021-12-07 北京沃东天骏信息技术有限公司 Token bucket-based current limiting method, token bucket-based current limiting device, token bucket-based computing equipment and token bucket-based current limiting medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120230348A1 (en) * 2011-03-10 2012-09-13 Donald Pannell Data blocking systems for non-arbitrary networks
CN105409171A (en) * 2013-06-25 2016-03-16 亚马逊科技公司 Burst mode control
US20150178015A1 (en) * 2013-12-19 2015-06-25 International Business Machines Corporation Dynamic feedback-based throughput control for black-box storage systems
CN104734989A (en) * 2013-12-23 2015-06-24 腾讯数码(天津)有限公司 Data transmission flow scheduling method and system based on token buckets
CN103763208A (en) * 2014-01-29 2014-04-30 华为技术有限公司 Data flow limiting method and device
US9639398B1 (en) * 2015-03-31 2017-05-02 Amazon Technologies, Inc. Burst throttling with sequential operation detection
CN105389185A (en) * 2015-11-16 2016-03-09 北京汉柏科技有限公司 Method and apparatus for processing boot storm of virtual cloud desktops
US10268419B1 (en) * 2017-04-27 2019-04-23 EMC IP Holding Company LLC Quality of service for storage system resources
US20190129653A1 (en) * 2017-10-27 2019-05-02 EMC IP Holding Company, LLC System and method for end to end qos solution for data storage systems
CN111245732A (en) * 2018-11-29 2020-06-05 阿里巴巴集团控股有限公司 Flow control method, device and equipment
CN110221775A (en) * 2019-05-05 2019-09-10 华为技术有限公司 The distribution method and device of token in storage system
CN110213173A (en) * 2019-06-06 2019-09-06 北京百度网讯科技有限公司 Flow control methods and device, system, server, computer-readable medium
CN113765820A (en) * 2020-10-30 2021-12-07 北京沃东天骏信息技术有限公司 Token bucket-based current limiting method, token bucket-based current limiting device, token bucket-based computing equipment and token bucket-based current limiting medium
CN112463066A (en) * 2020-12-11 2021-03-09 苏州浪潮智能科技有限公司 Method and equipment for controlling burst service quality of distributed block storage logical volume
CN112752307A (en) * 2021-01-04 2021-05-04 欧普照明股份有限公司 Control method, data processing apparatus, control system, and storage medium

Also Published As

Publication number Publication date
CN114860334B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
EP3471345B1 (en) Sla-based resource allocation method and nfvo
US10764132B2 (en) Scale-out association method and apparatus, and system
CN107547595B (en) Cloud resource scheduling system, method and device
CN105159782A (en) Cloud host based method and apparatus for allocating resources to orders
US10884667B2 (en) Storage controller and IO request processing method
EP3745678B1 (en) Storage system, and method and apparatus for allocating storage resources
US11734172B2 (en) Data transmission method and apparatus using resources in a resource pool of a same NUMA node
WO2021109767A1 (en) Network device and method for reducing transmission delay therefor
CN106775948B (en) Cloud task scheduling method and device based on priority
CN110221775B (en) Method and device for distributing tokens in storage system
US10778807B2 (en) Scheduling cluster resources to a job based on its type, particular scheduling algorithm,and resource availability in a particular resource stability sub-levels
CN106991070B (en) Real-time computing method and device
US20200272526A1 (en) Methods and systems for automated scaling of computing clusters
CN110597879B (en) Method and device for processing time series data
CN111857992B (en) Method and device for allocating linear resources in Radosgw module
CN111314234B (en) Flow distribution method and device, storage medium and electronic equipment
CN108512673B (en) Cloud service quality monitoring method and device and server
CN117112222A (en) Request processing method and device, electronic equipment and storage medium
CN114860334A (en) Method, device, equipment and medium for processing virtual machine start storm
CN112615795A (en) Flow control method and device, electronic equipment, storage medium and product
CN113992586A (en) Flow control method and device, computer equipment and storage medium
CN111930514A (en) Resource optimization allocation method and system
CN109445863B (en) Data processing method, device, equipment and medium based on FPGA
CN114116228A (en) Task allocation method, device, equipment and storage medium
Goren et al. Stochastic coordination in heterogeneous load balancing systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant