A method and system for elastic scaling of component process number

By collecting concurrency capability information and using the order-preserving regression algorithm to dynamically adjust the number of workers and component processes, the problem of improper resource allocation in cloud computing is solved, achieving efficient resource utilization and performance improvement.

CN116302185BActive Publication Date: 2025-11-28CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310226887.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2025-11-28
Estimated Expiration
2043-03-10

AI Technical Summary

Technical Problem

In cloud computing environments, mismatches in resource configuration between public and private clouds can lead to resource waste or insufficiency, especially when the number of workers and processes are not set correctly, resulting in excessive memory usage or excessive consumption of service resources.

Method used

By collecting concurrency capability information, the optimal number of workers is dynamically analyzed using the order-preserving regression algorithm. Based on the relationship between virtual machines and ports, the number of component processes is dynamically adjusted, and elastic scaling is achieved in conjunction with the configuration adjustment module.

Benefits of technology

Optimize resource utilization, reduce memory usage, improve system performance, reduce resource consumption, and adapt to the needs of different cloud platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302185B_ABST
    Figure CN116302185B_ABST
Patent Text Reader

Abstract

The application discloses a kind of elasticity and extension method and system of component process number, comprising: the relevant information of concurrent ability under different api_worker number is collected, according to relevant information, the most ideal worker quantity is obtained by using order-preserving regression algorithm dynamic analysis;Based on the most ideal worker quantity, the relationship between virtual machine, port and process is used to dynamically adjust the component process number under the super-converged architecture of IAAS cloud platform;Component process number is imported into the script of configuration adjustment, and the worker quantity in the current environment is set to the optimal value by script.The application can improve the performance of the system to the highest limit, utilize the resources of host computer, reduce the consumption of memory.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of cloud computing, and particularly relates to a method and system for elastic scaling of component process quantity. BACKGROUND

[0002] Cloud computing is a new business model of paying by quantity and purchasing on demand. In the era of big data information of computers and the Internet, the scale of cloud computing data centers is also developing more and more huge. Its core is the computing method based on the Internet. Users can purchase computers and other devices and required data storage services on demand through browsers or Web. IaaS (Infrastructure as a Service) is a service of infrastructure. Users can obtain servers, storage and network services from providers according to their actual usage or occupation of resources by using the IaaS model of infrastructure as a service. This way is very convenient. Users do not need to purchase large equipment in advance. They only need to rent from providers at any time and anywhere according to their needs. Providers can provide resources of various specifications, such as cloud hosts and cloud servers, and can provide operating systems, storage and network services required by users.

[0003] Under the hyper-converged architecture of the IAAS cloud platform, with the increase of the number of workers, the maximum concurrency capacity under different scales of host machines is improved. However, with the increase of the scale, even if the number of workers is increased, the benefit will tend to be flat. The number of workers and processes set by public cloud is relatively large, and once the number of workers and processes is set too large, a lot of memory will be occupied. In contrast, the resources of private cloud and converged deployment resource pool are not as sufficient as those of public cloud. If the deployment is still according to the scale of public cloud, the service resources will be consumed too much. With the increase of the number of workers, the maximum concurrency under different scales of host machines is improved. With the increase of the scale, the worker number may tend to be flat due to business locks. SUMMARY

[0004] To solve the above problems, the application provides the following scheme: a method for elastic scaling of component process quantity, comprising:

[0005] Collecting relevant information of concurrency capacity under different api_worker numbers, and dynamically analyzing the optimal worker quantity by using a preservation regression algorithm according to the relevant information;

[0006] Based on the optimal worker quantity, dynamically adjusting the component process quantity under the hyper-converged architecture of the IAAS cloud platform by using the relationship among virtual machines, ports and processes;

[0007] The component process number is introduced into a script of configuration adjustment, and the worker number in the current environment is set to the optimal value through the script.

[0008] Preferably, the process of collecting the information about the concurrency capability under different api_worker numbers comprises,

