A method, apparatus, device, and medium for controlling the number of tracking connections in a virtual machine.

By utilizing the weighted sliding window algorithm and OVN architecture configuration items in the virtual machine management system, the upper limit of the number of tracking connections of the virtual machine is dynamically adjusted, which solves the problem of dynamic changes in the control of the number of tracking connections in the virtual machine management system, improves the resource utilization and security of the host machine, and improves the performance and reliability of the virtual machine.

CN120929194BActive Publication Date: 2026-01-30JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511454339.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2026-01-30
Estimated Expiration
2045-10-13

AI Technical Summary

Technical Problem

In existing virtual machine management systems, the control method of tracking the number of connections cannot effectively cope with the dynamic changes of virtual machines and complex network environments, resulting in the impact on host communication and a decrease in resource utilization.

Method used

By utilizing the host machine's historical tracking connection count information, a weighted sliding window algorithm is used to calculate the required tracking connection count. Based on the total tracking connection count limit and the tracking connection count of the virtual machine, the tracking connection count limit of each virtual machine is dynamically adjusted, and the logical switch port configuration items of the OVN architecture are used for limitation.

Benefits of technology

It enables convenient and effective control over the number of virtual machine tracking connections, ensuring normal communication with the host machine, improving resource utilization and security, and enhancing the performance and reliability of the virtual machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929194B_ABST
    Figure CN120929194B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and medium for controlling the tracking connection count of virtual machines, relating to the field of virtualization technology. The method includes: determining the required tracking connection count of the host machine based on historical tracking connection count information; determining the number of tracking connections that can be allocated to virtual machines on the host machine based on the host machine's total tracking connection count upper limit and the required tracking connection count; and adjusting the upper limit of the tracking connection count for each virtual machine based on the virtual machine's allocated tracking connection count and the tracking connection count of each virtual machine on the host machine. This invention divides the total tracking connection count of the host machine into two parts: the host machine's tracking connection count and the virtual machine's tracking connection count. It can utilize the host machine's historical tracking connection count information to predict the subsequent tracking connection count required by the host machine, thereby conveniently and effectively controlling the virtual machine's tracking connection count while ensuring normal communication of the host machine, thus improving the host machine's resource utilization and security.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of virtualization, and in particular to a virtual machine tracking connection number control method, device, equipment and medium. BACKGROUND

[0002] With the development of cloud computing and virtualization technology, virtual machines (VM) have become an important part of enterprise IT (Information Technology) infrastructure. However, the resource occupation problem of virtual machines, especially the occupation of tracking connection numbers, has become an increasingly prominent problem. The tracking connection number refers to the number of connections established between the virtual machine and the external network or other virtual machines, and these connections are crucial to the normal operation of the virtual machine. However, when the virtual machine occupies too high a tracking connection number, it will affect the host machine (Host Machine) to establish tracking connections, and thus affect the communication of the host machine; this problem is particularly prominent under the OVS (Open vSwitch, a multi-level virtual switch) architecture widely used at present.

[0003] In related technologies, the control of tracking connection numbers in traditional virtual machine management systems usually relies on static configuration and simple resource allocation algorithms, and these methods cannot effectively cope with the dynamic changes of virtual machines and complex network environments. Therefore, how to conveniently and effectively control the tracking connection number of the virtual machine to ensure the normal communication of the host machine, improve the resource utilization and security of the host machine, and improve the performance and reliability of the virtual machine is a problem that needs to be solved urgently today. SUMMARY

[0004] The purpose of the present application is to provide a virtual machine tracking connection number control method, device, equipment and computer readable storage medium, in order to conveniently and effectively control the tracking connection number of the virtual machine, ensure the normal communication of the host machine, and improve the resource utilization and security of the host machine.

[0005] To solve the above technical problems, the present application provides a virtual machine tracking connection number control method, comprising:

[0006] determining the required tracking connection number of the host machine according to the historical tracking connection number information of the host machine;

[0007] determining the virtual machine allocatable tracking connection number of the host machine according to the total tracking connection number upper limit value of the host machine and the required tracking connection number;

[0008] adjusting the tracking connection number upper limit value of each virtual machine according to the virtual machine allocatable tracking connection number and the tracking connection number of each virtual machine on the host machine.

[0009] In another aspect, the determining the demand tracking connection number of the host machine according to the historical tracking connection number information comprises:

[0010] The demand tracking connection number is calculated according to the historical tracking connection number information by using a weighted sliding window algorithm; wherein the historical tracking connection number information comprises n tracking connection numbers of the host machine obtained at preset time intervals, and n is a positive integer greater than or equal to 2.

[0011] In another aspect, the demand tracking connection number is calculated according to the historical tracking connection number information by using a weighted sliding window algorithm, which comprises:

[0012] The demand tracking connection number is obtained by calculating the quotient of a weighted product value and a weight accumulation value; wherein the weighted product value is the sum of the products of n tracking connection numbers of the host machine and their respective period weights; the weight accumulation value is the sum of n period weights; if the acquisition time of a first tracking connection number is later than the acquisition time of a second tracking connection number, the period weight corresponding to the first tracking connection number is greater than or equal to the period weight corresponding to the second tracking connection number; the first tracking connection number and the second tracking connection number are any two tracking connection numbers in the n tracking connection numbers of the host machine.

[0013] In another aspect, the historical tracking connection number information comprises the first n tracking connection numbers of the host machine in the tracking connection numbers of the host machine sorted from new to old according to the acquisition time.

[0014] In another aspect, the determining the virtual machine allocatable tracking connection number of the host machine according to the total tracking connection number upper limit value of the host machine and the demand tracking connection number comprises:

[0015] The virtual machine allocatable tracking connection number is obtained by calculating the difference between the total tracking connection number upper limit value and the demand tracking connection number.

[0016] In another aspect, the determining the virtual machine allocatable tracking connection number of the host machine according to the total tracking connection number upper limit value of the host machine and the demand tracking connection number comprises:

[0017] The virtual machine allocatable tracking connection number is determined according to the total tracking connection number upper limit value of the host machine, the demand tracking connection number and virtual machine reserved tracking connection number information.

[0018] In another aspect, the virtual machine reserved tracking connection number information is a reservation percentage; the determining the virtual machine allocatable tracking connection number according to the total tracking connection number upper limit value of the host machine, the demand tracking connection number and virtual machine reserved tracking connection number information comprises:

[0019] The product of the connection number difference and the allocation percentage is calculated to obtain the virtual machine allocable tracking connection number; wherein the connection number difference is the difference between the total tracking connection number upper limit value and the demand tracking connection number, and the allocation percentage is the difference between 1 and the reservation percentage.

