Tracking connection number control method and device of virtual machine, equipment and medium
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.
Patent Information
- Application Number
- CN202511454339.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-10-13
AI Technical Summary
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.
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.
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.
Smart Images

Figure CN120929194A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of virtualization technology, and in particular to a method, apparatus, device, and medium for controlling the number of tracking connections of a virtual machine. Background Technology
[0002] With the development of cloud computing and virtualization technologies, virtual machines (VMs) have become an important component of enterprise IT (Information Technology) infrastructure. However, the resource consumption of VMs, especially the number of trace connections, has become an increasingly prominent issue. The number of trace connections refers to the number of connections established between a VM and an external network or other VMs; these connections are crucial for the normal operation of the VM. However, when a VM consumes too many trace connections, it affects the host machine's ability to establish trace connections, thereby impacting the host machine's communication; this problem is particularly pronounced in the widely used OVS (Open vSwitch, a multi-tiered virtual switch) architecture.
[0003] In related technologies, the control of the number of traced connections in traditional virtual machine management systems typically relies on static configuration and simple resource allocation algorithms. These methods cannot effectively cope with the dynamic changes of virtual machines and complex network environments. Therefore, how to conveniently and effectively control the number of traced connections of virtual machines to ensure normal communication of the host machine, improve the resource utilization and security of the host machine, and improve the performance and reliability of virtual machines is an urgent problem to be solved. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, device, and computer-readable storage medium for controlling the number of tracking connections of a virtual machine, so as to conveniently and effectively control the number of tracking connections of the virtual machine, ensure normal communication of the host machine, and improve the resource utilization and security of the host machine.
[0005] To address the aforementioned technical problems, this invention provides a method for controlling the number of tracking connections in a virtual machine, comprising: The required number of tracking connections for the host machine is determined based on the host machine's historical tracking connection count information; The number of tracking connections that can be allocated to virtual machines on the host machine is determined based on the maximum total number of tracking connections on the host machine and the required number of tracking connections. The upper limit of the number of tracking connections for each virtual machine is adjusted 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.
[0006] On the other hand, determining the required number of tracking connections for the host machine based on the host machine's historical tracking connection information includes: Based on the historical tracking connection count information, the required tracking connection count is calculated using a weighted sliding window algorithm; wherein, the historical tracking connection count information includes n tracking connection counts of the host machine obtained at preset time intervals, where n is a positive integer greater than or equal to 2.
[0007] On the other hand, based on the historical tracking connection number information, the demand tracking connection number is calculated using a weighted sliding window algorithm, including: The demand tracking connection number is obtained by calculating the quotient of the weighted product value and the weighted sum value; wherein, the weighted product value is the sum of the products of the tracking connection number of each of the n host machines and their respective period weights; the weighted sum value is the sum of the period weights of the n host machines; if the acquisition time of the first tracking connection number is later than the acquisition time of the second tracking connection number, then 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 among the tracking connection numbers of the n host machines.
[0008] On the other hand, the historical tracking connection information includes the tracking connection counts of the first n hosts, sorted by acquisition time from newest to oldest.
[0009] On the other hand, determining the number of virtual machines that can be allocated to the host machine based on the upper limit of the total number of tracking connections of the host machine and the required number of tracking connections includes: The difference between the upper limit of the total number of tracking connections and the required number of tracking connections is calculated to obtain the number of tracking connections that the virtual machine can allocate.
[0010] On the other hand, determining the number of virtual machines that can be allocated to the host machine based on the upper limit of the total number of tracking connections of the host machine and the required number of tracking connections includes: The number of tracking connections that can be allocated to the virtual machine is determined based on the maximum total number of tracking connections of the host machine, the required number of tracking connections, and the number of tracking connections reserved for the virtual machine.
[0011] On the other hand, the virtual machine reserved tracking connection information is a reserved percentage; the determination of the number of tracking connections that can be allocated to the virtual machine based on the host machine's total tracking connection limit, the required tracking connection number, and the virtual machine's reserved tracking connection information includes: The number of tracking connections that can be allocated to the virtual machine is obtained by multiplying the connection number difference by the allocation percentage; wherein the connection number difference is the difference between the upper limit of the total number of tracking connections and the number of tracking connections required, and the allocation percentage is the difference between 1 and the reserved percentage.
[0012] On the other hand, 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 includes: The allocation ratio of each virtual machine is determined based on the number of tracking connections for each virtual machine. The upper limit of the number of tracking connections for each virtual machine is adjusted based on the number of tracking connections that can be allocated to the virtual machine and the allocation ratio of each virtual machine.
[0013] On the other hand, determining the allocation ratio of each virtual machine based on the number of tracking connections of each virtual machine includes: The allocation ratio of the current virtual machine is obtained by calculating the quotient of the current virtual machine's tracking connection count and the total number of tracking connections of the virtual machines; wherein, the current virtual machine is any one of the virtual machines, and the total number of tracking connections of the virtual machines is the sum of the tracking connections of all the virtual machines.
[0014] On the other hand, 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 allocation ratio of each virtual machine includes: The upper limit of the number of tracking connections for the current virtual machine is adjusted by multiplying the calculated allocation ratio of the current virtual machine by the number of tracking connections that the virtual machine can be allocated; wherein, the current virtual machine is any of the virtual machines.
[0015] On the other hand, 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 includes: Based on the number of tracking connections that can be allocated to the virtual machine and the number of tracking connections of each virtual machine on the host machine, determine the upper limit adjustment value for each virtual machine; Determine whether the number of tracking connections of the current virtual machine is greater than the upper limit adjustment value of the current virtual machine; wherein, the current virtual machine is any of the aforementioned virtual machines; If the current number of traced connections of the virtual machine is greater than the upper limit adjustment value of the current virtual machine, then the upper limit of the current number of traced connections of the virtual machine will be adjusted to the current number of traced connections of the virtual machine. If the current number of traced connections for the virtual machine is not greater than the current virtual machine's upper limit adjustment value, then the current virtual machine's upper limit for traced connections will be adjusted to the current virtual machine's upper limit adjustment value.
[0016] On the other hand, 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 includes: Based on the number of tracking connections that can be allocated to the virtual machine and the number of tracking connections of each virtual machine on the host machine, the upper limit of the number of tracking connections for each virtual machine is adjusted by configuring the tracking connection domain threshold limit configuration item of the logical switch port in the open virtual network.
[0017] On the other hand, before determining the required number of tracking connections for the host machine based on the host machine's historical tracking connection information, the method further includes: The current tracking connection count information is obtained at preset time intervals; wherein, the current tracking connection count information includes the tracking connection count of the host machine and the tracking connection count of each virtual machine.
[0018] On the other hand, after acquiring the current number of tracking connections at preset time intervals, the method further includes: Determine whether the total number of virtual machine tracking connections is greater than the connection number threshold; wherein, the total number of virtual machine tracking connections is the sum of the tracking connection numbers of each virtual machine in the current tracking connection number information; If so, then the step of determining the required number of tracking connections for the host machine based on the host machine's historical tracking connection information is executed; If not, then proceed with the step of obtaining the current number of tracking connections at preset time intervals.
[0019] On the other hand, the connection threshold is the product of the sum of the upper limits of the tracking connections of each virtual machine and a preset percentage.
[0020] On the other hand, the method also includes: The target connection count information is obtained according to a preset sampling period; wherein, the target connection count information includes the tracking connection count of the host machine and / or the tracking connection count of each virtual machine; Based on the target connection number information, determine the degree of data fluctuation; The preset time interval is adjusted based on the degree of data fluctuation.
[0021] On the other hand, the target connection count information includes the tracking connection count of each of the virtual machines; determining the data fluctuation level based on the target connection count information includes: The data fluctuation level is calculated based on the total target tracking connection number corresponding to each target connection number information obtained within a preset time period; wherein, the data fluctuation level is the ratio of the standard deviation to the average value of the total target tracking connection number within the preset time period; and the total target tracking connection number is the sum of the tracking connection numbers of each virtual machine in the corresponding target connection number information.
[0022] The present invention also provides a device for controlling the number of tracking connections in a virtual machine, comprising: The demand prediction module is used to determine the number of demand tracking connections for the host machine based on the host machine's historical tracking connection information. The allocation determination module is used to determine the number of virtual machines that can be allocated to the host machine based on the upper limit of the total number of tracking connections of the host machine and the required number of tracking connections; The control adjustment module is used to adjust 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.
[0023] The present invention also provides a device for controlling the number of tracking connections for a virtual machine, comprising: Memory, used to store computer programs; A processor, used to implement the steps of the virtual machine tracking connection number control method as described above when executing the computer program.
[0024] Furthermore, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the virtual machine tracking connection number control method described above.
[0025] The present invention provides a method for controlling the number of tracking connections of a virtual machine, comprising: determining the required number of tracking connections of the host machine based on the historical tracking connection information of the host machine; determining the number of tracking connections that can be allocated to virtual machines on the host machine based on the total upper limit of tracking connections of the host machine and the required number of tracking connections; and adjusting the upper limit of the number of tracking connections of each virtual machine based on the number of tracking connections that can be allocated to virtual machines and the number of tracking connections of each virtual machine on the host machine.
[0026] As can be seen, this invention divides the total number of tracking connections on the host machine into two parts: the number of tracking connections on the host machine and the number of tracking connections on the virtual machines. By determining the required number of tracking connections on the host machine based on its historical tracking connection information, it can predict the number of tracking connections required by the host machine in the future. Therefore, while ensuring the number of tracking connections on the host machine in the future, the upper limit of the number of tracking connections on each virtual machine can be adjusted. This allows for convenient and effective control of the number of tracking connections on the virtual machines, ensuring normal communication on the host machine, improving the resource utilization and security of the host machine, and improving the performance and reliability of the virtual machines. Furthermore, this invention also provides a virtual machine tracking connection control device, equipment, and computer-readable storage medium, which also have the above-mentioned beneficial effects. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0028] Figure 1 A flowchart illustrating a method for controlling the number of tracking connections in a virtual machine, provided as an embodiment of the present invention; Figure 2 This is a flowchart illustrating another method for controlling the number of tracking connections in a virtual machine, provided in an embodiment of the present invention. Figure 3 A flowchart illustrating another method for controlling the number of tracking connections in a virtual machine, provided as an embodiment of the present invention; Figure 4 This is a structural block diagram of a virtual machine tracking connection number control device provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a virtual machine tracking connection number control device provided in an embodiment of the present invention. Detailed Implementation
[0029] 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: Step 101: Determine the required number of tracking connections for the host machine based on the host machine's historical tracking connection count information.
[0030] 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.
[0031] Correspondingly, in this embodiment, the host machine requires tracking the number of connections (e.g.) Figure 2The 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.
[0032] 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.
[0033] It should be noted that the specific method for determining the required tracking connection number of the host machine based on the historical tracking connection number information in this step can be set by the designer according to the practical scenario and user needs. For example, in this step, the required tracking connection number of the host machine can be calculated using a weighted sliding window algorithm based on the historical tracking connection number information of the host machine. The historical tracking connection number information includes the tracking connection numbers of the host machine obtained at preset time intervals, where n is a positive integer greater than or equal to 2. In other words, the required tracking connection number can be the tracking connection number of the host machine obtained one preset time interval after the most recently obtained predicted tracking connection number. Alternatively, other prediction algorithms (such as deep learning algorithms or moving average methods) can be used to calculate the required tracking connection number of the host machine based on the historical tracking connection number information. This embodiment does not impose any restrictions on this.
[0034] Correspondingly, the specific method for calculating the host's demand tracking connection count using the weighted sliding window algorithm based on the host's historical tracking connection count information can be customized by the designer according to the practical scenario and user needs. For example, the demand tracking connection count can be obtained by calculating the quotient of the weighted product value and the weighted summation value; where the weighted product value is the sum of the products of the tracking connection count of each of the n host machines and their respective period weights; and the weighted summation value is the sum of the weights of the n periods; that is, it can be achieved through... Calculate the number of demand tracking connections (PredictedConn); Conn iThis can be the number of tracking connections for the i-th host in the historical tracking connection count information; Weight i It can be the periodic weight corresponding to the number of tracking connections of the i-th host.
[0035] Accordingly, the specific values of the n period weights can be set by the designers according to practical scenarios and user needs. For example, if the acquisition time of the first tracking connection is later than the acquisition time of the second tracking connection, then the period weight corresponding to the first tracking connection is greater than or equal to the period weight corresponding to the second tracking connection. The first and second tracking connections can be any two tracking connections from the n host machines. In other words, the period weight corresponding to the tracking connection of the host machine with a later acquisition time can be greater than or equal to the period weight corresponding to the tracking connection of the host machine with an earlier acquisition time. For example, the period weight corresponding to the tracking connection of the host machine with a later acquisition time can be greater than the period weight corresponding to the tracking connection of the host machine with an earlier acquisition time. That is, when the acquisition time of the first tracking connection is later than the acquisition time of the second tracking connection, the period weight corresponding to the first tracking connection is greater than the period weight corresponding to the second tracking connection. For example, when n is 5, the period weights corresponding to the tracking connections of the 5 host machines acquired in order of later to earlier (i.e., from newest to oldest) can be 5, 4, 3, 2, and 1, respectively.
[0036] The specific content of the historical tracking connection count information can be set by the designer. For example, the historical tracking connection count information may include the tracking connection counts of n hosts obtained at preset time intervals; for instance, it may include the tracking connection counts of the first n hosts sorted by acquisition time from newest to oldest; or it may include the tracking connection counts of the first n hosts whose tracking connection counts are greater than a preset threshold, sorted by acquisition time from newest to oldest. This embodiment does not impose any limitations on this.
[0037] It is understood that the specific time point for determining the required tracking connection count of the host machine based on the historical tracking connection count information of the host machine in this embodiment, i.e., the time point for initiating the adjustment of the upper limit of the tracking connection count of each virtual machine, can be set by the designer according to the usage scenario and user needs. For example, before step 101, there may be a process of obtaining the tracking connection count of the host machine at a preset time interval, so as to update the historical tracking connection count information of the host machine using the tracking connection count of the host machine obtained at the preset time interval, and then proceed to step 101; for example, before step 101, there may be a process of obtaining the current tracking connection count information at a preset time interval; wherein, the current tracking connection count information includes the tracking connection count of the host machine and the tracking connection count of each virtual machine. In some other embodiments, before step 101, there may be a process of obtaining virtual machine tracking connection count adjustment instructions, so that in step 101, the required tracking connection count of the host machine can be determined based on the obtained virtual machine tracking connection count adjustment instructions and the historical tracking connection count information of the host machine. This embodiment does not impose any restrictions on this.
[0038] Step 102: Determine the number of tracking connections that can be allocated to the virtual machines on the host machine based on the host machine's total maximum number of tracking connections and the required number of tracking connections.
[0039] In this step, the upper limit of the total number of tracking connections on the host machine can be the upper limit of the total number of tracking connections on the host machine, such as the value configured on the kernel parameter net.netfilter.nf_conntrack_max; for example, configuring net.netfilter.nf_conntrack_max=1000000 will configure the upper limit of the total number of tracking connections on the host machine to 1 million.
[0040] Correspondingly, the number of tracking connections that can be allocated to virtual machines in this step can be the sum of the number of tracking connections that can be allocated to each virtual machine on the host machine. The specific method for 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 limit and the required tracking connection count in this step can be set by the designer according to the practical scenario and user needs. For example, the difference between the total tracking connection limit and the required tracking connection count can be directly calculated to obtain the number of tracking connections that can be allocated to virtual machines. Alternatively, a certain number of tracking connections can be reserved to allocate to virtual machines that require more tracking connections. For example, in this step, the number of tracking connections that can be allocated to virtual machines can be determined based on the host machine's total tracking connection limit, the required tracking connection count, and the reserved tracking connection count information of the virtual machines. For instance, when the reserved tracking connection count information of the virtual machines is a reservation percentage, the product of the connection difference and the allocation percentage can be calculated to obtain the number of tracking connections that can be allocated to virtual machines. Here, the connection difference is the difference between the total tracking connection limit and the required tracking connection count, and the allocation percentage is the difference between 1 and the reservation percentage. The reservation percentage can be a value greater than 0 and less than 1.
[0041] In other embodiments, when the virtual machine reserves the number of tracking connections as a preset reserved number, this step can calculate the difference between the connection number difference and the preset reserved number to obtain the number of tracking connections that the virtual machine can allocate; wherein, the connection number difference is the difference between the upper limit of the total number of tracking connections and the required number of tracking connections.
[0042] Step 103: Adjust 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.
[0043] It is understood that the upper limit of the number of tracking connections for a virtual machine in this embodiment can be a limit on the number of tracking connections for a virtual machine, that is, the number of tracking connections for a virtual machine cannot exceed the upper limit of the number of tracking connections. In this step, the upper limit of the number of tracking connections for each virtual machine is adjusted according to 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, so as to limit the number of tracking connections for each virtual machine in the future.
[0044] 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.
[0045] 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.
[0046] 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.
[0047] Correspondingly, after calculating the product of the current virtual machine's allocation ratio and the number of tracking connections that the virtual machine can allocate, to obtain the upper limit adjustment value for the current virtual machine, that is, after determining the upper limit adjustment value for each virtual machine based on the number of tracking connections that the virtual machine can allocate and the number of tracking connections of each virtual machine on the host machine, it can be determined whether the number of tracking connections of the current virtual machine is greater than the upper limit adjustment value of the current virtual machine. If the number of tracking connections of the current virtual machine is greater than the upper limit adjustment value of the current virtual machine, then the upper limit value of the current virtual machine's tracking connection count is adjusted to the current virtual machine's tracking connection count, so as to utilize the reserved tracking connection count and avoid the situation where the allocated tracking connection count (i.e., the upper limit value of the tracking connection count) is less than the current tracking connection count of the virtual machine. If the number of tracking connections of the current virtual machine is not greater than the upper limit adjustment value of the current virtual machine, then the upper limit value of the current virtual machine's tracking connection count is adjusted to the upper limit adjustment value of the current virtual machine.
[0048] The specific process for adjusting the maximum number of tracking connections for each virtual machine in this step can be set by the designer according to the practical scenario and user needs. For example, when setting up virtual machines with OVN architecture on the host machine, the maximum number of tracking connections for each virtual machine can be adjusted by configuring the tracking connection zone limit (Ct-zone-limit) configuration item of the logical switch port (logical_switch_port) in OVN.
[0049] It is understood that the specific start time of step 101 in this embodiment, i.e., the time point at which the upper limit of the tracking connection count for each virtual machine is adjusted, can be set by the designer according to the usage scenario and user needs. For example, before step 101, there may be a process of obtaining the tracking connection count of the host machine at a preset time interval, so as to update the historical tracking connection count information of the host machine using the tracking connection count of the host machine obtained at the preset time interval, and then proceed to step 101; for example, before step 101, there may be a process of obtaining the current tracking connection count information at a preset time interval; wherein, the current tracking connection count information includes the tracking connection count of the host machine and the tracking connection count of each virtual machine. In some other embodiments, before step 101, there may be a process of obtaining virtual machine tracking connection count adjustment instructions, so that in step 101, the required tracking connection count of the host machine can be determined based on the obtained virtual machine tracking connection count adjustment instructions and the historical tracking connection count information of the host machine. This embodiment does not impose any restrictions on this.
[0050] Correspondingly, after obtaining the current tracking connection count information at preset time intervals, it is determined whether the total tracking connection count of the virtual machines is greater than the connection count threshold. The total tracking connection count of the virtual machines is the sum of the tracking connection counts of each virtual machine in the current tracking connection count information. If yes, proceed to step 101 to adjust the upper limit of the tracking connection count for each virtual machine. If not, the step of obtaining the current tracking connection count information at preset time intervals can be executed, and the current tracking connection count information can be obtained again after the preset time interval. Correspondingly, if the total tracking connection count of the virtual machines is not greater than the connection count threshold, the historical tracking connection count information of the host machine can be updated using the tracking connection count of the host machine in the current tracking connection count information.
[0051] In this embodiment, the total number of tracking connections of the host machine is divided into two parts: the number of tracking connections of the host machine and the number of tracking connections of the virtual machines. By determining the required number of tracking connections of the host machine based on the historical tracking connection information of the host machine, the number of tracking connections required by the host machine in the future can be predicted. Thus, while ensuring the number of tracking connections of the host machine in the future, the upper limit of the number of tracking connections of each virtual machine can be adjusted. This can conveniently and effectively control the number of tracking connections of the virtual machines, 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 machines.
[0052] Based on the above embodiments, this invention also provides another method for controlling the number of tracking connections of a virtual machine, so as to effectively control the number of tracking connections of the virtual machine. For details, please refer to... Figure 3 , Figure 3 A flowchart of another virtual machine tracking connection number control method provided in an embodiment of the present invention; the method may include: Step 201: Obtain the current tracking connection count information at preset time intervals; wherein, the current tracking connection count information includes the tracking connection count of the host machine and the tracking connection count of each virtual machine.
[0053] It is understood that in this step, the current tracking connection count of the host machine and the tracking connection count of each virtual machine can be obtained at preset time intervals. The specific value of the preset time interval in this embodiment can be set by the designer according to the practical scenario and user needs; for example, the preset time interval can be a fixed time value, such as 5 minutes. To improve the accuracy of virtual machine tracking connection count control, this embodiment may also include a process of dynamically adjusting the preset time interval. For example, in this step, target connection count information can be obtained according to a preset sampling period; wherein, the target connection count information includes the tracking connection count of the host machine and / or the tracking connection count of each virtual machine; based on the target connection count information, the degree of data fluctuation is determined; based on the degree of data fluctuation, the preset time interval is adjusted.
[0054] Correspondingly, the aforementioned preset sampling period (e.g., 10 seconds) can be less than the preset time interval, so as to dynamically adjust the preset time interval based on the data fluctuation within the preset time interval (i.e., the window period). For example, when the target connection number information includes the tracking connection number of each virtual machine, the process of determining the data fluctuation based on the target connection number information can include: calculating the data fluctuation based on the target total tracking connection number corresponding to each target connection number information obtained within the preset time period; wherein, the data fluctuation is the ratio of the standard deviation to the average value of the target total tracking connection number within the preset time period; the target total tracking connection number is the sum of the tracking connection numbers of each virtual machine in the corresponding target connection number information.
[0055] Accordingly, the process of adjusting the preset time interval based on the degree of data fluctuation can include: if the degree of data fluctuation is greater than the upper limit threshold, the preset time interval can be reduced; if the degree of data fluctuation is less than the lower limit threshold, the preset time interval can be increased to obtain more stable statistical results.
[0056] Step 202: Determine whether the total number of virtual machine tracking connections is greater than the connection threshold; if yes, proceed to step 203; if no, proceed to step 201.
[0057] In this step, the total number of virtual machine tracking connections can be the sum of the tracking connections of each virtual machine in the current tracking connection information. The connection threshold in this step can be the sum of the current maximum tracking connections of each virtual machine and a preset percentage (e.g., ...). Figure 2 The product of 90% (in the original text) can also be the product of the host machine's total tracking connection limit and the preset percentage.
[0058] Step 203: Calculate the required number of tracking connections for the host machine using a weighted sliding window algorithm based on the host machine's historical tracking connection count information.
[0059] For example, historical tracking connection information includes the tracking connection counts of the top n hosts, sorted by acquisition time from newest to oldest; this step can be achieved through... Calculate the number of demand tracking connections (PredictedConn); Conn i This can be the number of tracking connections for the i-th host in the historical tracking connection count information; Weight i The periodic weight can be the number of tracking connections for the i-th host machine. For example, when n is 5, the corresponding number of tracking connections for the host machine from newest to oldest, Weight1 to Weight5, can be 5, 4, 3, 2, and 1, respectively.
[0060] Step 204: Determine the number of tracking connections that can be allocated to the virtual machines on the host machine based on the host machine's total maximum number of tracking connections and the required number of tracking connections.
[0061] Step 205: Determine the upper limit adjustment value for each virtual machine based on the number of tracing connections that can be allocated to the virtual machine and the number of tracing connections of each virtual machine on the host machine.
[0062] For example, in steps 204 and 205, it can be done through The current virtual machine's upper limit adjustment value (VMConn) is calculated. j This determines the upper limit adjustment value for each virtual machine; where TotalConn is the upper limit of the total number of traced connections on the host machine, and PredictedConn is the required number of traced connections; VMWeight j This represents the current allocation percentage for virtual machines. 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 traced connections for the q-th virtual machine.
[0063] Step 206: Determine whether the number of tracking connections of the current virtual machine is greater than the upper limit adjustment value of the current virtual machine; if yes, proceed to step 207; if no, proceed to step 208.
[0064] The current virtual machine can be any virtual machine.
[0065] Step 207: Adjust the maximum number of traced connections for the current virtual machine to the number of traced connections for the current virtual machine.
[0066] It is understandable that in this step, when the number of tracking connections for the current virtual machine exceeds the upper limit adjustment value for the current virtual machine, the reserved number of tracking connections (such as...) can be utilized. This ensures that the current virtual machine's maximum number of tracking connections meets current usage requirements.
[0067] Step 208: Adjust the current virtual machine's maximum number of traced connections to the current virtual machine's maximum adjustment value.
[0068] For example, in this step, you can adjust the maximum number of traced connections for the current virtual machine to the current virtual machine's maximum limit value by configuring the traced connection zone limit (Ct-zone-limit) configuration item of the logical switch port (logical_switch_port) in OVN.
[0069] In this embodiment, by determining whether the total number of tracking connections of the virtual machine is greater than the connection threshold, the number of times the tracking connection number of the virtual machine is controlled can be reduced, thus avoiding the waste of computing resources; by determining whether the current tracking connection number of the virtual machine is greater than the upper limit adjustment value of the current virtual machine, the performance and reliability of each virtual machine can be guaranteed as much as possible.
[0070] Corresponding to the above method embodiments, this invention also provides a virtual machine tracking connection number control device. The virtual machine tracking connection number control device described below and the virtual machine tracking connection number control method described above can be referred to in correspondence.
[0071] Please refer to Figure 4 , Figure 4 This is a structural block diagram of a virtual machine tracking connection number control device provided in an embodiment of the present invention. The device may include: The demand prediction module 10 is used to determine the number of demand tracking connections for the host machine based on the host machine's historical tracking connection information. The allocation determination module 20 is used to determine the number of tracking connections that can be allocated to virtual machines on the host machine based on the host machine's total maximum number of tracking connections and the required number of tracking connections; The control adjustment module 30 is used to adjust 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.
[0072] In some embodiments, the demand prediction module 10 may be specifically used to calculate the demand tracking connection number using a weighted sliding window algorithm based on the historical tracking connection number information; wherein, the historical tracking connection number information includes the tracking connection number of n hosts obtained at preset time intervals, where n is a positive integer greater than or equal to 2.
[0073] In some embodiments, the demand forecasting module 10 may include: The demand calculation submodule is used to calculate the quotient of the weighted product value and the weighted sum value to obtain the demand tracking connection number. The weighted product value is the sum of the products of the tracking connection number of each of the n hosts and their respective period weights. The weighted sum value is the sum of the period weights of the n hosts. If the acquisition time of the first tracking connection number is later than the acquisition time of the second tracking connection number, then 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 from the tracking connection numbers of the n hosts.
[0074] In some embodiments, historical tracking connection information includes the tracking connection counts of the top n hosts, sorted by acquisition time from newest to oldest.
[0075] In some embodiments, the allocation determination module 20 may be specifically used to calculate the difference between the upper limit of the total number of tracking connections and the number of required tracking connections to obtain the number of tracking connections that can be allocated to the virtual machine.
[0076] In some embodiments, the allocation determination module 20 may be specifically used to determine the number of tracking connections that can be allocated to the virtual machine based on the host machine's total tracking connection limit, the required tracking connection number, and the virtual machine's reserved tracking connection number information.
[0077] In some embodiments, the virtual machine reserved tracking connection number information is a reserved percentage; the allocation determination module 20 may include: The allocation calculation submodule is used to calculate the product of the connection number difference and the allocation percentage to obtain the number of tracking connections that can be allocated to the virtual machine; where the connection number difference is the difference between the upper limit of the total number of tracking connections and the number of tracking connections required, and the allocation percentage is the difference between 1 and the reserved percentage.
[0078] In some embodiments, the control adjustment module 30 may include: The percentage calculation submodule is used to determine the allocation percentage of each virtual machine based on the number of tracking connections for each virtual machine. The adjustment calculation submodule is used to adjust 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 allocation ratio of each virtual machine.
[0079] In some embodiments, the percentage calculation submodule can be specifically used to calculate the quotient of the current virtual machine's tracking connection count and the total number of tracking connections of the virtual machines to obtain the current virtual machine's allocation percentage; wherein, the current virtual machine is any virtual machine, and the total number of tracking connections of the virtual machines is the sum of the tracking connections of all virtual machines.
[0080] In some embodiments, the adjustment calculation submodule can be specifically used to adjust the upper limit of the number of tracking connections of the current virtual machine by multiplying the calculated allocation ratio of the current virtual machine by the number of tracking connections that the virtual machine can be allocated; wherein, the current virtual machine is any virtual machine.
[0081] In some embodiments, the control adjustment module 30 may include: The adjustment determination submodule is used to determine the upper limit adjustment value 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 of each virtual machine on the host machine; The adjustment judgment submodule is used to determine whether the number of tracking connections of the current virtual machine is greater than the upper limit adjustment value of the current virtual machine; where the current virtual machine is any virtual machine; The first adjustment submodule is used to adjust the upper limit of the current virtual machine's tracking connection count to the current virtual machine's tracking connection count if the current virtual machine's tracking connection count is greater than the current virtual machine's upper limit adjustment value. The second adjustment submodule is used to adjust the upper limit of the current virtual machine's tracking connection count to the upper limit adjustment value of the current virtual machine if the current virtual machine's tracking connection count is not greater than the current virtual machine's upper limit adjustment value.
[0082] In some embodiments, the control adjustment module 30 may be specifically used to adjust the upper limit of the number of tracking connections for each virtual machine by configuring the tracking connection domain threshold limit configuration item of the logical switch port in the open virtual network, based on the number of tracking connections that can be allocated to the virtual machine and the number of tracking connections of each virtual machine on the host machine.
[0083] In some embodiments, the device may further include: The periodic acquisition submodule is used to acquire the current tracking connection count information at preset time intervals; the current tracking connection count information includes the tracking connection count of the host machine and the tracking connection count of each virtual machine.
[0084] In some embodiments, the device may further include: The startup judgment module is used to determine whether the total number of virtual machine tracking connections is greater than the connection number threshold. If it is, a startup signal is sent to the demand prediction module 10; if not, a startup signal is sent to the periodic acquisition submodule. The total number of virtual machine tracking connections is the sum of the tracking connections of each virtual machine in the current tracking connection information.
[0085] In some embodiments, the connection threshold is the product of the sum of the maximum number of tracking connections for each virtual machine and a preset percentage.
[0086] In some embodiments, the device may further include: The periodic sampling module is used to acquire target connection number information according to a preset sampling period; wherein, the target connection number information includes the tracking connection number of the host machine and / or the tracking connection number of each virtual machine; The fluctuation determination module is used to determine the degree of data fluctuation based on the target connection number information; The period adjustment module is used to adjust the preset time interval according to the degree of data fluctuation.
[0087] In some embodiments, the fluctuation determination module can be specifically used to calculate the degree of data fluctuation based on the total target tracking connection number corresponding to each target connection number information obtained within a preset time period; wherein, the degree of data fluctuation is the ratio of the standard deviation to the average value of the total target tracking connection number within the preset time period; the total target tracking connection number is the sum of the tracking connection numbers of each virtual machine in the corresponding target connection number information.
[0088] In this embodiment, the total number of tracking connections of the host machine is divided into two parts: the number of tracking connections of the host machine and the number of tracking connections of the virtual machines. The demand prediction module 10 determines the required number of tracking connections of the host machine based on the historical tracking connection information of the host machine. It can predict the number of tracking connections required by the host machine in the future. Thus, while ensuring the number of tracking connections of the host machine in the future, the upper limit of the number of tracking connections of each virtual machine can be adjusted. This can conveniently and effectively control the number of tracking connections of the virtual machines, 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 machines.
[0089] Corresponding to the above method embodiments, this invention also provides a virtual machine tracking connection number control device. The virtual machine tracking connection number control device described below and the virtual machine tracking connection number control method described above can be referred to in correspondence.
[0090] Please refer to Figure 5 , Figure 5 This is a schematic diagram of a virtual machine tracking connection number control device provided in an embodiment of the present invention. The device may include: Memory D1 is used to store computer programs; Processor D2 is used to implement the steps of the virtual machine tracking connection number control method provided in the above method embodiments when executing a computer program.
[0091] In this embodiment, the virtual machine tracking connection number control device can specifically be the virtual machine's host machine, such as a host device or server.
[0092] Corresponding to the above method embodiments, this invention also provides a computer program product. The computer program product described below and the virtual machine tracking connection number control method described above can be referred to in correspondence.
[0093] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the virtual machine tracking connection number control method provided in the above-described method embodiments.
[0094] Corresponding to the above method embodiments, this invention also provides a computer-readable storage medium. The computer-readable storage medium described below and the virtual machine tracking connection number control method described above can be referred to in correspondence.
[0095] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the virtual machine tracking connection number control method provided in the above method embodiments.
[0096] The computer-readable storage medium can specifically be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other readable storage medium capable of storing program code.
[0097] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatuses, devices, computer-readable storage media, and computer program products disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0098] The present invention has provided a detailed description of a method, apparatus, device, and computer-readable storage medium for controlling the number of virtual machine connections. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of these embodiments are merely illustrative of the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to the invention without departing from its principles, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A method for controlling the number of tracking connections in a virtual machine, characterized in that, include: The required number of tracking connections for the host machine is determined based on the host machine's historical tracking connection count information; The number of tracking connections that can be allocated to virtual machines on the host machine is determined based on the maximum total number of tracking connections on the host machine and the required number of tracking connections. The upper limit of the number of tracking connections for each virtual machine is adjusted 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.
2. The virtual machine tracking connection number control method according to claim 1, characterized in that, The step of determining the required number of tracking connections for the host machine based on the host machine's historical tracking connection count information includes: Based on the historical tracking connection count information, the required tracking connection count is calculated using a weighted sliding window algorithm; wherein, the historical tracking connection count information includes n tracking connection counts of the host machine obtained at preset time intervals, where n is a positive integer greater than or equal to 2.
3. The virtual machine tracking connection number control method according to claim 2, characterized in that, Based on the historical tracking connection count information, the demand tracking connection count is calculated using a weighted sliding window algorithm, including: The demand tracking connection number is obtained by calculating the quotient of the weighted product value and the weighted sum value; wherein, the weighted product value is the sum of the products of the tracking connection number of each of the n host machines and their respective period weights; the weighted sum value is the sum of the period weights of the n host machines; if the acquisition time of the first tracking connection number is later than the acquisition time of the second tracking connection number, then 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 among the tracking connection numbers of the n host machines.
4. The virtual machine tracking connection number control method according to claim 2, characterized in that, The historical tracking connection information includes the tracking connection counts of the first n host machines, sorted by acquisition time from newest to oldest.
5. The virtual machine tracking connection number control method according to claim 1, characterized in that, The step of determining the number of tracking connections that can be allocated to virtual machines on the host machine based on the upper limit of the total number of tracking connections on the host machine and the required number of tracking connections includes: The difference between the upper limit of the total number of tracking connections and the required number of tracking connections is calculated to obtain the number of tracking connections that the virtual machine can allocate.
6. The virtual machine tracking connection number control method according to claim 1, characterized in that, The step of determining the number of tracking connections that can be allocated to virtual machines on the host machine based on the upper limit of the total number of tracking connections on the host machine and the required number of tracking connections includes: The number of tracking connections that can be allocated to the virtual machine is determined based on the maximum total number of tracking connections of the host machine, the required number of tracking connections, and the number of tracking connections reserved for the virtual machine.
7. The virtual machine tracking connection number control method according to claim 6, characterized in that, The virtual machine reserved tracking connection information is a reserved percentage; determining the number of tracking connections that the virtual machine can be allocated based on the host machine's total tracking connection limit, the required tracking connection number, and the virtual machine's reserved tracking connection information includes: The number of tracking connections that can be allocated to the virtual machine is obtained by multiplying the connection number difference by the allocation percentage; wherein the connection number difference is the difference between the upper limit of the total number of tracking connections and the number of tracking connections required, and the allocation percentage is the difference between 1 and the reserved percentage.
8. The virtual machine tracking connection number control method according to claim 1, characterized in that, The step of 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 includes: The allocation ratio of each virtual machine is determined based on the number of tracking connections for each virtual machine. The upper limit of the number of tracking connections for each virtual machine is adjusted based on the number of tracking connections that can be allocated to the virtual machine and the allocation ratio of each virtual machine.
9. The virtual machine tracking connection number control method according to claim 8, characterized in that, The step of determining the allocation ratio of each virtual machine based on the number of tracking connections of each virtual machine includes: The allocation ratio of the current virtual machine is obtained by calculating the quotient of the current virtual machine's tracking connection count and the total tracking connection count of the virtual machines; wherein, the current virtual machine is any one of the virtual machines, and the total tracking connection count of the virtual machines is the sum of the tracking connection counts of all the virtual machines.
10. The virtual machine tracking connection number control method according to claim 8, characterized in that, The step of 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 allocation ratio of each virtual machine includes: The upper limit of the number of tracking connections for the current virtual machine is adjusted by multiplying the calculated allocation ratio of the current virtual machine by the number of tracking connections that the virtual machine can be allocated; wherein, the current virtual machine is any of the virtual machines.
11. The virtual machine tracking connection number control method according to claim 1, characterized in that, The step of 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 includes: Based on the number of tracking connections that can be allocated to the virtual machine and the number of tracking connections of each virtual machine on the host machine, determine the upper limit adjustment value for each virtual machine; Determine whether the number of tracking connections of the current virtual machine is greater than the upper limit adjustment value of the current virtual machine; wherein, the current virtual machine is any of the aforementioned virtual machines; If the current number of traced connections of the virtual machine is greater than the upper limit adjustment value of the current virtual machine, then the upper limit of the current number of traced connections of the virtual machine will be adjusted to the current number of traced connections of the virtual machine. If the current number of traced connections for the virtual machine is not greater than the current virtual machine's upper limit adjustment value, then the current virtual machine's upper limit for traced connections will be adjusted to the current virtual machine's upper limit adjustment value.
12. The virtual machine tracking connection number control method according to claim 1, characterized in that, The step of 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 includes: Based on the number of tracking connections that can be allocated to the virtual machine and the number of tracking connections of each virtual machine on the host machine, the upper limit of the number of tracking connections for each virtual machine is adjusted by configuring the tracking connection domain threshold limit configuration item of the logical switch port in the open virtual network.
13. The virtual machine tracking connection number control method according to any one of claims 1 to 12, characterized in that, Before determining the required number of tracking connections for the host machine based on the host machine's historical tracking connection information, the method further includes: The current tracking connection count information is obtained at preset time intervals; wherein, the current tracking connection count information includes the tracking connection count of the host machine and the tracking connection count of each virtual machine.
14. The virtual machine tracking connection number control method according to claim 13, characterized in that, After obtaining the current number of tracking connections at preset time intervals, the method further includes: Determine whether the total number of virtual machine tracking connections is greater than the connection number threshold; wherein, the total number of virtual machine tracking connections is the sum of the tracking connection numbers of each virtual machine in the current tracking connection number information; If so, then the step of determining the required number of tracking connections for the host machine based on the host machine's historical tracking connection information is executed; If not, then proceed with the step of obtaining the current number of tracking connections at preset time intervals.
15. The virtual machine tracking connection number control method according to claim 14, characterized in that, The connection threshold is the product of the sum of the upper limits of the tracking connections of each virtual machine and a preset percentage.
16. The virtual machine tracking connection number control method according to claim 13, characterized in that, Also includes: The target connection count information is obtained according to a preset sampling period; wherein, the target connection count information includes the tracking connection count of the host machine and / or the tracking connection count of each virtual machine; Based on the target connection number information, determine the degree of data fluctuation; The preset time interval is adjusted based on the degree of data fluctuation.
17. The virtual machine tracking connection number control method according to claim 16, characterized in that, The target connection count information includes the tracking connection count of each virtual machine; determining the data fluctuation level based on the target connection count information includes: The data fluctuation level is calculated based on the total target tracking connection number corresponding to each target connection number information obtained within a preset time period; wherein, the data fluctuation level is the ratio of the standard deviation to the average value of the total target tracking connection number within the preset time period; and the total target tracking connection number is the sum of the tracking connection numbers of each virtual machine in the corresponding target connection number information.
18. A virtual machine tracking connection number control device, characterized in that, include: The demand prediction module is used to determine the number of demand tracking connections for the host machine based on the host machine's historical tracking connection information. The allocation determination module is used to determine the number of virtual machines that can be allocated to the host machine based on the upper limit of the total number of tracking connections of the host machine and the required number of tracking connections; The control adjustment module is used to adjust 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.
19. A device for controlling the number of tracking connections in a virtual machine, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the virtual machine tracking connection number control method as described in any one of claims 1 to 17 when executing the computer program.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the virtual machine tracking connection number control method as described in any one of claims 1 to 17.
Citation Information
Patent Citations
Method and device for controlling connection number of virtual machine
CN106161551A
Database connection number anomaly detection, upper limit adjustment and usage prediction system
CN116010464A
Resource management method and device for storage access service, equipment and storage medium
CN117170807A
Virtual machine startup control method, electronic equipment and storage medium
CN118535282A
Method and device for setting virtual machine computing resource limit
CN119127398A
Cited By
Virtual machine connection number adjusting method and device, equipment, storage medium and program
CN121462526A
Method, device, equipment, storage medium and program for adjusting virtual machine connection number
CN121462526B