[0009] The running condition of the cloud platform is tested for multiple times, the port creation request is taken as the test object, the api_worker and the concurrent connection number are taken as the input conditions, the request timeout time is taken as the limit, the concurrency capability under different api_worker numbers is tested, and the information about the concurrency capability under different api_worker numbers is obtained.

[0010] Preferably, the relationship among the virtual machine, the port and the process comprises,

[0011] The port is created at the same time when the virtual machine is created, and according to the corresponding relationship, the number of concurrently created virtual machines is equal to the number of concurrently created ports.

[0012] The relationship between the concurrency capability of the concurrently created virtual machines and the number of computing nodes in the resource pool is:

[0013] The number of concurrently created virtual machines = α × the number of computing nodes, wherein α is a coefficient.

[0014] TPS = the number of concurrently created virtual machines ÷ 10 = α × the number of computing nodes ÷ 10.

[0015] Preferably, the process of dynamically analyzing the optimal worker number by using the order-preserving regression algorithm comprises,

[0016] A model is trained to minimize the equation given a limited set of real numbers.

[0017] According to the information about the concurrency capability under different api_worker numbers, it is assumed that the concurrent connection number is an array X, and the TPS is an array Y, Y is not a monotonic function; by using the order-preserving regression algorithm, the average value of Y is obtained without changing the arrangement order of X.

[0018] In the case that the worker number is fixed, the ideal value of the number of requests per second is obtained according to the concurrent connection number.

[0019] Preferably, the expression of the equation is

[0020]

[0021] The equation satisfies the following constraint conditions:

[0022]

[0023] Preferably, the obtaining of the optimal worker quantity further comprises,

[0024] According to the optimal worker quantity obtained by the order-preserving regression algorithm, when the number of computing nodes is the ideal TPS value x 10, the worker number is set to the worker number corresponding to the current TPS.

[0025] Preferably, the process of dynamically adjusting the number of component processes under the hyper-converged architecture of the IAAS cloud platform by using the relationship among virtual machines, ports and processes comprises,

[0026] According to the case that the creation of a virtual machine calls the creation of a port and the update of a port twice, and various api requests from the platform also exist, the actual api_worker value is set to 2 times the test theoretical api_worker value.

[0027] According to the case that after reaching the neutron-server, no rpc communication is used, and the controller is called by a REST method, the rpc_worker is set to 1 / 2 of the api_worker.

[0028] rpc worker = rpc_state_report_worker = 1 / 2 api_worker.

[0029] The application further provides a system for the elastic scaling of the number of component processes, comprising:

[0030] An information collection module is configured to collect relevant information about the concurrency capability under different api_worker numbers.

[0031] A scheduling algorithm module is connected to the information collection module and is configured to dynamically analyze and obtain an optimal worker quantity by using an order-preserving regression algorithm according to the relevant information.

[0032] A configuration adjustment module is connected to the scheduling algorithm module and is configured to dynamically adjust the number of component processes under the hyper-converged architecture of the IAAS cloud platform by using the relationship among virtual machines, ports and processes based on the optimal worker quantity, and to import the number of component processes into a script for configuration adjustment, and to set the worker number in the current environment to an optimal value by using the script.

[0033] Preferably, the components comprise nova, glance, cinder and neutron.

[0034] The application has the following technical effects:

[0035] The application provides a component process number elastic scaling method and system, compared with static data, the algorithm is more beneficial to the use of the algorithm in the real environment by using the information collection module to perform experiment test in advance.

[0036] The component process number under the super-converged architecture of the IAAS cloud platform is dynamically adjusted by using the relationship among the virtual machine, port and process.

[0037] Considering the component performance and resource occupation, the ideal value of TPS can be obtained more quickly and better by the order-preserving regression algorithm in the scheduling algorithm module, and then the worker number of the related component is reduced, and the environment deployment can be completed without occupying too much memory.