[0020] In another aspect, the adjusting of the tracking connection number upper limit value of each of the virtual machines according to the virtual machine allocable tracking connection number and the tracking connection number of each of the virtual machines on the host machine comprises:

[0021] The allocation proportion of each of the virtual machines is determined according to the tracking connection number of each of the virtual machines;

[0022] The tracking connection number upper limit value of each of the virtual machines is adjusted according to the virtual machine allocable tracking connection number and the allocation proportion of each of the virtual machines.

[0023] In another aspect, the determining of the allocation proportion of each of the virtual machines according to the tracking connection number of each of the virtual machines comprises:

[0024] The allocation proportion of the current virtual machine is obtained by calculating the quotient of the tracking connection number of the current virtual machine and the total tracking connection number of the virtual machines; wherein the current virtual machine is any of the virtual machines, and the total tracking connection number of the virtual machines is the sum of the tracking connection number of each of the virtual machines.

[0025] In another aspect, the adjusting of the tracking connection number upper limit value of each of the virtual machines according to the virtual machine allocable tracking connection number and the allocation proportion of each of the virtual machines comprises:

[0026] The tracking connection number upper limit value of the current virtual machine is adjusted by using the product of the calculated allocation proportion of the current virtual machine and the virtual machine allocable tracking connection number; wherein the current virtual machine is any of the virtual machines.

[0027] In another aspect, the adjusting of the tracking connection number upper limit value of each of the virtual machines according to the virtual machine allocable tracking connection number and the tracking connection number of each of the virtual machines on the host machine comprises:

[0028] The upper limit value adjustment value of each of the virtual machines is determined according to the virtual machine allocable tracking connection number and the tracking connection number of each of the virtual machines on the host machine;

[0029] It is judged whether the tracking connection number of the current virtual machine is greater than the upper limit value adjustment value of the current virtual machine; wherein the current virtual machine is any of the virtual machines;

[0030] if the tracking connection number of the current virtual machine is greater than the upper limit value adjustment value of the current virtual machine, adjusting the tracking connection number upper limit value of the current virtual machine to the tracking connection number of the current virtual machine;

[0031] if the tracking connection number of the current virtual machine is not greater than the upper limit value adjustment value of the current virtual machine, adjusting the tracking connection number upper limit value of the current virtual machine to the upper limit value adjustment value of the current virtual machine.

[0032] In another aspect, the adjusting the tracking connection number upper limit value of each of the virtual machines according to the virtual machine allocatable tracking connection number and the tracking connection number of each of the virtual machines on the host machine comprises:

[0033] adjusting the tracking connection number upper limit value of each of the virtual machines according to the virtual machine allocatable tracking connection number and the tracking connection number of each of the virtual machines on the host machine by configuring a tracking connection domain threshold limit configuration item of a logical switch port in an open virtual network.

[0034] In another aspect, before the determining the required tracking connection number of the host machine according to the historical tracking connection number information of the host machine, further comprising:

[0035] obtaining current tracking connection number information at a preset time interval; wherein the current tracking connection number information comprises the tracking connection number of the host machine and the tracking connection number of each of the virtual machines.

[0036] In another aspect, after the obtaining current tracking connection number information at a preset time interval, further comprising:

[0037] determining whether the total virtual machine tracking connection number is greater than the connection number threshold value; wherein the total virtual machine tracking connection number is the sum of the tracking connection number of each of the virtual machines in the current tracking connection number information;

[0038] if yes, performing the step of determining the required tracking connection number of the host machine according to the historical tracking connection number information of the host machine;

[0039] if no, performing the step of obtaining current tracking connection number information at a preset time interval.

[0040] In another aspect, the connection number threshold value is the product of the sum of the tracking connection number upper limit value of each of the virtual machines and a preset percentage.

[0041] In another aspect, the method further comprises:

[0042] obtaining target connection number information at a preset sampling period; wherein the target connection number information comprises the tracking connection number of the host machine and / or the tracking connection number of each of the virtual machines;

[0043] According to the target connection number information, determine a data fluctuation degree;

[0044] According to the data fluctuation degree, adjust the preset time interval.

[0045] In another aspect, the target connection number information comprises a tracking connection number of each of the virtual machines; and the determining of the data fluctuation degree according to the target connection number information comprises:

[0046] According to a target total tracking connection number corresponding to each of the target connection number information obtained within a preset time period, calculate the data fluctuation degree; wherein the data fluctuation degree is a ratio of a standard deviation to an average value of the target total tracking connection number within the preset time period; and the target total tracking connection number is a sum of the tracking connection numbers of the virtual machines in the corresponding target connection number information.

[0047] The application further provides a tracking connection number control device of a virtual machine, comprising:

[0048] a demand prediction module configured to determine a demand tracking connection number of a host machine according to historical tracking connection number information of the host machine;

[0049] a distribution determination module configured to determine a virtual machine distributable tracking connection number of the host machine according to an upper limit value of a total tracking connection number of the host machine and the demand tracking connection number;

[0050] a control adjustment module configured to adjust an upper limit value of a tracking connection number of each of the virtual machines according to the virtual machine distributable tracking connection number and the tracking connection numbers of the virtual machines on the host machine.

[0051] The application further provides a tracking connection number control device of a virtual machine, comprising:

[0052] a memory configured to store a computer program;

[0053] a processor configured to implement the steps of the tracking connection number control method of the virtual machine as described above when executing the computer program.

[0054] In addition, the application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the tracking connection number control method of the virtual machine as described above.

[0055] The tracking connection number control method of the virtual machine provided by the application comprises the following steps: determining the required tracking connection number of a host computer according to historical tracking connection number information of the host computer; determining the assignable tracking connection number of the virtual machine of the host computer according to the upper limit value of the total tracking connection number of the host computer and the required tracking connection number; and adjusting the upper limit value of the tracking connection number of each virtual machine according to the assignable tracking connection number of the virtual machine and the tracking connection number of each virtual machine on the host computer.

[0056] It can be seen that the total tracking connection number of the host computer is divided into the tracking connection number of the host computer and the tracking connection number of the virtual machine in the application, the required tracking connection number of the host computer is determined according to the historical tracking connection number information of the host computer, the tracking connection number required by the host computer in the future can be predicted, the upper limit value of the tracking connection number of each virtual machine is adjusted under the condition of ensuring the tracking connection number of the host computer in the future, the tracking connection number of the virtual machine can be conveniently and effectively controlled, the normal communication of the host computer is ensured, the resource utilization rate and safety of the host computer are improved, and the performance and reliability of the virtual machine are improved. In addition, the application also provides a tracking connection number control device, equipment and computer readable storage medium of the virtual machine, which also have the above beneficial effects. BRIEF DESCRIPTION OF DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only constitute the embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of the provided drawings.

