Resource Requirement Determination Method, Device, Equipment, and Storage Medium
By simulating the data transmission process in the system to be tested, controlling the system throughput and adjusting the number of server nodes, the problem of inaccurate human judgment of resource demand is solved, and more accurate determination of resource demand is achieved, avoiding resource waste and bottlenecks.
Patent Information
- Application Number
- CN202210124253.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-10
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-02-10
AI Technical Summary
In the prior art, there is inaccuracy in the human judgment of resource demand, resulting in resource waste or server bottlenecks.
By entering the test data into the system to be tested, using stress testing tools to control the initial system throughput, monitoring performance parameters, adjusting the number of server nodes, and iteratively determine the target resource demand.
It improves the accuracy of determining resource demand and avoids resource waste and server bottlenecks.
Smart Images

Figure CN114490405B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of computer technologies, and in particular, to a method, apparatus, device, and storage medium for determining resource requirements. Background Art
[0002] The research and development of computer application software systems is an intellectually intensive labor for solving business problems in professional fields. After receiving business requirements, application developers first need to conduct business requirement analysis, and then focus on the detailed design and research of the overall technical solution of the system. Then, testers conduct tests, and finally deliver and go live. To ensure the feasibility of the overall system research and development, it is necessary to clearly estimate the resource requirements for the system to go live during the overall technical solution design phase, such as the number of resources such as physical machines, virtual machines, or cloud environments required for deployment.
[0003] The estimation of resource requirements is usually obtained by most R & D personnel based on business requirements and experience in the research and development of existing application systems. For example, 2 PC (Personal Computer) servers in a test environment can support an online service of 2000 tps (transaction per second). According to experience estimation, to support an online service of 10000 tps in a production environment, 10 PC servers need to be applied for. However, the method of manually estimating resource requirements based on empirical values is not accurate enough. Overestimation will cause resource waste, and underestimation will lead to server bottlenecks. Summary of the Invention
[0004] Embodiments of the present application provide a method, apparatus, device, and storage medium for determining resource requirements to improve the accuracy of determining resource requirements.
[0005] In a first aspect, an embodiment of the present application provides a method for determining resource requirements, the method including:
[0006] Input test data into a system under test, and control the initial system throughput of the system under test according to a preset stress test tool;
[0007] According to a preset monitoring tool, determine performance parameters corresponding to any system environment cluster in the system under test based on the initial system throughput; wherein, any system environment cluster includes at least one initial server node;
[0008] According to the performance parameters and a preset adjustment rule, adjust the initial system throughput and the number of initial server nodes corresponding to any system environment cluster in the system under test to obtain an intermediate system throughput and an intermediate number of server nodes;
[0009] Based on the initial system throughput, the initial number of server nodes, the intermediate system throughput, the intermediate number of server nodes, and the preset target system throughput, and based on a preset resource demand determination algorithm, determine the target resource demand of any system environment cluster in the system under test.
[0010] In a second aspect, an embodiment of the present application further provides a resource demand determination device, which includes:
[0011] An initial system throughput control module, configured to input test data into the system under test, and control the initial system throughput of the system under test according to a preset stress test tool;
[0012] A performance parameter determination module, configured to determine the performance parameters corresponding to any system environment cluster in the system under test based on the initial system throughput according to a preset monitoring tool; wherein, at least one initial server node is included in any system environment cluster;
[0013] An intermediate server node number determination module, configured to adjust the initial system throughput and the number of initial server nodes corresponding to any system environment cluster in the system under test according to the performance parameters and a preset adjustment rule, to obtain an intermediate system throughput and an intermediate number of server nodes;
[0014] A first target resource demand determination module, configured to determine the target resource demand of any system environment cluster in the system under test based on the initial system throughput, the initial number of server nodes, the intermediate system throughput, the intermediate number of server nodes, and the preset target system throughput, and based on a preset resource demand determination algorithm.
[0015] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, it implements the resource demand determination method as described in any one of the embodiments of the present application.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the program is executed by a processor, it implements the resource demand determination method as described in any one of the embodiments of the present application.
[0017] The embodiment of the present application can truly simulate the transmission process of data in each system environment cluster during the operation of the system under test by inputting the test data associated with the system under test into the system under test, so as to more accurately determine the resource usage of each system environment cluster. The transmission rate of the test data in the system under test is controlled by the stress test tool, so as to achieve the control of the initial system throughput of the system under test. According to the initial system throughput, the performance parameters corresponding to any system environment in the system under test are determined; according to the performance parameters and the preset adjustment rules, the initial server node number corresponding to any system environment cluster in the system under test is adjusted to obtain the intermediate system throughput and the number of intermediate server nodes. By adjusting the initial system throughput and obtaining the intermediate system throughput, the resource capacity of each system environment cluster in the system under test can be borne to the greatest extent, avoiding the waste of resource capacity of each system environment cluster in the system under test. According to the initial system throughput, the initial server node number, the intermediate system throughput, the intermediate server node number and the preset target system throughput, based on the preset resource demand determination algorithm, the target resource demand of any system environment cluster in the system under test is determined. The invention solves the problem of incorrect determination of resource demand caused by human judgment in the prior art, improves the accuracy of determining target resource demand, avoids resource waste caused by over-estimation of target resource capacity, and avoids resource bottleneck caused by under-estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flowchart of a method for determining resource demand in Embodiment 1 of the present application;
[0019] Figure 2 It is a flowchart of a method for determining resource demand in Embodiment 2 of the present application;
[0020] Figure 3A It is a flowchart of a method for determining resource demand in Embodiment 3 of the present application;
[0021] Figure 3B It is a data transmission link diagram between each system environment cluster of the system to be tested in Example 3 of the present application;
[0022] Figure 4 It is a structural block diagram of a device for determining resource demand in Embodiment 4 of the present application;
[0023] Figure 5 It is a structural diagram of an electronic device in Embodiment 5 of the present application. DETAILED DESCRIPTION
[0024] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. Additionally, it should be noted that for ease of description, only the parts related to the present invention rather than all the structures are shown in the drawings.
[0025] Embodiment 1
[0026] Figure 1 As shown in the flowchart of a method for determining resource requirements provided in Embodiment 1 of this application, this embodiment is applicable to the situation of determining the resource requirements of an application system. This method can be executed by a resource requirement determination device, and the device can be implemented in a software and / or hardware manner, such as Figure 1 shown, the method specifically includes the following steps:
[0027] S110. Input test data into the system under test, and control the initial system throughput of the system under test according to a preset stress test tool.
[0028] The test data can be the data involved in the execution process of the system under test. Correspondingly, the acquisition method of the test data can be to extract the data generated after the system under test is put into production and use the extracted data as the test data. Among them, the system under test can be the system to be evaluated for resource requirements. For example, the system under test can be an information security system for identifying security behaviors in various scenarios. Correspondingly, the test data corresponding to the system under test can be transaction flow data and request message data. The system under test can include at least one system environment cluster. For example, the system under test can include a data exchange cluster for accessing test data and transmitting the test data to other system environment clusters.
[0029] Optionally, to avoid the test data obtained being sensitive privacy data and the occurrence of data leakage during use, the test data can be desensitized according to a preset desensitization algorithm, thereby achieving reliable protection of the test data and improving the privacy and reliability of the test data. Among them, the desensitization algorithm can be hash desensitization, etc.
[0030] The stress testing tool can be JMeter. The system throughput can be the number of user-initiated requests that the system can process per second. For example, the system throughput can be expressed in TPS (transaction per second). The stress testing tool can include a pressure generating program, which can control the data transfer speed of the test data in the system under test, so as to control the TPS of each system environment cluster in the system under test. The initial system throughput can be the initial TPS of each system environment cluster in the system under test controlled by the pressure generating program. For example, the initial system throughput can be 10,000 tps.
[0031] Exemplarily, the test data can be input into the system under test, and the preset stress testing tool can control the transmission rate of the test data in the system under test, so as to control the initial system throughput of each system environment cluster in the system under test, that is, the initial TPS.
[0032] S120. According to the preset monitoring tool, based on the initial system throughput, determine the performance parameters corresponding to any system environment cluster in the system under test; wherein, any system environment cluster includes at least one initial server node.
[0033] The monitoring tool can be a tool for monitoring the performance parameters corresponding to any system environment cluster in the system under test. For example, the monitoring tool can be Nmon (Nigel’s Monitor). The performance parameters can include the actual system throughput, data response time, and resource utilization rate. Among them, the actual system throughput can be the TPS actually generated by any system environment cluster in the system under test based on the initial system throughput. For example, if the pressure generating program controls the initial system throughput of the system under test to be 10,000 tps, if any system environment cluster can withstand the data transfer pressure brought by the initial system throughput of 10,000 tps, the actual system throughput corresponding to any system environment cluster can reach 10,000 tps; if any system environment cluster cannot withstand the data transfer pressure brought by the initial system throughput of 10,000 tps, the actual system throughput corresponding to any system environment cluster is less than 10,000 tps. The data response time can be the time for the test system to respond to the request data in the test data. The resource utilization rate can be the resource usage ratio corresponding to any system environment cluster in the system under test. Among them, the resource usage ratio can be the CPU usage ratio, memory usage ratio, disk usage ratio, or network usage ratio, etc.
[0034] The system environment cluster includes at least one initial server node. The initial server node can be server resources pre-deployed in the system environment cluster by relevant testers according to the cluster function corresponding to any system environment cluster. For example, the server node can be a physical machine, a virtual machine, or a cloud environment, etc. Exemplarily, the system under test includes system environment cluster A, system environment cluster B, and system environment cluster C. Relevant testers can pre-deploy server nodes for each system environment cluster according to the cluster functions corresponding to system environment cluster A, system environment cluster B, and system environment cluster C respectively. For example, system environment cluster A is used for data transmission, and the number of corresponding initial server nodes can be 3; system environment cluster B is used for data calculation, and the number of corresponding initial server nodes can be 4; system environment cluster C is used for data storage, and the number of corresponding initial server nodes can be 2.
[0035] Exemplarily, any system environment cluster in the system under test can respond to test data according to the initial system throughput controlled by the stress test tool. The monitoring tool can monitor the performance parameters of any system environment cluster in the system under test in real time within a preset time period, so as to obtain the actual system throughput, data response time, and resource utilization rate corresponding to any system environment cluster. Among them, the preset time period can be pre-set by relevant technical personnel according to actual needs. For example, the preset time period can be 8 hours.
[0036] S130. According to the performance parameters and the preset adjustment rules, adjust the initial system throughput and the number of initial server nodes corresponding to any system environment cluster in the system under test to obtain the intermediate system throughput and the intermediate number of server nodes.
[0037] The adjustment rules can be pre-set by relevant technical personnel. Among them, the adjustment rules can include the adjustment of the initial system throughput and the adjustment of the number of initial server nodes. The intermediate system throughput can be the system throughput after adjusting the initial system throughput; the intermediate number of service nodes can be the number of server nodes obtained after adjusting the number of initial server nodes.
[0038] The adjustment rule can be that if the actual system throughput corresponding to any system environment cluster in the system under test can withstand the data transmission pressure brought by the initial system throughput, the data response time and resource utilization rate of any system environment cluster are obtained through a monitoring tool. If the data response time of any system environment cluster exceeds the preset response time threshold, and / or the data response time of any system environment cluster exceeds the preset utilization rate threshold, server nodes with a preset number of nodes are added to the system environment cluster that exceeds the response time threshold and / or exceeds the utilization rate threshold to obtain the intermediate number of server nodes. Among them, the response time threshold, utilization rate threshold, and preset number of nodes can be preset by relevant technical personnel. For example, the response time threshold can be 500ms, the utilization rate threshold can be 40%, and the preset number of nodes can be 2 nodes. At the same time, the initial system throughput is adjusted, and the adjusted system throughput is used as the intermediate throughput to perform the second round of resource demand iteration, and it is judged again whether the actual system throughput corresponding to any system environment cluster in the system under test can withstand the data transmission pressure brought by the intermediate system throughput, so as to determine whether the intermediate number of server nodes corresponding to any system environment cluster needs to be adjusted. The iteration stops until any system environment cluster in the system under test can no longer withstand the data transmission pressure brought by the intermediate system throughput.
[0039] Exemplarily, there are system environment clusters A, B, and C in the system under test, and the initial number of server nodes corresponding to system environment clusters A, B, and C are 2 nodes, 4 nodes, and 4 nodes respectively. The stress program controls the initial system throughput of any system environment cluster in the system under test to be 10,000 tps, the preset time period is 8 hours, the monitoring tool is Nmon, the response time threshold is 500 ms, the utilization rate threshold is 40%, and the preset number of nodes is 2 nodes. Nmon monitors the actual system throughput, data response time, and resource utilization rate corresponding to any system environment cluster in the system under test within 8 hours. If the actual system throughput corresponding to system environment clusters A, B, and C all reaches 10,000 tps, then obtain the data response time and resource usage corresponding to system environment clusters A, B, and C respectively. If the data response times corresponding to system environment clusters A, B, and C are 400 ms, 450 ms, and 600 ms respectively, it can be determined that the data response time of system environment cluster C is greater than the preset response time threshold. Therefore, add 2 nodes to system environment cluster C to obtain the intermediate number of server nodes corresponding to system environment clusters A, B, and C as 2 nodes, 4 nodes, and 6 nodes respectively. If the resource utilization rates corresponding to system environment clusters A, B, and C are 30%, 50%, and 20% respectively, it can be determined that the resource utilization rate of system environment cluster B is greater than the preset utilization rate threshold. Therefore, add 2 nodes to system environment cluster B to obtain the intermediate number of server nodes corresponding to system environment clusters A, B, and C as 2 nodes, 6 nodes, and 6 nodes respectively. Since the actual system throughput corresponding to system environment clusters A, B, and C all reaches 10,000 tps, a second round of resource demand iteration is performed. The initial system throughput of 1,000 tps is adjusted to 2,000 tps through the stress program, and the adjusted 2,000 tps is used as the intermediate system throughput. Continue to judge the performance parameters corresponding to any system environment cluster in the second round of resource demand iteration until the actual system throughput corresponding to system environment clusters A, B, and C is less than the intermediate system throughput and then stop the iteration. For example, after four iterations, the intermediate system throughput is 4,000 tps, and the actual system throughput corresponding to system environment clusters A, B, and C are 3,200 tps, 3,300 tps, and 3,500 tps respectively. At this time, the actual system throughput of the three system environment clusters is less than the intermediate system throughput, and the iteration of resource demand can be terminated.
[0040] The above solution determines the number of iterations of resource requirements by judging whether the actual system throughput corresponding to any system environment cluster in the system under test can withstand the data transmission pressure brought by the intermediate system throughput, improving the determination accuracy of the number of iterations of resource requirements, and thus being able to improve the determination accuracy of the subsequent target resource requirements.
[0041] Optionally, the number of iterations of resource requirements can also be manually set by relevant technical personnel according to actual experience values or experimental values. For example, the number of iterations of resource requirements can be set to 3 times. That is, regardless of whether the actual system throughput of any system environment cluster in the system under test in the third round of iteration is equal to the intermediate system throughput, the iteration of resource requirements is terminated.
[0042] S140. Based on the initial system throughput, the initial number of server nodes, the intermediate system throughput, the intermediate number of server nodes, and the preset target system throughput, and based on the preset resource requirement determination algorithm, determine the target resource requirements of any system environment cluster in the system under test.
[0043] Among them, the target system throughput can be preset by relevant personnel according to actual needs. The target system throughput can be the estimated system throughput that the system environment clusters of the system under test are desired to support. For example, the target system throughput of any system environment cluster can be 100,000 tps. It should be noted that the target system throughput corresponding to any system environment cluster can be the same or different, and can be specifically preset according to actual needs. The target resource requirements can be the number of server resources that need to be deployed in the system under test for the environment of the system under test to support the target system throughput.
[0044] The resource requirement determination algorithm can be preset by relevant technical personnel, and can specifically be set according to the correlation relationship among the initial system throughput, the initial number of server nodes, the intermediate system throughput, the intermediate number of server nodes, and the target system throughput.
[0045] In an alternative embodiment, the target resource requirements of any system environment cluster in the system under test are determined according to the following formula: Among them, S is the target resource requirement of any system environment cluster, α is the capacity coefficient, ceil represents rounding up S, M is the target system throughput of any system environment cluster, N is the initial system throughput of any system environment cluster, n is the initial number of server nodes of any system environment cluster, P is the intermediate system throughput of any system environment cluster, and p is the intermediate number of server nodes of any system environment cluster.
[0046] The intermediate system throughput and the number of intermediate server nodes are related to the number of iterations of the resource demand. For example, if the number of iterations of the resource demand is multiple, the intermediate system throughput may include the first intermediate system throughput, the second intermediate system throughput, and the third intermediate system throughput, etc. Correspondingly, the number of intermediate server nodes may include the number of first intermediate server nodes, the number of second intermediate server nodes, and the number of third intermediate server nodes, etc. Among them, the capacity coefficient α can be pre-set by relevant technical personnel. For example, the capacity coefficient α can be 2. Among them, ceil represents the rounding up of the calculation result of S.
[0047] Exemplarily, the system under test includes system environment cluster A, system environment cluster B, system environment cluster C and system environment cluster D. The system under test has gone through four rounds of resource demand iterations, and the data adjusted during each round of the system environment cluster iterations are shown in Table 1.
[0048] Table 1 Data adjustment table of system environment cluster iteration process
[0049]
[0050]
[0051] Correspondingly, the formula for target resource demand is: Among them, the capacity factor α is 2, C 1 , C 2 and C 3 They are the first intermediate system throughput, the second intermediate system throughput, and the third intermediate system throughput corresponding to each system environment cluster. 1 、c 2 and c 3 The numbers are the number of first intermediate server nodes, the number of second intermediate server nodes and the number of third intermediate server nodes corresponding to each system environment cluster respectively.
[0052] According to the data adjusted in four rounds of iterations of each system environment cluster in Table 1, based on the formula for determining the target resource demand, it can be obtained that the target resource demand of system environment cluster A is 7 nodes, the target resource demand of system environment cluster B is 22 nodes, the target resource demand of system environment cluster C is 15 nodes, and the target resource demand of system environment cluster D is 10 nodes.
[0053] This embodiment is implemented by formula Determining the target resource demand improves the accuracy of determining the target resource demand, avoids resource waste caused by overestimation of target resource capacity, and avoids resource bottlenecks caused by underestimation.
[0054] The embodiment of the present application can truly simulate the transmission process of data in each system environment cluster during the operation of the system to be tested by inputting the test data associated with the system to be tested into the system to be tested, so as to more accurately determine the resource usage of each system environment cluster. The transmission rate of the test data in the system to be tested is controlled by the stress test tool, so as to achieve the control of the initial system throughput of the system to be tested. According to the initial system throughput, the performance parameters corresponding to any system environment in the system to be tested are determined; according to the performance parameters and the preset adjustment rules, the initial number of server nodes corresponding to any system environment cluster in the system to be tested is adjusted to obtain the intermediate system throughput and the number of intermediate server nodes. By adjusting the initial system throughput and obtaining the intermediate system throughput, the resource capacity of each system environment cluster in the system to be tested can be borne to the greatest extent, avoiding the waste of resource capacity of each system environment cluster in the system to be tested. According to the initial system throughput, the initial number of server nodes, the intermediate system throughput, the number of intermediate server nodes and the preset target system throughput, based on the preset resource demand determination algorithm, the target resource demand of any system environment cluster in the system to be tested is determined. The invention solves the problem of incorrect determination of resource demand caused by human judgment in the prior art, improves the accuracy of determining target resource demand, avoids resource waste caused by over-estimation of target resource capacity, and avoids resource bottleneck caused by under-estimation.
[0055] Embodiment 2
[0056] Figure 2 A flowchart of a method for determining resource demand provided in Example 2 of the present application is provided. This example is optimized and improved on the basis of the above-mentioned technical solutions.
[0057] Further, the step of "adjusting the initial system throughput and the number of server nodes corresponding to any system environment cluster in the system to be tested according to performance parameters and preset adjustment rules to obtain the intermediate system throughput and the number of intermediate server nodes" is refined into "determining whether there is a first system environment cluster that meets the preset pressure condition according to the actual system throughput and the initial system throughput of any system environment cluster; if so, determining whether the cluster number of the first system environment cluster is greater than the preset system cluster number threshold; if so, determining the system environment cluster to be adjusted from any system environment cluster according to the data response time and / or the resource utilization rate, adjusting the initial server node number of the system environment cluster to be adjusted based on the preset node number adjustment rules to obtain the intermediate server node number of the environment cluster to be adjusted; and adjusting the initial system throughput to the intermediate system throughput according to the preset throughput adjustment rules." so as to improve the method for determining the intermediate system throughput and the intermediate server node number.
[0058] Further, after obtaining the intermediate system throughput and the number of intermediate server nodes, add the step "According to the actual system throughput of any system environment cluster and the intermediate system throughput, determine whether there is a first system environment cluster that meets the preset pressure condition; if not, then execute the determination of the target resource demand of any system environment cluster in the system under test based on the initial system throughput, the initial number of server nodes, the intermediate system throughput, the intermediate number of server nodes, and the preset target system throughput according to the preset resource demand determination algorithm." to implement the judgment of the first system environment cluster.
[0059] Further, after the step "Determine whether there is a first system environment cluster that meets the preset pressure condition", add the step "If there is no first system environment cluster that meets the preset pressure condition, then determine the target resource demand of any system environment cluster in the system under test according to the initial system throughput, the preset target system throughput, and the initial number of server nodes corresponding to any environment cluster." to improve the judgment of the first system environment cluster.
[0060] As Figure 2 shown, the method includes the following specific steps:
[0061] S210. Input test data into the system under test, and control the initial system throughput of the system under test according to the preset pressure test tool.
[0062] S220. Based on the initial system throughput, determine the performance parameters corresponding to any system environment cluster in the system under test according to the preset monitoring tool; where any system environment cluster includes at least one initial server node.
[0063] S230. According to the actual system throughput and the initial system throughput of any system environment cluster, determine whether there is a first system environment cluster that meets the preset pressure condition; if so, execute S240A, if not, execute S240B.
[0064] Among them, the preset pressure condition can be preset by relevant technical personnel. For example, the preset pressure condition can be that the system environment cluster can withstand the data transmission pressure brought by the initial system throughput, that is, the actual system throughput of the system environment cluster is equal to the initial system throughput. The first environment cluster can be a system environment cluster in any system environment cluster of the system under test that meets the preset pressure condition.
[0065] Exemplarily, determine whether the actual system throughput of any system environment cluster is the same as the initial system throughput. If so, execute S240A; if not, execute S240B. For example, in the system under test, there are system environment clusters A, B, and C. The system environment clusters that meet the preset pressure conditions are system environment clusters A and B. Therefore, the first environment clusters are system environment clusters A and B.
[0066] S240A. Determine whether the number of clusters in the first system environment cluster is greater than the preset system cluster number threshold. If so, execute S250; if not, execute S240B.
[0067] Among them, the system cluster number threshold can be preset by relevant technical personnel according to actual needs. The setting of the system cluster number threshold is specifically related to the number of system environment clusters in the system under test. For example, if there are 4 system environment clusters in the system under test, the system cluster number threshold can be 3 or 4, which is specifically set according to actual needs, and this embodiment does not limit this.
[0068] S240B. Determine the target resource demand of any system environment cluster in the system under test according to the initial system throughput, the preset target system throughput, and the number of initial server nodes corresponding to any environment cluster.
[0069] The target resource demand of any system environment cluster in the system under test can be determined according to the following formula:
[0070]
[0071] Among them, S is the target resource demand of any system environment cluster, α is the capacity coefficient, M is the target system throughput of any system environment cluster, N is the initial system throughput of any system environment cluster, and n is the number of initial server nodes of any system environment cluster.
[0072] Exemplarily, the capacity coefficient α is 2, the target system throughput M of the preset system environment cluster A is 50000, the initial system throughput N of the system environment cluster is 10000, and the number of initial server nodes n of the system environment cluster A is 4. According to the calculation formula of the target resource demand, the target resource demand of the system environment cluster A can be obtained as 40 nodes.
[0073] S250. Determine the system environment cluster to be adjusted from any system environment cluster according to the data response time and / or resource utilization rate, and adjust the number of initial server nodes of the system environment cluster to be adjusted based on the preset node number adjustment rule to obtain the intermediate number of server nodes of the system environment cluster to be adjusted.
[0074] The system environment cluster to be adjusted can be a system environment cluster with a relatively high data response time and / or a relatively high resource utilization rate. The node number adjustment rule can be preset by relevant technical personnel. For example, the node number adjustment rule can be to add server nodes with a preset number of nodes based on the initial server nodes of the system environment cluster to be adjusted, where the preset number of nodes can be preset by relevant technical personnel. For example, the preset number of nodes can be 2 nodes. The number of intermediate server nodes can be the number of server nodes after adjusting the number of initial server nodes to be adjusted, that is, the number of intermediate server nodes can be the sum of the number of initial server nodes and the preset number of nodes.
[0075] Exemplarily, a response time threshold and a utilization rate threshold can be preset by relevant technical personnel. If the data response time of the system environment cluster is greater than the response time threshold, it is considered that the data response time of the system environment cluster is relatively high. If the resource utilization rate of the system environment cluster is greater than the utilization rate threshold, it is considered that the resource utilization rate of the system environment cluster is relatively high. Among them, the response time threshold can be 500 ms, and the utilization rate threshold can be 40%. If the data response time of the system environment cluster is less than or equal to the response time threshold, it can be considered that the data response time of the system environment cluster is normal. If the resource utilization rate of the system environment cluster is less than or equal to the utilization rate threshold, it can be considered that the resource utilization rate of the system environment cluster is normal.
[0076] Exemplarily, there are system environment cluster A, system environment cluster B, system environment cluster C, and system environment cluster D in the system to be tested. The number of initial server nodes, data response time, and resource utilization rate corresponding to each system environment cluster are shown in Table 2. Among them, the resource utilization rate of system environment cluster B is relatively high, and both the data response time and the resource utilization rate of system environment cluster C are relatively high. If the preset number of nodes is 2 nodes, the number of intermediate server nodes of system environment cluster B is 6, and the number of intermediate server nodes of system environment cluster C is 6.
[0077] Table 2 Performance parameter table of system environment clusters
[0078] System environment cluster Initial number of server nodes Data response time Resource utilization rate System environment cluster A 2 Normal Normal System environment cluster B 4 Normal On the high side System environment cluster C 4 On the high side On the high side System environment cluster D 2 Normal Normal
[0079] S260. Adjust the initial system throughput to the intermediate system throughput according to the preset throughput adjustment rule.
[0080] The throughput adjustment rule can be preset by relevant technical personnel. For example, the throughput adjustment rule can be that when the system environment cluster can withstand the data transmission pressure brought by the initial system throughput, that is, when the actual system throughput of the system environment cluster is equal to the initial system throughput, based on a preset throughput adjustment threshold, the initial system throughput is adjusted to obtain an intermediate system throughput. The intermediate system throughput can be the sum of the initial system throughput and the throughput adjustment threshold. Among them, the throughput adjustment threshold can be preset by relevant technical personnel. For example, the throughput adjustment threshold can be 10,000. Exemplarily, if the initial system throughput is 10,000, according to the preset throughput adjustment rule, the intermediate system throughput is 20,000.
[0081] S270. According to the actual system throughput and the intermediate system throughput of any system environment cluster, determine whether there is a first system environment cluster that meets the preset pressure condition.
[0082] If the system environment cluster can withstand the data transmission pressure brought by the intermediate system throughput, that is, the actual system throughput of the system environment cluster is equal to the intermediate system throughput, it can be considered that the system environment cluster meets the preset pressure condition. If the system environment cluster cannot withstand the data transmission pressure brought by the intermediate system throughput, that is, the actual system throughput of the system environment cluster is less than the intermediate system throughput, it can be considered that the system environment cluster does not meet the preset pressure condition.
[0083] Exemplarily, according to the actual system throughput and the intermediate system throughput of any system environment cluster, determine whether there is a first system environment cluster that meets the preset pressure condition. If so, use the intermediate system throughput and the intermediate server node quantity as the first intermediate system throughput and the first intermediate server node quantity respectively. According to the data response time and / or resource utilization rate, determine the system environment cluster to be adjusted from any system environment cluster, and based on the preset node quantity adjustment rule, adjust the first intermediate server node quantity of the system environment cluster to be adjusted to obtain the second intermediate server node quantity after adjustment of the system environment cluster to be adjusted. According to the preset throughput adjustment rule, adjust the first intermediate system throughput to obtain the adjusted second intermediate system throughput.
[0084] S280. If not, based on the initial system throughput, the initial server node quantity, the intermediate system throughput, the intermediate server node quantity, and the preset target system throughput, and based on the preset resource demand determination algorithm, determine the target resource demand of any system environment cluster in the system to be tested.
[0085] This embodiment refines the judgment of whether there is a first system environment cluster that meets the preset pressure condition, and improves the method of determining the intermediate system throughput and the number of intermediate server nodes. Through the node quantity adjustment rule, the initial server node number of the system environment cluster to be adjusted is adjusted to obtain the number of intermediate server nodes; and the initial system throughput is adjusted to the intermediate system throughput through the throughput adjustment rule, thereby improving the accuracy of determining the intermediate system throughput and the number of intermediate server nodes. This embodiment determines the target resource demand of any system environment cluster in the system to be tested based on the initial system throughput, the initial server node number, the intermediate system throughput, the number of intermediate server nodes and the preset target system throughput, based on the preset resource demand determination algorithm, thereby improving the accuracy of determining the target resource demand, avoiding resource waste caused by over-estimation of the target resource capacity, and avoiding the occurrence of resource bottlenecks caused by under-estimation.
[0086] Embodiment 3
[0087] Figure 3A It is a detection process diagram of a database object consistency detection method provided in Example 3 of the present application. Based on the technical solutions of the above embodiments, this embodiment of the present application provides a preferred implementation method.
[0088] like Figure 3A As shown, this embodiment includes the following specific steps:
[0089] S310: Initialize and deploy the test environment of the system to be tested.
[0090] Based on the characteristics of each application service of the system under test, the system environment cluster distribution is planned according to experience, and the initial deployment is completed. The core deployment architecture of the test environment of the system under test is the data exchange cluster (2 nodes), the indicator calculation cluster (4 nodes), the intelligent decision cluster (4 nodes), the detailed data query cluster (5 nodes), and the JMeter cluster. The data transmission link between the system environment clusters of the system under test is shown in the figure below. Figure 3B shown.
[0091] S320: Preparation of transaction flow and simulated online request test data.
[0092] Extract production environment data and perform desensitization on transaction flow (Group A data) and simulated online request (Group B data). Group A data simulates quasi-real-time asynchronous transaction flow for stateful indicator calculation; Group B is online request message, simulating online transaction for real-time risk monitoring. Prepare stress program for simulating online request based on test data and deploy it in JMeter cluster for subsequent stress testing.
[0093] S330: Simulate quasi-real-time link stress test of the system under test.
[0094] The quasi-real-time link pressure test only relies on the test data of Group A and accesses the transaction flow through the data exchange cluster. First, the flow is pushed to the metric calculation cluster for stateful metric calculation; then, the quasi-real-time decision sub-cluster of the intelligent decision-making cluster is called through the load balancer to judge the system risk. During this process, the decision engine queries the metric data; finally, the generated warning information goes through the data exchange cluster and is stored in the detailed data query cluster.
[0095] In the quasi-real-time link, pay attention to the core service capabilities of the data exchange cluster, the metric calculation cluster, the quasi-real-time decision sub-cluster of the intelligent decision-making cluster, and the detailed data query cluster.
[0096] S340: Simulate the real-time link pressure test of the system under test.
[0097] The real-time link pressure test relies on the data of Group A and Group B and accesses the transaction flow through the data exchange cluster. First, the flow is pushed to the metric calculation cluster for stateful metric calculation; the JMeter cluster simulates the online request message. Then, the real-time decision sub-cluster of the intelligent decision-making cluster is called through the load balancer to judge the risk. During this process, the decision engine queries the metric data; finally, the generated warning information goes through the data exchange cluster and is stored in the detailed data query cluster.
[0098] In the real-time link, pay attention to the core service capabilities of the data exchange cluster, the metric calculation cluster, the real-time decision sub-cluster of the intelligent decision-making cluster, and the detailed data query cluster.
[0099] S350: Quantitatively analyze the support capabilities of the relevant service components of the quasi-real-time link and the real-time link.
[0100] The results of the pressure test are shown in Table 3. In the entire link of the pressure test, the resource utilization rate of the metric calculation service is relatively high, and the response time and resource utilization rate of the quasi-real-time decision service are relatively high. Then, server resources should be added to the metric calculation cluster and the quasi-real-time decision sub-cluster of the intelligent decision-making cluster in the next round of pressure test.
[0101] Table 3 Pressure Test Result Table
[0102]
[0103]
[0104] Among them, the resources of the detailed data query cluster can be determined by relevant technical personnel whether to add according to actual needs. For example, when the actual system throughput of the detailed data query reaches the preset query throughput threshold, server nodes can be added to the detailed data query cluster. For example, the preset query throughput threshold can be 50 tps.
[0105] S360: Determine the resource requirements corresponding to the system environment cluster of the system to be tested.
[0106] Based on the quantization results of the previous round of testing, adjust the resources of the test environment of the system to be tested, and repeat S303, S304, and S305 to obtain a more ideal result. Among them, the estimation formula for the resource requirements corresponding to each system environment cluster is: Round up (capacity coefficient * target resource requirement (TPS) / (actual system throughput (TPS) in the first round / initial number of server nodes + actual system throughput (TPS) in the second round / number of intermediate server nodes + actual system throughput (TPS) in the third round / number of intermediate server nodes)). The iterative results of the server resources for each system environment cluster are shown in Table 4.
[0107] Table 4 Iterative Results Table of Server Resources for Each System Environment Cluster
[0108]
[0109] Example 4
[0110] Figure 4 The following is a schematic structural diagram of a device for determining resource requirements provided in Example 4 of the present application. A device for determining resource requirements provided in an embodiment of the present application is applicable to the situation of determining the resource requirements of an application system, and the device can be implemented in a software and / or hardware manner. As Figure 4 shown, the device specifically includes: an initial system throughput control module 401, a performance parameter determination module 402, an intermediate server node number determination module 403, and a first target resource requirement determination module 404. Among them,
[0111] The initial system throughput control module 401 is configured to input test data into the system to be tested and control the initial system throughput of the system to be tested according to a preset stress test tool;
[0112] The performance parameter determination module 402 is configured to determine the performance parameters corresponding to any system environment cluster in the system to be tested based on the initial system throughput according to a preset monitoring tool; where any system environment cluster includes at least one initial server node;
[0113] The intermediate server node number determination module 403 is configured to adjust the initial system throughput and the number of initial server nodes corresponding to any system environment cluster in the system to be tested according to the performance parameters and a preset adjustment rule to obtain an intermediate system throughput and an intermediate number of server nodes;
[0114] The first target resource demand determination module 404 is used to determine the target resource demand of any system environment cluster in the system to be tested based on a preset resource demand determination algorithm according to the initial system throughput, the initial server node number, the intermediate system throughput, the intermediate server node number and the preset target system throughput.
[0115] The embodiment of the present application can truly simulate the transmission process of data in each system environment cluster during the operation of the system to be tested by inputting the test data associated with the system to be tested into the system to be tested, so as to more accurately determine the resource usage of each system environment cluster. The transmission rate of the test data in the system to be tested is controlled by the stress test tool, so as to achieve the control of the initial system throughput of the system to be tested. According to the initial system throughput, the performance parameters corresponding to any system environment in the system to be tested are determined; according to the performance parameters and the preset adjustment rules, the initial number of server nodes corresponding to any system environment cluster in the system to be tested is adjusted to obtain the intermediate system throughput and the number of intermediate server nodes. By adjusting the initial system throughput and obtaining the intermediate system throughput, the resource capacity of each system environment cluster in the system to be tested can be borne to the greatest extent, avoiding the waste of resource capacity of each system environment cluster in the system to be tested. According to the initial system throughput, the initial number of server nodes, the intermediate system throughput, the number of intermediate server nodes and the preset target system throughput, based on the preset resource demand determination algorithm, the target resource demand of any system environment cluster in the system to be tested is determined. The invention solves the problem of incorrect determination of resource demand caused by human judgment in the prior art, improves the accuracy of determining target resource demand, avoids resource waste caused by over-estimation of target resource capacity, and avoids resource bottleneck caused by under-estimation.
[0116] Optionally, the performance parameters include actual system throughput, data response time and resource utilization.
[0117] Optionally, the intermediate server node quantity determination module 403 includes:
[0118] A first system environment cluster determination unit, configured to determine whether there is a first system environment cluster that meets a preset pressure condition according to an actual system throughput of any of the system environment clusters and the initial system throughput;
[0119] a cluster quantity determination unit, configured to determine whether the number of clusters of a first system environment cluster satisfying a preset pressure condition is greater than a preset system cluster quantity threshold if there is a first system environment cluster satisfying a preset pressure condition;
[0120] An intermediate server node quantity determination unit, configured to, if the cluster quantity of the first system environment cluster is greater than a preset system cluster quantity threshold, determine a to-be-adjusted system environment cluster from any one of the system environment clusters according to the data response time and / or the resource utilization rate, and adjust the initial server node quantity of the to-be-adjusted system environment cluster based on a preset node quantity adjustment rule to obtain the intermediate server node quantity of the to-be-adjusted environment cluster;
[0121] An intermediate system throughput adjustment unit, configured to adjust the initial system throughput to the intermediate system throughput according to a preset throughput adjustment rule.
[0122] Optionally, the method further includes:
[0123] A first system environment cluster judgment module, configured to, after obtaining the intermediate system throughput and the intermediate server node quantity, judge whether there is a first system environment cluster that meets a preset pressure condition according to the actual system throughput of any one of the system environment clusters and the intermediate system throughput;
[0124] If not, execute determining the target resource demand of any one of the system environment clusters in the to-be-tested system based on a preset resource demand quantity determination algorithm according to the initial system throughput, the initial server node quantity, the intermediate system throughput, the intermediate server node quantity, and a preset target system throughput.
[0125] Optionally, the device further includes:
[0126] A second target resource demand judgment module, configured to, after judging whether there is a first system environment cluster that meets a preset pressure condition, if there is no first system environment cluster that meets a preset pressure condition, determine the target resource demand of any one of the system environment clusters in the to-be-tested system according to the initial system throughput, a preset target system throughput, and the initial server node quantity corresponding to any one of the environment clusters.
[0127] Optionally, the intermediate server node quantity determination unit includes:
[0128] A to-be-adjusted environment cluster judgment subunit, configured to judge whether there is a to-be-adjusted environment cluster in any one of the system environment clusters whose response time and / or resource utilization rate meet a preset performance judgment condition;
[0129] An intermediate server node quantity determination subunit, configured to, if there is an environment cluster to be adjusted in any system environment cluster whose response time and / or resource utilization rate meet preset performance judgment conditions, increase the service node quantity of the environment cluster to be adjusted based on the response time and / or the resource usage amount of the environment cluster to be adjusted and based on a preset node quantity adjustment rule, so as to obtain the intermediate server node quantity of the environment cluster to be adjusted.
[0130] Optionally, the first target resource demand quantity determination module 404 includes:
[0131] A first target resource demand quantity determination unit, configured to determine the target resource demand quantity of any system environment cluster in the system to be measured according to the following formula:
[0132]
[0133] where S is the target resource demand quantity of any system environment cluster, α is a capacity coefficient, ceil represents rounding up to the nearest integer for S, M is the target system throughput of any system environment cluster, N is the initial system throughput of any system environment cluster, n is the initial server node quantity of any system environment cluster, P is the intermediate system throughput of any system environment cluster, and p is the intermediate server node quantity of any system environment cluster.
[0134] The above resource demand quantity determination device can execute the resource demand quantity determination method provided in any embodiment of the present application, and has corresponding function modules and beneficial effects for executing each resource demand quantity determination method.
[0135] Embodiment 5
[0136] Figure 5 FIG. is a schematic structural diagram of an electronic device provided in Embodiment 5 of the present application. Figure 5 FIG. shows a block diagram of an exemplary electronic device 500 suitable for implementing the embodiments of the present application. Figure 5 The shown electronic device 500 is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0137] As Figure 5 shown, the electronic device 500 is presented in the form of a general-purpose computing device. The components of the electronic device 500 may include but are not limited to: one or more processors or processing units 501, a system memory 502, and a bus 503 connecting different system components (including the system memory 502 and the processing unit 501).
[0138] The bus 503 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor bus, or a local bus using any of the several bus structures. By way of example, and not limitation, these architectures include the Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0139] The electronic device 500 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 500, including both volatile and nonvolatile media, removable and non-removable media.
[0140] The system memory 502 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 504 and / or cache memory 505. The electronic device 500 may further include other removable / non-removable, volatile / nonvolatile computer system storage media. By way of example only, a storage system 506 can be provided for reading from and writing to non-removable, nonvolatile magnetic media ( Figure 5 not shown and typically called a "hard disk drive"). Although Figure 5 not shown in the figures, a disk drive for reading from and writing to a removable nonvolatile disk (e.g., a "floppy disk"), and an optical disk drive for reading from and writing to a removable nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM or other optical media) can be provided. In these instances, each drive can be connected to the bus 503 by one or more data media interfaces. The memory 502 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of the embodiments of the present application.
[0141] A program / utility 508 having a set (at least one) of program modules 507 can be stored, for example, in the memory 502. Such program modules 507 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. The program modules 507 typically carry out the functions and / or methods of the embodiments described in the present application.
[0142] The electronic device 500 can also communicate with one or more external devices 509 (such as a keyboard, a pointing device, a display 510, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 511. Moreover, the electronic device 500 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 512. As shown in the figure, the network adapter 512 communicates with other modules of the electronic device 500 through the bus 503. It should be understood that although Figure 5 not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0143] The processing unit 501 executes various functional applications and data processing by running programs stored in the system memory 502, for example, implementing a method for determining resource requirements provided by an embodiment of the present application.
[0144] Embodiment Six
[0145] Embodiment Six of the present application also provides a storage medium containing computer-executable instructions, on which a computer program is stored. When the program is executed by a processor, it implements the method for determining resource requirements provided by an embodiment of the present application, including: inputting test data into the system under test, controlling the initial system throughput of the system under test according to a preset stress test tool; determining performance parameters corresponding to any system environment cluster in the system under test based on the initial system throughput according to a preset monitoring tool; wherein, any system environment cluster includes at least one initial server node; adjusting the initial system throughput and the number of initial server nodes corresponding to any system environment cluster in the system under test according to the performance parameters and a preset adjustment rule to obtain an intermediate system throughput and an intermediate number of server nodes; and determining the target resource requirements of any system environment cluster in the system under test based on the initial system throughput, the initial number of server nodes, the intermediate system throughput, the intermediate number of server nodes, and a preset target system throughput according to a preset resource requirement determination algorithm.
[0146] The computer storage medium of the embodiments of the present application may adopt any combination of one or more computer-readable media. The computer-readable media may be computer-readable signal media or computer-readable storage media. The computer-readable storage media may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage media may be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
[0147] The computer-readable signal media may include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal media may also be any computer-readable media other than the computer-readable storage media, and the computer-readable media can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.
[0148] The program code contained on the computer-readable media can be transmitted by any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0149] The computer program code for performing the operations of the present application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0150] Note that the above is only the preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for determining resource requirements, characterized in that, it includes: Input test data into the system under test, and control the initial system throughput of the system under test according to a preset stress testing tool; Based on the initial system throughput, determine the performance parameters corresponding to any system environment cluster in the system under test according to a preset monitoring tool; wherein, any system environment cluster includes at least one initial server node; the performance parameters include actual system throughput, data response time, and resource utilization rate; According to the actual system throughput of any system environment cluster and the initial system throughput, determine whether there is a first system environment cluster that meets the preset pressure condition; the preset pressure condition is that the system environment cluster can withstand the data transmission pressure brought by the initial system throughput; If so, determine whether the number of clusters of the first system environment cluster is greater than a preset system cluster number threshold; If so, determine a system environment cluster to be adjusted in any system environment cluster where the data response time is greater than the response time threshold and / or the resource utilization rate is greater than the utilization rate threshold, and increase the number of server nodes by a preset number of nodes on the basis of the number of initial server nodes in the system environment cluster to be adjusted to obtain the intermediate number of server nodes in the system environment cluster to be adjusted; According to a preset throughput adjustment rule, adjust the initial system throughput to an intermediate system throughput; the intermediate system throughput is the sum of the initial system throughput and the throughput adjustment threshold; Determine the target resource requirements of any system environment cluster in the system under test according to the following formula: where S is the target resource requirements of any system environment cluster, ceil represents rounding up to the nearest integer of the S-th, α is the capacity coefficient, M is the preset target system throughput of any system environment cluster, N is the initial system throughput of any system environment cluster, n is the number of initial server nodes in any system environment cluster, P is the intermediate system throughput of any system environment cluster, and p is the intermediate number of server nodes in any system environment cluster.
2. The method according to claim 1, characterized in that, after obtaining the intermediate system throughput and the intermediate number of server nodes, it further includes: According to the actual system throughput of any system environment cluster and the intermediate system throughput, determine whether there is a first system environment cluster that meets the preset pressure condition; the preset pressure condition is that the system environment cluster can withstand the data transmission pressure brought by the intermediate system throughput; If not, execute to determine the target resource requirements of any system environment cluster in the system under test based on the initial system throughput, the number of initial server nodes, the intermediate system throughput, the intermediate number of server nodes, and the preset target system throughput according to a preset resource requirements determination algorithm.
3. The method according to claim 1, characterized in that, after determining whether there is a first system environment cluster that meets the preset pressure condition, it further includes: If there is no first system environment cluster that meets the preset pressure condition, the target resource demand of any system environment cluster in the system to be tested is determined according to the initial system throughput, the preset target system throughput, and the number of initial server nodes corresponding to any system environment cluster.
4. A device for determining resource demand, characterized in that, it includes: An initial system throughput control module, configured to input test data into the system to be tested and control the initial system throughput of the system to be tested according to a preset pressure test tool; A performance parameter determination module, configured to determine the performance parameters corresponding to any system environment cluster in the system to be tested based on the initial system throughput according to a preset monitoring tool; wherein, at least one initial server node is included in any system environment cluster; the performance parameters include actual system throughput, data response time, and resource utilization rate; An intermediate server node number determination module, configured to adjust the initial system throughput and the number of initial server nodes corresponding to any system environment cluster in the system to be tested according to the performance parameters and a preset adjustment rule to obtain an intermediate system throughput and an intermediate server node number; A first target resource demand determination module, configured to determine the target resource demand of any system environment cluster in the system to be tested based on the initial system throughput, the number of initial server nodes, the intermediate system throughput, the intermediate server node number, and the preset target system throughput according to a preset resource demand determination algorithm; The intermediate server node number determination module includes: A first system environment cluster judgment unit, configured to judge whether there is a first system environment cluster that meets the preset pressure condition according to the actual system throughput of any system environment cluster and the initial system throughput; the preset pressure condition is that the system environment cluster can withstand the data transmission pressure brought by the initial system throughput; A cluster number judgment unit, configured to judge whether the cluster number of the first system environment cluster is greater than a preset system cluster number threshold if there is a first system environment cluster that meets the preset pressure condition; An intermediate server node number determination unit, configured to, if the cluster number of the first system environment cluster is greater than the preset system cluster number threshold, determine a system environment cluster to be adjusted in any system environment cluster where the data response time is greater than the response time threshold and / or the resource utilization rate is greater than the utilization rate threshold, and add server nodes with a preset number of nodes on the basis of the number of initial server nodes of the system environment cluster to be adjusted to obtain the intermediate server node number of the system environment cluster to be adjusted; An intermediate system throughput adjustment unit, configured to adjust the initial system throughput to an intermediate system throughput according to a preset throughput adjustment rule; the intermediate system throughput is the sum of the initial system throughput and the throughput adjustment threshold; The first target resource demand determination module includes: A first target resource demand determination unit, configured to determine the target resource demand of any system environment cluster in the system to be tested according to the following formula: Wherein, S is the target resource demand of any system environment cluster, α is the capacity coefficient, ceil represents rounding up S to the nearest integer, M is the preset target system throughput of any system environment cluster, N is the initial system throughput of any system environment cluster, n is the number of initial server nodes of any system environment cluster, P is the intermediate system throughput of any system environment cluster, and p is the number of intermediate server nodes of any system environment cluster.
5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the program, it implements the resource demand determination method according to any one of claims 1-3.
6. A computer-readable storage medium, having stored thereon a computer program, characterized in that when the program is executed by the processor, it implements the resource demand determination method according to any one of claims 1-3.
Citation Information
Patent Citations
Resource adjustment method, device, cloud platform and server
CN109343965A
Server operation method, server operation system and related device
CN111740880A