[0038] The worker number configuration standardization can be quickly completed by the automatic script in the configuration adjustment module. DETAILED DESCRIPTION

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described in the following are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0040] Figure 1 The method flowchart of the embodiments of the present application is shown in the following.

[0041] Figure 2 The system structure schematic diagram of the embodiments of the present application is shown in the following. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be described clearly and completely in the following by combining the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0043] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in the following by combining the drawings and specific embodiments.

[0044] Embodiment one

[0045] As shown in the following, Figure 1 The application provides a component process number elastic scaling method, which comprises:

[0046] Collecting information about the concurrency capability under different api_worker numbers, and dynamically analyzing the optimal worker number by using a preservation regression algorithm according to the information;

[0047] Based on the optimal worker number, dynamically adjusting the component process number under the hyper-converged architecture of the IAAS cloud platform by using the relationship among virtual machines, ports and processes;

[0048] Importing the component process number into a script for configuration adjustment, and setting the worker number in the current environment to the optimal value through the script.

[0049] Further, the method comprises the following steps:

[0050] Step 1: Information collection

[0051] First, the running condition of the cloud platform is tested multiple times, the request for creating a port is taken as a test object, the api_worker and the number of concurrent connections are taken as input conditions, the request timeout time timeout=10s is taken as a limit, and the concurrency capability under different api_worker numbers is tested.

[0052] Step 2: Scheduling algorithm

[0053] If the hybrid cloud, the private cloud and the hyper-converged deployment are deployed according to the scale of the public-private deployment, the corresponding set worker number and process number are relatively large, and once the set worker number and process number are too large, a large amount of memory will be occupied. In contrast to the private cloud, the resources are not as sufficient as those of the public cloud. Taking neutron as an example, the worker number in the public cloud is set to 150, and in the hybrid cloud project (the computing node is less than or equal to forty), it is updated to 4, so that the deployment of the environment can be completed without occupying too much memory. Therefore, the worker number of the related components can be reduced.

[0054] According to the test results, it can be analyzed that when a virtual machine is created, a port is generally created, and according to this corresponding relationship, it can be concluded that the number of concurrent virtual machine creation is equal to the number of concurrent port creation.

[0055] In order to simplify the data model, the current can be initially set that the concurrent virtual machine creation capability is related to the number of computing nodes in the resource pool, that is:

[0056] The number of concurrent virtual machine creation = α × the number of computing nodes, wherein α is a coefficient;

[0057] The current can take α = 1.

[0058] It can be concluded that:

[0059] TPS = concurrent number of virtual machine creation ÷ 10 = alpha × number of computing nodes ÷ 10.

[0060] Further optimization scheme, isotonic regression is a regression algorithm, which can maximize resource utilization, the basic idea is: given a finite set of real numbers, train a model to minimize the following equation:

[0061]

[0062] And meet the following constraints:

[0063]

[0064] According to the collection information obtained in the above step, assuming that the number of concurrent connections is array X, and TPS is array Y, Y is not a monotonic function (that is: there is fluctuation). By using the isotonic regression algorithm, the average value condition of Y is obtained without changing the arrangement order of X.

[0065] In the case of fixed worker number, the ideal value of the number of requests per second can be obtained according to the number of concurrent connections.

[0066] According to the ideal value obtained by the isotonic regression algorithm, it can be known that when the number of computing nodes is the ideal TPS value × 10, the worker number should be set to the worker number corresponding to the current TPS.

[0067] According to the information collection and scheduling algorithm of the third generation cloud platform of Tianyi cloud, the results shown in table 1 can be obtained:

[0068] Table 1

[0069] Number of Workers api_worker = 2 api_worker = 4 api_worker = 8 …… Concurrent Processing Capability 4 8 12 ……

[0070] In the actual production environment, when creating a virtual machine, two requests of creating port and updating port are called, and various api requests (such as vpc, dedicated line, peer connection, etc.) from the platform also exist, so the actual api_worker should be 2 times of the test theoretical api_worker value.