[0058] Figure 1 The flow chart of the tracking connection number control method of the virtual machine provided by the embodiment of the application;

[0059] Figure 2 The flow chart of the tracking connection number control method of the virtual machine provided by the embodiment of the application;

[0060] Figure 3 The flow chart of the tracking connection number control method of the virtual machine provided by the embodiment of the application;

[0061] Figure 4 The structural block diagram of the tracking connection number control device of the virtual machine provided by the embodiment of the application;

[0062] Figure 5 The structural schematic diagram of the tracking connection number control device of the virtual machine provided by the embodiment of the application. DETAILED DESCRIPTION

[0063] Please refer to Figure 1 ,Figure 1 A flowchart illustrating a service performance evaluation method for a language model provided in an embodiment of the present invention. The method may include:

[0064] Step 101: Determine the required number of tracking connections for the host machine based on the host machine's historical tracking connection count information.

[0065] It is understood that the host machine in this embodiment can be a host device or server with virtual machines configured; the host machine in this embodiment can be configured with virtual machines based on the OVS architecture; for example, the host machine can be configured with virtual machines based on the OVN (Open Virtual Network) architecture. The historical tracking connection count information of the host machine in this embodiment can be information on the tracking connection count of the host machine (i.e., the tracking connection count of the host machine itself outside of the virtual machines) obtained at least twice previously; for example, the historical tracking connection count information includes the tracking connection counts of n host machines obtained at preset time intervals, where n is a positive integer greater than or equal to 2.

[0066] Correspondingly, in this embodiment, the host machine requires tracking the number of connections (e.g.) Figure 2 The number of tracking connections required by the host machine in the data can be the number of tracking connections required by the host machine in the future. For example, the number of tracking connections of the host machine is obtained at a preset time interval (i.e., a preset period). When adjusting the upper limit of the number of tracking connections of each virtual machine, the required number of tracking connections can be the number of tracking connections of the host machine that will be collected at the next preset time interval. That is, after the current number of tracking connections of the host machine is obtained, the number of tracking connections of the host machine that will be obtained at the next acquisition time after the preset time interval (i.e., the required number of tracking connections) is predicted through step 101.

[0067] In other words, in this embodiment, the total number of tracking connections related to the host machine (i.e., the total number of tracking connections) is divided into two parts: the number of tracking connections of virtual machines in the host machine and the number of tracking connections unrelated to virtual machines (i.e., the number of tracking connections of the host machine). In this step, the information of the previously recorded number of tracking connections of the host machine (i.e., the historical number of tracking connections) can be used to predict and determine the number of tracking connections of the host machine in the future (i.e., the number of tracking connections required). For example, the historical number of tracking connections information may include the latest (i.e., the current) number of tracking connections of the host machine and the number of tracking connections of the host machine obtained before that.

[0068] It should be noted that the specific manner of determining the required tracking connection number of the host machine according to the historical tracking connection number information of the host machine in this step can be set by the designer according to the practical scene and user demand, for example, the required tracking connection number of the host machine can be calculated by using a weighted sliding window algorithm according to the historical tracking connection number information of the host machine in this step; wherein the historical tracking connection number information includes the tracking connection numbers of n host machines in the tracking connection numbers of the host machine obtained at preset time intervals, and n is a positive integer greater than or equal to 2; that is, the required tracking connection number can be the tracking connection number of the host machine obtained at a preset time interval after the latest obtained tracking connection number of the host machine. The required tracking connection number of the host machine can also be calculated by using other prediction algorithms (such as a deep learning algorithm or a moving average method) according to the historical tracking connection number information of the host machine. This embodiment does not make any limitation on this.

[0069] Correspondingly, for the specific manner of calculating the required tracking connection number of the host machine by using a weighted sliding window algorithm according to the historical tracking connection number information of the host machine, the designer can set it according to the practical scene and user demand, for example, the quotient of the weighted product value and the weight cumulative value can be calculated to obtain the required tracking connection number; wherein the weighted product value is the sum of the products of the tracking connection numbers of the n host machines and the respective corresponding period weights; the weight cumulative value is the sum of the n period weights; that is, the required tracking connection number (PredictedConn) can be calculated by , Conn i may be the tracking connection number of the i-th host machine in the historical tracking connection number information; Weight i may be the period weight corresponding to the tracking connection number of the i-th host machine.

[0070] Correspondingly, the specific values of the n periodic weights can be set by the designer according to practical scenarios and user requirements, for example, if the acquisition time of the first tracking connection number is later than the acquisition time of the second tracking connection number, the periodic weight corresponding to the first tracking connection number is greater than or equal to the periodic weight corresponding to the second tracking connection number, and the first tracking connection number and the second tracking connection number are any two tracking connection numbers in the n host tracking connection numbers; that is, the periodic weight corresponding to the tracking connection number of the host with the later acquisition time can be greater than or equal to the periodic weight corresponding to the tracking connection number of the host with the earlier acquisition time. For example, the periodic weight corresponding to the tracking connection number of the host with the later acquisition time can be greater than the periodic weight corresponding to the tracking connection number of the host with the earlier acquisition time, that is, when the acquisition time of the first tracking connection number is later than the acquisition time of the second tracking connection number, the periodic weight corresponding to the first tracking connection number is greater than the periodic weight corresponding to the second tracking connection number. For example, when n is 5, the periodic weights corresponding to the tracking connection numbers of the five hosts acquired in the order of later to earlier (that is, from new to old) acquisition time can be 5, 4, 3, 2, and 1, respectively.

[0071] In the embodiment, the specific content of the historical tracking connection number information can be set by the designer, for example, the historical tracking connection number information can include the tracking connection numbers of the n hosts in the tracking connection numbers of the hosts acquired at the preset time intervals; for example, the historical tracking connection number information can include the tracking connection numbers of the first n hosts in the tracking connection numbers of the hosts sorted in the order of new to old acquisition time; the historical tracking connection number information can also include the tracking connection numbers of the first n hosts greater than the preset threshold in the tracking connection numbers of the hosts sorted in the order of new to old acquisition time. The embodiment does not make any limitation on this.

