Distributed system performance test method and device and electronic equipment
By building a distributed performance test platform and adjusting the press load using a dynamic load decision engine, the inefficiency and uneven resource allocation problems in the traditional distributed system performance testing methods are solved, and efficient and accurate performance testing and automatic optimization are achieved. Reduced testing costs.
Patent Information
- Application Number
- CN202410952974.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-12
AI Technical Summary
Traditional distributed system performance testing methods are inefficient, uneven resource allocation, insufficient accuracy of test results, poor press scalability, and low test efficiency.
By building a distributed performance testing platform, data is collected and processed in real time, and the dynamic load decision engine is used to adjust the press load, combining intelligent scheduling and parallel computing technology to achieve optimized resource allocation and automatic adjustment.
It significantly improves the efficiency and accuracy of distributed system performance testing, reduces testing costs, and achieves continuous improvement of test platform performance and optimization of resource use.
Smart Images

Figure CN118939536A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer science software performance testing, and in particular to a distributed system performance testing method, device and electronic equipment. Background Art
[0002] With the rise of distributed systems, enterprises have begun to actively explore the migration of host systems. Compared with traditional host centralized systems, distributed systems are less expensive, but they are larger in scale, have more system roles, and have more complex calling relationships. Therefore, it is particularly important to perform performance testing on distributed systems before production to obtain the capacity and expansion capabilities of distributed systems.
[0003] In order to optimize the performance of distributed systems, it is often necessary to perform performance tests on the system and then adjust system parameters based on the test results. Existing distributed system performance testing methods usually use static manual experimental exploratory resource allocation, which often cannot accurately reflect the actual performance of the system when facing a complex and changeable distributed system environment. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a distributed system performance testing method, device and electronic equipment to solve the problems existing in traditional distributed system performance testing, such as low efficiency, uneven resource allocation, insufficient test result accuracy, poor press scalability, and low test efficiency.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] In one aspect, the present invention provides a distributed system performance testing method, comprising:
[0007] Step S101: constructing a distributed performance testing platform;
[0008] Step S102: collecting and processing data in real time;
[0009] Step S103: using a dynamic load decision engine to adjust the press load.
[0010] In another aspect, the present invention provides a distributed system performance testing device, comprising:
[0011] Building modules for building a distributed performance testing platform;
[0012] Acquisition module, used to collect and process data in real time;
[0013] Adjustment module for adjusting press load using a dynamic load decision engine.
[0014] On the other hand, the present invention provides an electronic device, comprising: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the above-mentioned method.
[0015] In yet another aspect, the present invention provides a computer-readable storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the above method.
[0016] The present invention has the following beneficial effects:
[0017] 1. High calculation accuracy: Through intelligent scheduling, parallel computing and adaptive optimization technology, the efficiency and accuracy of distributed system performance testing are significantly improved;
[0018] 2. High prediction efficiency: Automatically optimize the press system configuration according to the test results, and achieve continuous improvement of the test platform performance;
[0019] 3. Reduce testing costs: By automatically adjusting the press configuration, the complexity and cost of distributed system performance testing and optimization are reduced, which has high practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram of the process of the distributed system performance testing method of the present invention;
[0021] Figure 2 It is a structural schematic diagram of a distributed system performance testing device of the present invention;
[0022] Figure 3 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION
[0023] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0024] On the one hand, the present invention provides a distributed system performance testing method, such as Figure 1 As shown, including:
[0025] Step S101: constructing a distributed performance testing platform;
[0026] As an optional embodiment, step S101 may include:
[0027] Use performance testing tools that support distributed deployment to build a distributed performance testing platform that can simulate a large number of concurrent user operations and has the ability to collect performance indicator data.
[0028] Step S102: collecting and processing data in real time;
[0029] As an optional embodiment, step S102 may include:
[0030] Collect distributed system performance test indicator data (such as response time, throughput, resource utilization, etc.) and test process status in real time, and perform preliminary cleaning and aggregation on the collected data.
[0031] In this step, the collected data is initially cleaned and aggregated to prepare the input for the decision engine.
[0032] Step S103: using a dynamic load decision engine to adjust the press load.
[0033] This step is dynamic load adjustment, which can be achieved by real-time monitoring of system performance and automatic adjustment of test load. This step also involves intelligent resource allocation, which can be achieved by applying machine learning algorithms to predict resource requirements and optimize allocation.
[0034] As an optional embodiment, step S103 may include:
[0035] According to the data collected and collated by the distributed performance testing platform, an algorithm based on reinforcement learning is used to analyze the test data and construct a decision engine algorithm model.
[0036] The algorithm model can dynamically adjust the press configuration based on data such as response time (RT), throughput (Throughput), CPU utilization (CPU_Use), memory utilization (Mem_Use), etc. That is, as another optional embodiment, the step S103 can include:
[0037] Step A1: Define the algorithm objective function:
[0038] Define an evaluation function F(x) to measure the current system status, where x represents the current number of concurrent users or request rate. The purpose of this function is to comprehensively consider the response time and resource utilization to minimize it under ideal conditions.
[0039] Preferably, in step A1, the formula of F(x) is as follows:
[0040] F(x)=w1×RT(x)+w2×(CPU_Use(x)+Mem_Use(x))
[0041] Among them, RT is the response time, CPU_Use is the CPU utilization, Mem_Use is the memory utilization, and w1 and w2 are weight factors used to balance the importance of response time and resource utilization.
[0042] Step A2: Design dynamic adjustment logic
[0043] Based on the algorithm objective function, design dynamic adjustment logic, including detecting performance bottlenecks and adjusting load levels;
[0044] Preferably, in step A2, the detection performance bottleneck includes:
[0045] If RT>RT_{threshold}, where RT_{threshold} is the response time threshold, it is considered that the response time exceeds the threshold and there is a response time bottleneck;
[0046] If CPU_Use>CPU_{threshold} or Mem_Use>Mem_{threshold}, where CPU_{threshold} is the CPU usage threshold and Mem_{threshold} is the memory usage threshold, it is considered that resource usage is too high and a resource bottleneck exists.
[0047] Preferably, in step A2, adjusting the load level includes:
[0048] When the response time reaches a bottleneck, consider reducing the number of concurrent users or request rate to reduce system pressure;
[0049] When resource bottlenecks occur, it is also necessary to consider reducing pressure, unless the response time has been optimized to a satisfactory level;
[0050] If the system performs well and there is no obvious bottleneck, slowly increase the number of concurrency to explore the system limits.
[0051] Step A3: Make simplified adjustments.
[0052] Preferably, step A3 comprises:
[0053] Taking response time as the driving factor to adjust the number of concurrent users N as an example, the formula is as follows:
[0054] △N=k×(RT_{threshold}-RT)
[0055] Among them, k is the adjustment coefficient, which determines the amplitude of adjustment. If RT>RT_{threshold}, reduce N; if RT is much lower than RT_{threshold}, increase N appropriately.
[0056] Preferably, step A3 comprises:
[0057] Predict the performance trend of the tested distributed system and set thresholds or rules, that is: when the average response time exceeds a certain proportion of the predetermined threshold, trigger the pressure machine load adjustment, or dynamically adjust the load pressure according to the system performance critical point predicted by the algorithm model; the specific strategy of load adjustment is to adjust according to the linear increase or decrease of the number of concurrent users and the proportion of changing request types.
[0058] As another optional embodiment, the step S103 may include:
[0059] Step S104: Algorithm result feedback optimization: By cleaning and aggregating historical data, the sorted data is input into the decision engine algorithm model for continuous training optimization.
[0060] This step is to optimize the test results, which can be done by combining historical test data and applying statistical methods to improve the accuracy and reliability of the test results.
[0061] In summary, the present invention introduces a distributed system performance testing method, which provides an efficient intelligent optimization solution for R&D and performance testing personnel in the field of computer science and technology.
[0062] The core of this method is to solve the problems of low stress machine efficiency, uneven resource allocation and insufficient test result accuracy in traditional distributed system performance testing. This method achieves accurate evaluation of distributed system performance by dynamically adjusting the test stress machine load and resource allocation, and solves the problems of poor scalability and low test efficiency faced by traditional performance testing methods in distributed environments. By introducing intelligent scheduling strategies and parallel computing technology, the present invention achieves efficient and accurate testing of distributed system performance, and can automatically optimize system configuration according to test results, thereby improving the overall effectiveness of performance testing.
[0063] Compared with the traditional empirical method and experimental exploration of performance indicators, this method can more effectively optimize resource utilization and reduce test time, realize the intelligence and efficiency of the test process and the optimal allocation of resources, and ensure the accuracy of the test results and the economy of the test activities.
[0064] The distributed system performance testing method of the present invention has the following advantages over traditional methods:
[0065] 1. Efficiency: Through parallel computing technology and intelligent scheduling strategies, efficient testing of distributed system performance is achieved, greatly shortening the testing cycle;
[0066] 2. Accuracy: Adopting adaptive optimization mechanism, the test parameters are dynamically adjusted according to the test results, which improves the accuracy of the test results;
[0067] 3. Adaptability: It can automatically adjust the test strategy and optimization plan according to different test requirements and system environment, and has strong adaptability;
[0068] 4. Scalability: Supports performance testing and optimization of large-scale distributed systems and has good scalability.
[0069] Therefore, the distributed system performance testing optimization algorithm has multiple advantages, which can help performance testers better identify the performance bottlenecks of the tested distributed system, optimize resource usage and reduce testing time.
[0070] On the other hand, the present invention provides a distributed system performance testing device, such as Figure 2 As shown, including:
[0071] Building module 11, used for building a distributed performance testing platform;
[0072] The acquisition module 12 is used to acquire and process data in real time;
[0073] The adjustment module 13 is used to adjust the press load by using a dynamic load decision engine.
[0074] The device of this embodiment can be used to perform Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0075] Preferably, the building module 11 includes:
[0076] The construction submodule is used to use the performance testing tool that supports distributed deployment to build a distributed performance testing platform that can simulate a large number of concurrent user operations and has the ability to collect performance indicator data;
[0077] And / or, the acquisition module 12 includes:
[0078] The collection submodule is used to collect distributed system performance test indicator data and test process status in real time, and to perform preliminary cleaning and aggregation on the collected data;
[0079] And / or, the adjustment module 13 includes:
[0080] The adjustment submodule is used to analyze the test data based on the data collected and sorted by the distributed performance testing platform using an algorithm based on reinforcement learning, and to construct a decision engine algorithm model.
[0081] Preferably, the adjustment module 13 includes:
[0082] Define submodules to define the algorithm objective function: define an evaluation function F(x) to measure the current system state, where x represents the current number of concurrent users or request rate. The purpose of this function is to comprehensively consider the response time and resource utilization to minimize it under ideal conditions.
[0083] A design submodule for designing dynamic adjustment logic: based on the algorithm objective function, designing dynamic adjustment logic, including detecting performance bottlenecks and adjusting load levels;
[0084] Simplified submodule, used for simplified adjustments.
[0085] Preferably, in the definition submodule, the formula of F(x) is as follows:
[0086] F(x)=w1×RT(x)+w2×(CPU_Use(x)+Mem_Use(x))
[0087] Among them, RT is the response time, CPU_Use is the CPU utilization, Mem_Use is the memory utilization, and w1 and w2 are weight factors used to balance the importance of response time and resource utilization.
[0088] Preferably, in the design submodule, the detection performance bottleneck includes:
[0089] If RT>RT_{threshold}, where RT_{threshold} is the response time threshold, it is considered that the response time exceeds the threshold and there is a response time bottleneck;
[0090] If CPU_Use>CPU_{threshold} or Mem_Use>Mem_{threshold}, where CPU_{threshold} is the CPU utilization threshold and Mem_{threshold} is the memory utilization threshold, it is considered that resource usage is too high and there is a resource bottleneck;
[0091] And / or, in the design submodule, adjusting the load level includes:
[0092] When the response time reaches a bottleneck, consider reducing the number of concurrent users or request rate to reduce system pressure;
[0093] When resource bottlenecks occur, it is also necessary to consider reducing pressure, unless the response time has been optimized to a satisfactory level;
[0094] If the system performs well and there is no obvious bottleneck, slowly increase the number of concurrency to explore the system limits.
[0095] Preferably, in the simplification submodule, taking the response time as a driving factor to adjust the number of concurrent users N as an example, the formula is as follows:
[0096] △N=k×(RT_{threshold}-RT)
[0097] Where k is the adjustment coefficient, which determines the magnitude of the adjustment. If RT>RT_{threshold}, then N is reduced; if RT is much lower than RT_{threshold}, then N is appropriately increased.
[0098] And / or, in the simplified submodule, the performance trend of the distributed system being tested is predicted, and thresholds or rules are set, that is: when the average response time exceeds a certain proportion of a predetermined threshold, the pressure machine load adjustment is triggered, or the load pressure is dynamically adjusted according to the system performance critical point predicted by the algorithm model; wherein the specific strategy of load adjustment is to adjust according to the linear increase or decrease in the number of concurrent users and the proportion of changing request types.
[0099] Preferably, the device further comprises:
[0100] Feedback module 14 is used for algorithm result feedback optimization: by cleaning and aggregating historical data, the sorted data is input into the decision engine algorithm model for continuous training optimization.
[0101] The present invention also provides an electronic device, Figure 3 The schematic diagram of the structure of the electronic device of the present invention can realize the present invention Figure 1 The process shown is as follows Figure 3 As shown, the electronic device may include: a housing 41, a processor 42, a memory 43, a circuit board 44 and a power supply circuit 45, wherein the circuit board 44 is arranged inside the space enclosed by the housing 41, and the processor 42 and the memory 43 are arranged on the circuit board 44; the power supply circuit 45 is used to supply power to various circuits or devices of the electronic device; the memory 43 is used to store executable program codes; the processor 42 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 43, so as to execute the method described in any of the aforementioned method embodiments.
[0102] For details on the specific execution process of the above steps by the processor 42 and the steps further executed by the processor 42 by running the executable program code, please refer to the present invention. Figure 1 The description of the illustrated embodiment will not be repeated here.
[0103] This electronic device exists in many forms, including but not limited to:
[0104] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
[0105] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.
[0106] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.
[0107] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0108] (5) Other electronic devices with data interaction functions.
[0109] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any of the above method embodiments are implemented.
[0110] The present invention also provides an application program, which is executed to implement the method provided by any method embodiment of the present invention.
[0111] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0112] Each embodiment in this specification is described in a related manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. For the convenience of description, the description of the above device is divided into various units / modules according to their functions and described separately. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or one or more software and / or hardware.
[0113] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0114] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A distributed system performance testing method, characterized in that: include: Step S101: constructing a distributed performance testing platform; Step S102: collecting and processing data in real time; Step S103: using a dynamic load decision engine to adjust the press load.
2. The method according to claim 1, characterized in that The step S101 includes: Use performance testing tools that support distributed deployment to build a distributed performance testing platform that can simulate a large number of concurrent user operations and has the ability to collect performance indicator data; And / or, step S102 includes: Collect distributed system performance test indicator data and test process status in real time, and perform preliminary cleaning and aggregation on the collected data; And / or, step S103 includes: According to the data collected and collated by the distributed performance testing platform, an algorithm based on reinforcement learning is used to analyze the test data and construct a decision engine algorithm model.
3. The method according to claim 2, characterized in that The step S103 includes: Step A1: Define the algorithm objective function: Define an evaluation function F(x) to measure the current system status, where x represents the current number of concurrent users or request rate. The purpose of this function is to comprehensively consider the response time and resource utilization and minimize them under ideal conditions; Step A2: Designing dynamic adjustment logic: Based on the algorithm objective function, designing dynamic adjustment logic, including detecting performance bottlenecks and adjusting load levels; Step A3: Make simplified adjustments.
4. The method according to claim 3, characterized in that In step A1, the formula of F(x) is as follows: F(x)=w1×RT(x)+w2×(CPU_Use(x)+Mem_Use(x)) Among them, RT is the response time, CPU_Use is the CPU utilization, Mem_Use is the memory utilization, and w1 and w2 are weight factors used to balance the importance of response time and resource utilization.
5. The method according to claim 4, characterized in that In step A2, the detection performance bottleneck includes: If RT>RT_{threshold}, where RT_{threshold} is the response time threshold, it is considered that the response time exceeds the threshold and there is a response time bottleneck; If CPU_Use>CPU_{threshold} or Mem_Use>Mem_{threshold}, where CPU_{threshold} is the CPU utilization threshold and Mem_{threshold} is the memory utilization threshold, it is considered that resource usage is too high and there is a resource bottleneck; And / or, in step A2, adjusting the load level includes: When the response time reaches a bottleneck, consider reducing the number of concurrent users or request rate to reduce system pressure; When resource bottlenecks occur, it is also necessary to consider reducing pressure, unless the response time has been optimized to a satisfactory level; If the system performs well and there is no obvious bottleneck, slowly increase the number of concurrency to explore the system limits.
6. The method according to claim 5, characterized in that The step A3 comprises: Taking response time as the driving factor to adjust the number of concurrent users N as an example, the formula is as follows: △N=k×(RT_{threshold}-RT) Where k is the adjustment coefficient, which determines the magnitude of the adjustment. If RT>RT_{threshold}, then N is reduced; if RT is much lower than RT_{threshold}, then N is appropriately increased. And / or, step A3 comprises: Predict the performance trend of the tested distributed system and set thresholds or rules, that is: when the average response time exceeds a certain proportion of the predetermined threshold, trigger the pressure machine load adjustment, or dynamically adjust the load pressure according to the system performance critical point predicted by the algorithm model; the specific strategy of load adjustment is to adjust according to the linear increase or decrease of the number of concurrent users and the proportion of changing request types.
7. The method according to claim 6, characterized in that The step S103 includes: Step S104: Algorithm result feedback optimization: By cleaning and aggregating historical data, the sorted data is input into the decision engine algorithm model for continuous training optimization.
8. A distributed system performance testing device, characterized in that: include: Building modules for building a distributed performance testing platform; Acquisition module, used to collect and process data in real time; Adjustment module for adjusting press load using a dynamic load decision engine.
9. An electronic device, characterized in that: The electronic device comprises: a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute any of the methods described in claims 1-7 above.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any of the methods described in claims 1-7.