[0071] The reason for setting rpc_worker as 1 / 2 of api_worker is that some requests arrive at neutron-server and do not use rpc for communication, but use the REST way to call the controller.

[0072] rpc worker = rpc_state_report_worker = 1 / 2 api_worker

[0073] Taking the neutron component as an example, the correspondence between the component process number and the computing node is shown in Table 2:

[0074] Table 2

[0075]

[0076]

[0077] When the computing node is less than or equal to 40, the process number configuration corresponding to each component is shown in Table 3:

[0078] Table 3

[0079]

[0080] Since the public cloud currently has a large number of timing pull tasks, there will be a large number of api calling requests every certain period of time, and the above api_worker number cannot meet the requirements. Therefore, the embodiment is suitable for the current private cloud and hybrid deployment resource pool, and is not suitable for the public cloud.

[0081] Step 3: Configuration adjustment

[0082] The result obtained in the above step is imported into the configuration adjustment script, and the worker number in the current environment can be set to the optimal value through the script.

[0083] The component process number configuration of the embodiment is deployed in the Tianyi cloud self-developed cloud platform;

[0084] According to the number of computing nodes, the neutron, nova, glance, cinder and keystone components involved are configured according to the scheme result;

[0085] After the configuration according to the experimental scheme, the performance of the cloud platform reaches the optimal value, the request does not time out, the concurrency capability reaches the maximum value, and the memory is released.

[0086] The embodiment can well compatible with the existing technology and stably run by applying the scheme in the existing Tianyi cloud self-developed cloud platform; under the IAAS cloud platform hyper-converged architecture, especially in the scene of private cloud, hybrid cloud and hybrid deployment resource pool, the performance of the system can be maximally improved, and the consumption of memory can be reduced.

[0087] Embodiment two

[0088] As shown in Figure 2 The application also provides a component process number elastic scaling system, which comprises:

[0089] An information collection module is configured to collect information about concurrent capabilities under different numbers of api_workers.

[0090] A scheduling algorithm module is connected to the information collection module and is configured to dynamically analyze the optimal number of workers based on the relevant information using a preservation regression algorithm.

[0091] A configuration adjustment module is connected to the scheduling algorithm module and is configured to dynamically adjust the number of component processes under the hyper-converged architecture of the IAAS cloud platform based on the optimal number of workers using the relationship between virtual machines, ports and processes, and to import the number of component processes into a configuration adjustment script to set the number of workers in the current environment to the optimal value through the script.

[0092] The components include nova, glance, cinder and neutron.

[0093] The elastic scaling system for the number of component processes of the application is aimed at a mixed deployment node of databases, nova, glance, cinder and neutron in an online resource pool. In actual operation, it is found that the number of neutron-server running threads is 150, the memory usage is up to 64G and the memory free is zero in the case of a 64G memory in the control node, causing problems such as failure to back up the database, abnormal exit of the database process and the like. It is found that the api_worker, rpc_state_report_worker and rpc_worker in the neutron configuration file are all 48. To standardize the worker value of each component, an algorithm that can maximize resource utilization is used to give the standard worker value of each component of nova, glance, cinder and neutron through scientific and multi-scenario testing, considering the performance and resource occupation of the components. The worker number configuration standardization is mainly to correct the problem of excessive consumption of control plane service resources under the current converged deployment, and to give the configuration standard in combination with the derivation.

[0094] Taking the above factors into comprehensive consideration, the performance of the system can be improved to the highest limit, the resources of the host are utilized and the consumption of memory is reduced in the current hyper-converged architecture of the private cloud and the converged deployment resource pool project.

[0095] The above-described embodiments are only preferred modes of the application and do not limit the scope of the application. Various modifications and improvements to the technical solutions of the application made by those skilled in the art without departing from the design spirit of the application shall fall within the protection scope of the claims of the application.

Claims