[0072] It can be understood that, for the specific time point of determining the demand tracking connection number of the host according to the historical tracking connection number information of the host in the embodiment, that is, the time point of starting to adjust the upper limit values of the tracking connection numbers of the virtual machines, the designer can set it according to the use scenarios and user requirements, for example, before step 101, the process of acquiring the tracking connection numbers of the hosts at the preset time intervals can also be included, so as to update the historical tracking connection number information of the host by using the tracking connection numbers of the hosts acquired at the preset time intervals, and then enter step 101; for example, before step 101, the process of acquiring the current tracking connection number information at the preset time intervals can also be included; wherein, the current tracking connection number information includes the tracking connection numbers of the hosts and the tracking connection numbers of the virtual machines. In other embodiments, before step 101, the process of acquiring the virtual machine tracking connection number adjustment instruction can also be included, so that in step 101, the demand tracking connection number of the host can be determined by using the historical tracking connection number information of the host according to the acquired virtual machine tracking connection number adjustment instruction. The embodiment does not make any limitation on this.

[0073] Step 102: determining the virtual machine allocable tracking connection number of the host machine according to the total tracking connection number upper limit value of the host machine and the demand tracking connection number.

[0074] In this step, the total tracking connection number upper limit value of the host machine can be the upper limit value of the total tracking connection number of the host machine, such as the value configured by the kernel parameter net.netfilter.nf_conntrack_max; for example, configure net.netfilter.nf_conntrack_max=1000000 to configure the total tracking connection number upper limit value of the host machine as 1 million.

[0075] Correspondingly, the virtual machine allocable tracking connection number in this step can be the sum of the tracking connection numbers allocable to each virtual machine on the subsequent host machine. For the specific way of determining the virtual machine allocable tracking connection number of the host machine according to the total tracking connection number upper limit value of the host machine and the demand tracking connection number in this step, the designer can set it according to the practical scene and user demand, such as directly calculating the difference between the total tracking connection number upper limit value and the demand tracking connection number to obtain the virtual machine allocable tracking connection number. A certain tracking connection number can also be reserved for virtual machines that need more tracking connection numbers, such as determining the virtual machine allocable tracking connection number according to the total tracking connection number upper limit value of the host machine, the demand tracking connection number, and the virtual machine reserved tracking connection number information in this step; for example, when the virtual machine reserved tracking connection number information is a reserved percentage, the product of the connection number difference and the allocation percentage can be calculated to obtain the virtual machine allocable tracking connection number; wherein the connection number difference is the difference between the total tracking connection number upper limit value and the demand tracking connection number, and the allocation percentage is the difference between 1 and the reserved percentage, and the reserved percentage can be a number greater than 0 and less than 1.

[0076] In other embodiments, when the virtual machine reserved tracking connection number information is a preset reserved number, the difference between the connection number difference and the preset reserved number can be calculated in this step to obtain the virtual machine allocable tracking connection number; wherein the connection number difference is the difference between the total tracking connection number upper limit value and the demand tracking connection number.

[0077] Step 103: adjusting the tracking connection number upper limit value of each virtual machine according to the virtual machine allocable tracking connection number and the tracking connection number of each virtual machine on the host machine.

[0078] It can be understood that the tracking connection number upper limit value of the virtual machine in this embodiment can be the upper limit value of limiting the tracking connection number of the virtual machine, that is, the tracking connection number of the virtual machine cannot be greater than the tracking connection number upper limit value. In this step, the tracking connection number upper limit value of each virtual machine is adjusted according to the virtual machine allocable tracking connection number and the tracking connection number of each virtual machine on the host machine, so as to limit the tracking connection number of each virtual machine subsequently.

[0079] Correspondingly, the specific method for adjusting the upper limit of the number of tracking connections for each virtual machine based on the number of tracking connections that can be allocated to the virtual machine and the number of tracking connections for each virtual machine on the host machine in this step can be set by the designer according to the use case and user needs. For example, the allocation ratio of each virtual machine can be determined based on the number of tracking connections for each virtual machine; and the upper limit of the number of tracking connections for each virtual machine can be adjusted based on the number of tracking connections that can be allocated to the virtual machine and the allocation ratio of each virtual machine.

[0080] Correspondingly, the process of determining the allocation ratio of each virtual machine based on the number of tracking connections for each virtual machine can be configured by the designer. For example, the allocation ratio of the current virtual machine can be obtained by calculating the quotient of the current virtual machine's tracking connection count and the total number of tracking connections for all virtual machines; where the current virtual machine is any virtual machine, and the total number of tracking connections for all virtual machines is the sum of the tracking connections for all virtual machines. In other words, through... The current virtual machine's allocation percentage (VMWeight) can be calculated. j ); where VMCurrentConn j VMCurrentConn represents the current number of traced connections for the virtual machine, where m is the number of virtual machines on the host machine. q Let q be the number of tracking connections for the q-th virtual machine. The above process can also be used to calculate the product of the current virtual machine's tracking connection count and its virtual machine weight, and the quotient of the total number of tracking connections for the virtual machines, to obtain the allocation ratio for the current virtual machine; that is, by using the pre-set virtual machine weights for each virtual machine, the number of tracking connections for each virtual machine can be adjusted as needed.

[0081] The process of adjusting the upper limit of tracking connections for each virtual machine based on its allocable tracking connections and its respective allocation percentage can be configured by the designer. For example, the upper limit can be adjusted by multiplying the calculated allocation percentage of the current virtual machine by its allocable tracking connections; where "current virtual machine" refers to any virtual machine. For instance, the upper limit adjustment value can be obtained by multiplying the allocation percentage of the current virtual machine by its allocable tracking connections; the upper limit of tracking connections for the current virtual machine can then be adjusted accordingly. For example, when the reserved percentage is 10%, it can be achieved through... The current virtual machine's upper limit adjustment value (VMConn) is calculated. j ); where TotalConn is the maximum number of total trace connections on the host machine, PredictedConn is the number of required trace connections, and VMWeight j This represents the current allocation percentage for the virtual machine.

[0082] Correspondingly, after the product of the allocation ratio of the current virtual machine and the upper limit value adjustment value of the current virtual machine is calculated, that is, after the upper limit value adjustment value of each virtual machine is determined according to the trackable connection number of the virtual machine and the trackable connection number of each virtual machine on the host machine, it can be judged whether the trackable connection number of the current virtual machine is greater than the upper limit value adjustment value of the current virtual machine; if the trackable connection number of the current virtual machine is greater than the upper limit value adjustment value of the current virtual machine, the trackable connection number upper limit value of the current virtual machine is adjusted to the trackable connection number of the current virtual machine, so as to utilize the reserved trackable connection number, and avoid the case that the allocated trackable connection number (i.e. the trackable connection number upper limit value) is less than the current trackable connection number of the virtual machine; if the trackable connection number of the current virtual machine is not greater than the upper limit value adjustment value of the current virtual machine, the trackable connection number upper limit value of the current virtual machine is adjusted to the upper limit value adjustment value of the current virtual machine.

[0083] Wherein, for the specific process of adjusting the trackable connection number upper limit value of each virtual machine in this step, the designer can set it according to the practical scene and user demand, such as when the virtual machine of OVN architecture is set in the host machine, the trackable connection number upper limit value of each virtual machine can be adjusted by configuring the Ct-zone-limit configuration item of the logical switch port in OVN.

[0084] It can be understood that the specific starting time of step 101 in this embodiment, that is, the time point of starting to adjust the trackable connection number upper limit value of each virtual machine, can be set by the designer according to the use scene and user demand, such as before step 101, the process of obtaining the trackable connection number of the host machine at a preset time interval can also be included, so as to update the historical trackable connection number information of the host machine by using the trackable connection number of the host machine obtained at the preset time interval, and enter step 101; for example, before step 101, the process of obtaining the current trackable connection number information at a preset time interval can also be included; wherein, the current trackable connection number information includes the trackable connection number of the host machine and the trackable connection number of each virtual machine. In other embodiments, step 101 can also include obtaining a virtual machine trackable connection number adjustment instruction, so that in step 101, the demand trackable connection number of the host machine can be determined by using the historical trackable connection number information of the host machine according to the obtained virtual machine trackable connection number adjustment instruction. This embodiment does not make any limitation on this.

[0085] Correspondingly, after the current tracking connection number information is acquired at the preset time interval, it is determined whether the total tracking connection number of the virtual machines is greater than the connection number threshold; wherein the total tracking connection number of the virtual machines is the sum of the tracking connection numbers of the virtual machines in the current tracking connection number information; if yes, step 101 is entered to adjust the upper limit of the tracking connection number of each virtual machine; if no, the step of acquiring the current tracking connection number information at the preset time interval can be executed to acquire the current tracking connection number information again after the preset time interval. Correspondingly, in the case that the total tracking connection number of the virtual machines is not greater than the connection number threshold, the tracking connection number of the host in the current tracking connection number information can also be used to update the historical tracking connection number information of the host.

[0086] In the embodiment, the total tracking connection number of the host is divided into the tracking connection number of the host and the tracking connection number of the virtual machines, the required tracking connection number of the host is determined according to the historical tracking connection number information of the host, the tracking connection number required by the host in the future can be predicted, and thus the upper limit of the tracking connection number of each virtual machine is adjusted under the condition that the tracking connection number of the host in the future is guaranteed, the tracking connection number of the virtual machine can be conveniently and effectively controlled, the normal communication of the host is ensured, the resource utilization and safety of the host are improved, and the performance and reliability of the virtual machine are improved.

[0087] Based on the above embodiment, the embodiment of the present application further provides another method for controlling the tracking connection number of a virtual machine to effectively control the tracking connection number of the virtual machine. Specifically, please refer to Figure 3 , Figure 3 The flowchart of another method for controlling the tracking connection number of a virtual machine provided by the embodiment of the present application; the method can include:

[0088] Step 201: acquiring current tracking connection number information at a preset time interval; wherein the current tracking connection number information includes the tracking connection number of the host and the tracking connection numbers of the virtual machines.

[0089] It can be understood that the tracking connection number of the host and the tracking connection numbers of the virtual machines in the present step can be acquired at a preset time interval. For the specific value setting of the preset time interval in the embodiment, the designer can set it according to the practical scene and user demand, such as a fixed time value, for example, 5 minutes. In order to improve the accuracy of the tracking connection number control of the virtual machine, the embodiment can further include the process of dynamically adjusting the preset time interval, such as acquiring target connection number information at a preset sampling period in the present step; wherein the target connection number information includes the tracking connection number of the host and / or the tracking connection numbers of the virtual machines; determining the data fluctuation degree according to the target connection number information; and adjusting the preset time interval according to the data fluctuation degree.

[0090] Correspondingly, the preset sampling period (e.g., 10 seconds) can be smaller than the preset time interval, so as to dynamically adjust the preset time interval by using the data fluctuation degree within the preset time interval (i.e., the window period). For example, when the target connection number information includes the tracked connection numbers of the virtual machines, the process of determining the data fluctuation degree according to the target connection number information can include: calculating the data fluctuation degree according to the target total tracked connection numbers corresponding to the target connection number information obtained within the preset time period; wherein the data fluctuation degree is the ratio of the standard deviation to the average value of the target total tracked connection numbers within the preset time period; and the target total tracked connection number is the sum of the tracked connection numbers of the virtual machines in the corresponding target connection number information.

[0091] Correspondingly, the process of adjusting the preset time interval according to the data fluctuation degree can include: if the data fluctuation degree is greater than the fluctuation upper threshold, the preset time interval can be adjusted to be reduced; and if the data fluctuation degree is less than the fluctuation lower threshold, the preset time interval can be adjusted to be increased, so as to obtain more stable statistical results.

[0092] Step 202: determining whether the virtual machine total tracked connection number is greater than the connection number threshold; if yes, proceeding to step 203; if no, proceeding to step 201.

[0093] In this step, the virtual machine total tracked connection number can be the sum of the tracked connection numbers of the virtual machines in the current tracked connection number information. In this step, the connection number threshold can be the product of the sum of the upper limit values of the tracked connection numbers of the current virtual machines and a preset percentage (e.g., 90%), or the product of the upper limit value of the total tracked connection number of the host and the preset percentage. Figure 2

[0094] Step 203: calculating the required tracked connection number of the host by using the weighted sliding window algorithm according to the historical tracked connection number information of the host.

[0095] For example, the historical tracked connection number information includes the tracked connection numbers of the first n hosts in the tracked connection numbers of the host sorted from new to old according to the acquisition time; in this step, the required tracked connection number (PredictedConn) can be calculated by ; and Conn i may be the tracked connection number of the i-th host in the historical tracked connection number information; Weight i may be the period weight corresponding to the tracked connection number of the i-th host, for example, when n is 5, the tracked connection numbers of the corresponding hosts from new to old Weight1 to Weight5 can be 5, 4, 3, 2 and 1 respectively.

[0096] ​Step 204: determining the virtual machine allocatable tracking connection number of the host machine according to the total tracking connection upper limit number of the host machine and the demand tracking connection number.