1. A method for elastic scaling of the number of component processes, characterized in that, The method comprises the following steps: Collecting information about concurrent capabilities under different api_worker numbers, and using a preservation regression algorithm to dynamically analyze the information to obtain an optimal worker number; Based on the optimal worker number, dynamically adjusting the number of component processes under the hyper-converged architecture of an IAAS cloud platform using the relationship among virtual machines, ports, and processes; Importing the number of component processes into a script for configuration adjustment, and setting the worker number in the current environment to the optimal value through the script.

2. The method of claim 1, wherein, The process of collecting information about concurrent capabilities under different api_worker numbers comprises: Testing the operation of the cloud platform multiple times, taking the creation of a port request as a test object, taking the api_worker and the number of concurrent connections as input conditions, and taking the request timeout time as a limit to test the concurrent capabilities under different api_worker numbers and obtain information about the concurrent capabilities under different api_worker numbers.

3. The method of claim 1, wherein, The relationship among the virtual machines, ports, and processes comprises: A port is created at the same time as a virtual machine is created, and according to the corresponding relationship, the number of concurrently created virtual machines is equal to the number of concurrently created ports. The relationship between the concurrent virtual machine creation capability and the number of computing nodes in the resource pool is: The number of concurrently created virtual machines = α × the number of computing nodes, where α is a coefficient. TPS = the number of concurrently created virtual machines ÷ 10 = α × the number of computing nodes ÷ 10. TPS is the number of transactions per second to handle virtual machine creation requests.

4. The method of claim 1, wherein, The process of using a preservation regression algorithm to dynamically analyze and obtain an optimal worker number comprises: Given a finite set of real numbers, train a model to minimize the equation; According to the information about concurrent capabilities under different api_worker numbers, assume that the number of concurrent connections is array X and the TPS is array Y, Y is not a monotonic function; through the preservation regression algorithm, the average value of Y is obtained without changing the arrangement of X; Under the condition that the worker number is fixed, the ideal value of the number of transactions per second is obtained according to the number of concurrent connections.

5. The elastic scaling method of the number of component processes according to claim 4, characterized in that: The expression of the equation is The equation satisfies the following constraint conditions:

6. The method of claim 1, wherein, After obtaining the optimal worker number, the method further comprises: According to the optimal worker number obtained by the preservation regression algorithm, when the number of computing nodes is the ideal TPS value × 10, the worker number is set to the worker number corresponding to the current TPS.

7. The method of claim 1, wherein, The process of dynamically adjusting the number of component processes under the hyper-converged architecture of an IAAS cloud platform using the relationship among virtual machines, ports, and processes comprises: According to the situation that the creation of a port and the update of a port are called twice when a virtual machine is created, and various api requests are also issued from the platform, the actual api_worker value is set to twice the test theoretical api_worker value. According to the request of calling the controller by REST mode after reaching the neutron-server, the rpc worker is set to 1 / 2 of the api worker without using the rpc communication; The rpc worker = rpc_state_report_worker = 1 / 2 api_worker.

8. A system for elastic scaling of the number of component processes, characterized by It comprises: An information collection module for collecting relevant information of concurrent capacity under different api worker numbers; A scheduling algorithm module connected with the information collection module for dynamically analyzing and obtaining the most ideal worker number by using the order-preserving regression algorithm according to the relevant information; A configuration adjustment module connected with the scheduling algorithm module for dynamically adjusting the component process number under the hyper-converged architecture of the IAAS cloud platform by using the relationship among virtual machines, ports and processes based on the most ideal worker number; and importing the component process number into a script of configuration adjustment, and setting the worker number in the current environment to the optimal value through the script.

9. The system of claim 8, wherein, The components include nova, glance, cinder and neutron.

Citation Information

Patent Citations

  • Monitoring method and device applied to container cloud platform

    CN112202640A

  • Method for controlling process quantity of scheduler and IaaS cloud platform scheduling system

    CN114461356A