[0097] Step 205: determining the upper limit value adjustment value of each virtual machine according to the virtual machine allocatable tracking connection number and the tracking connection number of each virtual machine on the host machine.

[0098] For example, in steps 204 and 205, the upper limit value adjustment value of the current virtual machine (VMConnAdjust) can be calculated by , so as to determine the upper limit value adjustment value of each virtual machine; wherein TotalConn is the total tracking connection upper limit number of the host machine, PredictedConn is the demand tracking connection number; VMWeight is the allocation proportion of the current virtual machine, j , VMCurrentConn is the tracking connection number of the current virtual machine, m is the number of virtual machines on the host machine, and VMCurrentConn is the tracking connection number of the qth virtual machine. j j q

[0099] Step 206: determining whether the tracking connection number of the current virtual machine is greater than the upper limit value adjustment value of the current virtual machine; if yes, entering step 207; if no, entering step 208.

[0100] Wherein the current virtual machine is any virtual machine.

[0101] Step 207: adjusting the tracking connection upper limit value of the current virtual machine to the tracking connection number of the current virtual machine.

[0102] It can be understood that in this step, when the tracking connection number of the current virtual machine is greater than the upper limit value adjustment value of the current virtual machine, the reserved tracking connection number (such as ) can be used to make the tracking connection upper limit value of the current virtual machine meet the current use demand.

[0103] Step 208: adjusting the tracking connection upper limit value of the current virtual machine to the upper limit value adjustment value of the current virtual machine.

[0104] For example, in this step, the tracking connection upper limit value of the current virtual machine can be adjusted to the upper limit value adjustment value of the current virtual machine by configuring the tracking connection domain threshold limit (Ct-zone-limit) configuration item of the logical switch port (logical_switch_port) in OVN.

[0105] ​​​​In the embodiment, by judging whether the total tracking connection number of the virtual machine is greater than the connection number threshold, the control times of the tracking connection number of the virtual machine can be reduced, and the waste of computing resources can be avoided; by judging whether the tracking connection number of the current virtual machine is greater than the upper limit value adjustment value of the current virtual machine, the performance and reliability of each virtual machine can be ensured as much as possible.

[0106] Corresponding to the above method embodiment, the embodiment of the application further provides a virtual machine tracking connection number control device. The virtual machine tracking connection number control device described below can be referred to in correspondence with the virtual machine tracking connection number control method described above.

[0107] Please refer to Figure 4 , Figure 4 A structural block diagram of a virtual machine tracking connection number control device provided by the embodiment of the application is shown in FIG. 1. The device can include:

[0108] A demand prediction module 10 is configured to determine a demand tracking connection number of a host machine according to historical tracking connection number information of the host machine.

[0109] A distribution determination module 20 is configured to determine a virtual machine distributable tracking connection number of the host machine according to an upper limit value of a total tracking connection number of the host machine and the demand tracking connection number.

[0110] A control adjustment module 30 is configured to adjust an upper limit value of a tracking connection number of each virtual machine according to the virtual machine distributable tracking connection number and the tracking connection number of each virtual machine on the host machine.

[0111] In some embodiments, the demand prediction module 10 can be specifically configured to calculate the demand tracking connection number by using a weighted sliding window algorithm according to the historical tracking connection number information; wherein the historical tracking connection number information includes tracking connection numbers of n host machines in tracking connection numbers of the host machine obtained at preset time intervals, and n is a positive integer greater than or equal to 2.

[0112] In some embodiments, the demand prediction module 10 can include:

[0113] A demand calculation sub-module is configured to calculate a quotient of a weighted product value and a weight accumulation value to obtain the demand tracking connection number; wherein the weighted product value is a sum of products of the tracking connection numbers of the n host machines and respective corresponding period weights; the weight accumulation value is a sum of the n period weights; if an acquisition time of a first tracking connection number is later than an acquisition time of a second tracking connection number, a period weight corresponding to the first tracking connection number is greater than or equal to a period weight corresponding to the second tracking connection number; the first tracking connection number and the second tracking connection number are any two tracking connection numbers in the tracking connection numbers of the n host machines.

[0114] In some embodiments, the historical tracking connection number information comprises tracking connection numbers of top n hosts in tracking connection numbers of the hosts sorted from new to old by acquisition time.

[0115] In some embodiments, the allocation determining module 20 can be specifically configured to calculate a difference between the total tracking connection number upper limit value and the required tracking connection number, to obtain the virtual machine allocatable tracking connection number.

[0116] In some embodiments, the allocation determining module 20 can be specifically configured to determine the virtual machine allocatable tracking connection number according to the total tracking connection number upper limit value of the host, the required tracking connection number, and the virtual machine reserved tracking connection number information.

[0117] In some embodiments, the virtual machine reserved tracking connection number information is a reserved percentage; the allocation determining module 20 can comprise:

[0118] an allocation calculating submodule configured to calculate a product of the connection number difference value and the allocation percentage, to obtain the virtual machine allocatable tracking connection number; wherein the connection number difference value is a difference between the total tracking connection number upper limit value and the required tracking connection number, and the allocation percentage is a difference between 1 and the reserved percentage.

[0119] In some embodiments, the control adjusting module 30 can comprise:

[0120] a proportion calculating submodule configured to determine respective allocation proportions of the virtual machines according to the tracking connection numbers of the virtual machines;

[0121] an adjustment calculating submodule configured to adjust the tracking connection number upper limit values of the virtual machines according to the virtual machine allocatable tracking connection number and the respective allocation proportions of the virtual machines.

[0122] In some embodiments, the proportion calculating submodule can be specifically configured to calculate a quotient of the tracking connection number of a current virtual machine and a total tracking connection number of the virtual machines, to obtain the allocation proportion of the current virtual machine; wherein the current virtual machine is any virtual machine, and the total tracking connection number of the virtual machines is a sum of the tracking connection numbers of the virtual machines.

[0123] In some embodiments, the adjustment calculating submodule can be specifically configured to adjust the tracking connection number upper limit value of the current virtual machine by a product of the calculated allocation proportion of the current virtual machine and the virtual machine allocatable tracking connection number; wherein the current virtual machine is any virtual machine.

[0124] In some embodiments, the control adjusting module 30 can comprise:

[0125] an adjustment determining submodule configured to determine upper limit value adjustment values of the virtual machines according to the virtual machine allocatable tracking connection number and the tracking connection numbers of the virtual machines on the host;

[0126] The adjustment judgment submodule is configured to judge whether the tracking connection number of the current virtual machine is greater than the upper limit value adjustment value of the current virtual machine; wherein the current virtual machine is any virtual machine.

[0127] The first adjustment submodule is configured to adjust the tracking connection number upper limit value of the current virtual machine to the tracking connection number of the current virtual machine if the tracking connection number of the current virtual machine is greater than the upper limit value adjustment value of the current virtual machine.

[0128] The second adjustment submodule is configured to adjust the tracking connection number upper limit value of the current virtual machine to the upper limit value adjustment value of the current virtual machine if the tracking connection number of the current virtual machine is not greater than the upper limit value adjustment value of the current virtual machine.

[0129] In some embodiments, the control adjustment module 30 can be specifically configured to adjust the tracking connection number upper limit value of each virtual machine by configuring the tracking connection domain threshold limit configuration item of the logical switch port in the open virtual network according to the virtual machine allocable tracking connection number and the tracking connection number of each virtual machine on the host machine.

[0130] In some embodiments, the device can further comprise:

[0131] The period acquisition submodule is configured to acquire the current tracking connection number information at a preset time interval; wherein the current tracking connection number information comprises the tracking connection number of the host machine and the tracking connection number of each virtual machine.

[0132] In some embodiments, the device can further comprise:

[0133] The start judgment module is configured to judge whether the total tracking connection number of the virtual machine is greater than the connection number threshold value; if yes, a start signal is sent to the demand prediction module 10; if no, a start signal is sent to the period acquisition submodule; wherein the total tracking connection number of the virtual machine is the sum of the tracking connection number of each virtual machine in the current tracking connection number information.

[0134] In some embodiments, the connection number threshold value is the product of the sum of the tracking connection number upper limit value of each virtual machine and a preset percentage.

[0135] In some embodiments, the device can further comprise:

[0136] The period sampling module is configured to acquire the target connection number information at a preset sampling period; wherein the target connection number information comprises the tracking connection number of the host machine and / or the tracking connection number of each virtual machine.

[0137] The fluctuation determination module is configured to determine the data fluctuation degree according to the target connection number information.

[0138] The period adjustment module is configured to adjust the preset time interval according to the data fluctuation degree.

[0139] In some embodiments, the fluctuation determining module can be specifically configured to calculate the data fluctuation degree according to the target total tracking connection numbers corresponding to the target connection number information acquired in the preset time period respectively; wherein the data fluctuation degree is the ratio of the standard deviation and the average value of the target total tracking connection numbers in the preset time period; and the target total tracking connection number is the sum of the tracking connection numbers of the virtual machines in the corresponding target connection number information.

[0140] In the embodiment, the host machine total tracking connection number is divided into the tracking connection number of the host machine and the tracking connection number of the virtual machine, the demand prediction module 10 determines the demand tracking connection number of the host machine according to the historical tracking connection number information of the host machine, and the demand tracking connection number of the host machine in the subsequent period is predicted, so that the upper limit of the tracking connection number of each virtual machine is adjusted under the condition that the tracking connection number of the subsequent host machine is ensured, the tracking connection number of the virtual machine is conveniently and effectively controlled, the normal communication of the host machine is ensured, the resource utilization rate and the security of the host machine are improved, and the performance and the reliability of the virtual machine are improved.

[0141] Corresponding to the above method embodiments, the embodiment of the application further provides a virtual machine tracking connection number control device, and the virtual machine tracking connection number control device described below can be mutually corresponding with reference to the virtual machine tracking connection number control method described above.

[0142] Please refer to Figure 5 , Figure 5 The structure diagram of a virtual machine tracking connection number control device provided by the embodiment of the application is shown in FIG. 1. The device can include:

[0143] The memory D1 is configured to store a computer program.

[0144] The processor D2 is configured to execute the computer program to realize the steps of the virtual machine tracking connection number control method provided by the method embodiments.

[0145] The virtual machine tracking connection number control device provided by the embodiment of the application can be specifically a host machine of the virtual machine, such as a host device or a server.

[0146] Corresponding to the above method embodiments, the embodiment of the application further provides a computer program product, and the computer program product described below can be mutually corresponding with reference to the virtual machine tracking connection number control method described above.

[0147] The computer program product includes a computer program / instruction, which realizes the steps of the virtual machine tracking connection number control method provided by the method embodiments when executed by the processor.

[0148] Corresponding to the above method embodiments, the embodiments of the present application also provide a computer readable storage medium. The computer readable storage medium described below can be referred to the tracking connection number control method of the virtual machine described above.

[0149] A computer readable storage medium, the computer readable storage medium stores a computer program, the computer program is executed by a processor to implement the steps of the tracking connection number control method of the virtual machine provided by the above method embodiments.

[0150] The computer readable storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various readable storage media that can store program codes.

[0151] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device, the equipment, the computer readable storage medium and the computer program product disclosed by the embodiments, since they correspond to the method disclosed by the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.

[0152] The above describes the tracking connection number control method, the device, the equipment and the computer readable storage medium of the virtual machine provided by the present application in detail. The principle and the implementation mode of the present application are described by applying specific examples in this paper. The above embodiment is only used to help understand the method and the core idea of the present application. It should be pointed out that the ordinary skilled in the art can make some improvements and modifications to the present application without departing from the principle of the present application. These improvements and modifications also fall within the protection scope of the present application.

Claims

1. A method of controlling the number of connections of a virtual machine, characterized by, The method comprises the following steps: determining a required tracking connection number of the host machine according to historical tracking connection number information of the host machine; determining a virtual machine allocatable tracking connection number of the host machine according to a total tracking connection number upper limit value of the host machine and the required tracking connection number; adjusting tracking connection number upper limit values of virtual machines on the host machine according to the virtual machine allocatable tracking connection number and tracking connection numbers of the virtual machines on the host machine; the determining of the virtual machine allocatable tracking connection number according to the total tracking connection number upper limit value of the host machine and the required tracking connection number comprises: calculating a difference between the total tracking connection number upper limit value and the required tracking connection number to obtain the virtual machine allocatable tracking connection number.

2. The method of claim 1, wherein, the determining of the required tracking connection number of the host machine according to the historical tracking connection number information of the host machine comprises: calculating the required tracking connection number by using a weighted sliding window algorithm according to the historical tracking connection number information; wherein the historical tracking connection number information comprises n tracking connection numbers of the host machine obtained at preset time intervals, and n is a positive integer greater than or equal to 2.

3. The method of claim 2, wherein the number of connections is determined by the following equation: ###0001### where N is the number of connections, and C is the number of virtual machines. the calculating of the required tracking connection number by using the weighted sliding window algorithm according to the historical tracking connection number information comprises: calculating a quotient of a weighted product value and a weight accumulation value to obtain the required tracking connection number; wherein the weighted product value is a sum of products of n tracking connection numbers of the host machine and respective corresponding period weights, the weight accumulation value is a sum of n period weights, and if a first tracking connection number is obtained later than a second tracking connection number, a period weight corresponding to the first tracking connection number is greater than or equal to a period weight corresponding to the second tracking connection number.

4. The method of claim 2, wherein the number of connections is determined by the following equation: ###0001### where N is the number of connections, and C is the number of virtual machines. the historical tracking connection number information comprises n tracking connection numbers of the host machine sorted from new to old according to obtaining time.

5. The method of claim 1, wherein the number of connections is tracked for each virtual machine. the determining of the virtual machine allocatable tracking connection number according to the total tracking connection number upper limit value of the host machine, the required tracking connection number and virtual machine reserved tracking connection number information comprises: determining the virtual machine allocatable tracking connection number according to the total tracking connection number upper limit value of the host machine, the required tracking connection number and the virtual machine reserved tracking connection number information.

6. The method of claim 5, wherein, the virtual machine reserved tracking connection number information is a reserved percentage, and the determining of the virtual machine allocatable tracking connection number according to the total tracking connection number upper limit value of the host machine, the required tracking connection number and the virtual machine reserved tracking connection number information comprises: calculating a product of a tracking connection number difference value and an allocation percentage to obtain the virtual machine allocatable tracking connection number; wherein the tracking connection number difference value is a difference between the total tracking connection number upper limit value and the required tracking connection number, and the allocation percentage is a difference between 1 and the reserved percentage.

7. The method of claim 1, wherein the number of connections is tracked for each virtual machine. the adjusting of the tracking connection number upper limit values of the virtual machines according to the virtual machine allocatable tracking connection number and the tracking connection numbers of the virtual machines on the host machine comprises: determining an allocation proportion of each of the virtual machines according to the tracking connection numbers of the virtual machines; adjusting the tracking connection number upper limit value of each of the virtual machines according to the virtual machine distributable tracking connection number and the allocation proportion of each of the virtual machines.

8. The method of claim 7, wherein the number of connections is determined by the following equation: ###0001### where N is the number of connections, and C is the number of virtual machines. The method further includes: calculating a quotient of the tracking connection number of a current virtual machine and a total tracking connection number of the virtual machines to obtain an allocation proportion of the current virtual machine, wherein the current virtual machine is any one of the virtual machines, and the total tracking connection number of the virtual machines is a sum of the tracking connection numbers of the virtual machines.

9. The method of claim 7, wherein the number of connections is tracked for each virtual machine. The method further includes: adjusting the tracking connection number upper limit value of the current virtual machine by using a product of the calculated allocation proportion of the current virtual machine and the virtual machine distributable tracking connection number, wherein the current virtual machine is any one of the virtual machines.

10. The method of claim 1, wherein, The method further includes: determining an upper limit value adjustment value of each of the virtual machines according to the virtual machine distributable tracking connection number and the tracking connection numbers of the virtual machines on the host machine; determining an upper limit value adjustment value of each of the virtual machines according to the virtual machine distributable tracking connection number and the tracking connection numbers of the virtual machines on the host machine; determining an upper limit value adjustment value of each of the virtual machines according to the virtual machine distributable tracking connection number and the tracking connection numbers of the virtual machines on the host machine; determining an upper limit value adjustment value of each of the virtual machines according to the virtual machine distributable tracking connection number and the tracking connection numbers of the virtual machines on the host machine; 11. The method of claim 1, wherein, determining an upper limit value adjustment value of each of the virtual machines according to the virtual machine distributable tracking connection number and the tracking connection numbers of the virtual machines on the host machine. The method further includes:

12. The method of claim 1 to 11, wherein, acquiring current tracking connection number information at a preset time interval, wherein the current tracking connection number information includes the tracking connection number of the host machine and the tracking connection numbers of the virtual machines. The method further includes:

13. The method of claim 12, wherein the number of connections is tracked for each virtual machine. determining whether the total tracking connection number of the virtual machines is greater than the connection number threshold value, wherein the total tracking connection number of the virtual machines is a sum of the tracking connection numbers of the virtual machines in the current tracking connection number information; if yes, performing the step of determining the demand tracking connection number of the host machine according to the historical tracking connection number information of the host machine; if no, performing the step of acquiring the current tracking connection number information at the preset time interval. ​ 14. The method of claim 13, wherein, The connection number threshold is a product of a sum of upper limits of the tracking connection numbers of the virtual machines and a preset percentage.

15. The method of claim 12, wherein the number of connections is tracked for each virtual machine. Further comprising: acquiring target connection number information according to a preset sampling period; wherein the target connection number information comprises the tracking connection number of the host and / or the tracking connection numbers of the virtual machines; determining a data fluctuation degree according to the target connection number information; adjusting the preset time interval according to the data fluctuation degree.

16. The method of claim 15, wherein, The target connection number information comprises the tracking connection numbers of the virtual machines; and the determining of the data fluctuation degree according to the target connection number information comprises: calculating the data fluctuation degree according to target total tracking connection numbers corresponding to each target connection number information acquired within a preset time period; wherein the data fluctuation degree is a ratio of a standard deviation to an average value of the target total tracking connection numbers within the preset time period; and the target total tracking connection number is a sum of the tracking connection numbers of the virtual machines in the corresponding target connection number information.

17. An apparatus for controlling the number of connections of a virtual machine, characterized by comprising: comprising: a demand prediction module configured to determine a demand tracking connection number of the host according to historical tracking connection number information of the host; an allocation determination module configured to determine a virtual machine allocable tracking connection number of the host according to an upper limit of a total tracking connection number of the host and the demand tracking connection number; a control adjustment module configured to adjust upper limits of the tracking connection numbers of the virtual machines according to the virtual machine allocable tracking connection number and the tracking connection numbers of the virtual machines on the host; The allocation determination module is specifically configured to calculate a difference between the upper limit of the total tracking connection number and the demand tracking connection number to obtain the virtual machine allocable tracking connection number.

18. A virtual machine's tracking connection number control apparatus, characterized by, comprising: a memory configured to store a computer program; a processor configured to implement the steps of the virtual machine tracking connection number control method according to any one of claims 1 to 16 when executing the computer program.

19. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium and is executed by the processor to implement the steps of the virtual machine tracking connection number control method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Method and device for controlling connection number of virtual machine

    CN106161551A

  • Resource management method and device for storage access service, equipment and storage medium

    CN117170807A