Server testing method and device, storage medium and electronic equipment

By receiving test requests in the server, obtaining sampling service parameters under multiple sampling loads, detecting performance and energy consumption parameters, and generating energy efficiency parameters, it solves the problem of low accuracy of server energy efficiency testing, and realizes automated and highly accurate energy efficiency evaluation.

CN120256249AInactive Publication Date: 2025-07-04INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510736480.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-07-04
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN120256249A_ABST
    Figure CN120256249A_ABST
Patent Text Reader

Abstract

The invention discloses a server test method and device, a storage medium and electronic equipment, and relates to the technical field of computers, and the method comprises the steps: receiving a test request used for requesting to test energy efficiency parameters of a server; responding to the test request, acquiring sampling service parameters corresponding to the target server service when the server reaches a plurality of sampling loads, and obtaining a plurality of groups of sampling service parameters; controlling the server to operate the target server service according to the multiple groups of sampling service parameters, and detecting performance parameters and energy consumption parameters of the server under each sampling load to obtain multiple groups of performance parameters and energy consumption parameters with corresponding relations; the energy efficiency parameter of the server is generated according to the multiple groups of performance parameters and energy consumption parameters with the corresponding relation, the technical problem that the accuracy of testing the energy efficiency of the server is low is solved, and the technical effect of improving the accuracy of testing the energy efficiency of the server is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and in particular, to a method and device for testing a server, a storage medium, and an electronic device. Background Art

[0002] Server energy efficiency is an important standard for measuring the energy utilization rate of a server. In the related art, the test method for server energy efficiency can only run test tasks in a single load state such as full load or no load, and it is difficult to accurately and comprehensively reflect the true energy efficiency performance of the server in a multi - working environment. Moreover, after testing the server energy efficiency, it is necessary to manually organize data, judge the energy efficiency, and write reports, which further increases the work burden and potential error risks. From testing the server energy efficiency to organizing the test results, the degree of automation in the whole process is relatively low, which affects the efficiency of server energy efficiency testing and the credibility of test results.

[0003] In view of the technical problems such as low accuracy in testing the server energy efficiency in the related art, no effective solution has been proposed yet. Summary of the Invention

[0004] The embodiments of the present application provide a method and device for testing a server, a storage medium, and an electronic device, so as to at least solve the technical problems such as low accuracy in testing the server energy efficiency in the related art.

[0005] According to an embodiment of the embodiments of the present application, a method for testing a server is provided, including:

[0006] Receiving a test request for requesting to test the energy efficiency parameters of a server; responding to the test request, obtaining the sampled service parameters corresponding to the target server service when the server reaches multiple sampled loads, and obtaining multiple groups of sampled service parameters, where each group of sampled service parameters is the operating parameters required for the target server service when controlling the server to reach the corresponding sampled load; controlling the server to run the target server service according to the multiple groups of sampled service parameters, and detecting the performance parameters and energy consumption parameters of the server under each sampled load, and obtaining multiple groups of performance parameters and energy consumption parameters with corresponding relationships, where the performance parameters are used to indicate the performance of the server when running the target server service under the corresponding sampled load, and the energy consumption parameters are used to indicate the energy consumption of the server when running the target server service under the corresponding sampled load; generating the energy efficiency parameters of the server according to the multiple groups of performance parameters and energy consumption parameters with corresponding relationships.

[0007] According to another embodiment of the embodiments of the present application, a device for testing a server is further provided, including:

[0008] A receiving module, configured to receive a test request for requesting to test energy efficiency parameters of a server; a first processing module, configured to, in response to the test request, obtain sampled service parameters corresponding to a target server service when the server reaches multiple sampling loads, so as to obtain multiple groups of sampled service parameters, wherein each group of sampled service parameters is an operating parameter required for the target server service when controlling the server to reach the corresponding sampling load; a second processing module, configured to control the server to operate the target server service according to the multiple groups of sampled service parameters, and detect performance parameters and energy consumption parameters of the server under each sampling load, so as to obtain multiple groups of performance parameters and energy consumption parameters with a corresponding relationship, wherein the performance parameters are used to indicate the performance of the server when operating the target server service under the corresponding sampling load, and the energy consumption parameters are used to indicate the energy consumption of the server when operating the target server service under the corresponding sampling load; a generating module, configured to generate energy efficiency parameters of the server according to the multiple groups of performance parameters and energy consumption parameters with a corresponding relationship.

[0009] This application further provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any one of the above server test methods when executing the computer program.

[0010] This application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program implements the steps of any one of the above server test methods when being executed by a processor.

[0011] This application further provides a computer program product, including a computer program, wherein the computer program implements the steps of any one of the above server test methods when being executed by a processor.

[0012] Through this application, it is possible to obtain the sampled service parameters corresponding to the target server service when the server reaches different sampling loads, operate the target server service according to the sampled service parameters corresponding to different sampling loads respectively, detect the performance parameters and energy consumption parameters of the server under each sampling load, and finally generate the energy efficiency parameters of the server according to the detected multiple groups of performance parameters and energy consumption parameters with a corresponding relationship. That is, through this application, it is possible to detect the performance parameters and energy consumption parameters of the server under different sampling loads, and generate energy efficiency parameters according to the detection results. This not only realizes generating energy efficiency parameters by integrating the performance parameters and energy consumption parameters of the server under multiple sampling loads, avoiding the inaccuracy of evaluating energy efficiency only based on the performance parameters and energy consumption parameters of the server under a single sampling load, but also realizes automatic generation of energy efficiency parameters, eliminating the need for manual participation in the generation of energy efficiency parameters and reducing the potential error risk. Therefore, it can solve the technical problems such as the low accuracy of testing the energy efficiency of the server in the related art, and achieve the technical effect of improving the accuracy of testing the energy efficiency of the server. Description of the Drawings

[0013] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0014] Figure 1 is a hardware structure block diagram of a computer device for a server testing method according to an embodiment of the present application;

[0015] Figure 2 is a flowchart of a server testing method according to an embodiment of the present application;

[0016] Figure 3 is a corresponding relationship diagram between multiple loads and multiple groups of service parameters of an optional server according to an embodiment of the present application;

[0017] Figure 4 is a schematic diagram of an optional dynamically generated test report according to an embodiment of the present application;

[0018] Figure 5 is a schematic diagram of an optional server testing process according to an embodiment of the present application;

[0019] Figure 6 is a structure block diagram of a server testing device according to an embodiment of the present application;

[0020] Figure 7 is a schematic diagram of an electronic device according to an embodiment of the present application. Specific Embodiments

[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present application.

[0022] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variation 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 elements inherent to such a process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and not to describe a specific order or sequence.

[0023] To enable those skilled in the art of the present technology to better understand the solution of this application, the following further detailed description of this application will be given in conjunction with the accompanying drawings and specific implementation manners.

[0024] In the method embodiments provided in the embodiments of this application, they can be executed on a server device or a similar computing device. Taking the operation on a server device as an example, Figure 1 is the hardware structure block diagram of a computer device for a server test method in the embodiments of this application. As Figure 1 shown, the server device may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, processing devices such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above-mentioned server device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned server device. For example, the server device may further include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown in the figure.

[0025] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the server test method in the embodiments of this application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above-mentioned method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely set relative to the processor 102, and these remote memories can be connected to the server device through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, enterprise intranets, local area networks, mobile communication networks, and their combinations.

[0026] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by the communication provider of the server device. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC for Network Interface Controller), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (abbreviated as RF) module, which is used to communicate with the Internet wirelessly.

[0027] In this embodiment, a method for testing a server is provided. Figure 2 It is a flowchart of a method for testing a server according to an embodiment of the present application, as Figure 2 shown. The process includes the following steps:

[0028] Step S12, receiving a test request for requesting to test the energy efficiency parameters of the server.

[0029] Optionally, in this embodiment, the energy efficiency parameters can be used to indicate the energy utilization efficiency of the server during testing;

[0030] Optionally, in this embodiment, the test request can be initiated by a user. For example, the user can initiate a test request on an interaction interface to request testing of the energy efficiency parameters of the server.

[0031] Step S14, in response to the test request, obtaining the sampled service parameters corresponding to the target server service when the server reaches multiple sampling loads, and obtaining multiple sets of sampled service parameters, where each set of sampled service parameters is the operating parameters required for the target server service when the server is controlled to reach the corresponding sampling load.

[0032] Optionally, in this embodiment, the sampling load can be used to indicate the server workload points set in the test, which are used to simulate different loads of the server in actual applications to comprehensively evaluate the energy efficiency performance of the server. For example, the sampling load can be 25% load, 50% load, 75% load, 100% load, etc. When the sampling load is 25% load, it means that the processing capacity or resource utilization rate of the server is set to 25% of the standard full-load capacity.

[0033] Optionally, in this embodiment, the user can specify the number of sampling loads or the sampling load interval between multiple sampling loads. For example, the user can specify the number of sampling loads as 5, evenly divide the load interval into 5 parts, and determine the sampling loads as 20%, 40%, 60%, 80%, and 100% five sampling loads; or, the user can specify the sampling load interval as 25%, and the system automatically generates a load point sequence starting from 0% with a step size of 25% until 100%, that is, 25%, 50%, 75%, 100% four sampling loads. This customizing ability allows the user to finely control the distribution of load sampling points according to the usage characteristics or test requirements of the server, can comprehensively cover the operating states of the server from light load to full load, ensure the extensiveness and representativeness of the test, thereby more accurately evaluate the energy efficiency parameters of the server, provide more detailed and reliable data support for energy efficiency management, and avoid the problem of low accuracy in testing the energy efficiency of the server caused by testing the energy efficiency parameters of the server only under a single load state.

[0034] Optionally, in this embodiment, the target server services may include the services that the server can run. For example, the model operation service under the AI application, and the model operation service under the AI application may include resnet50 (a 50-layer version of the residual network, a deep learning model for image recognition), ber-large (a natural language processing model), and so on.

[0035] Optionally, in this embodiment, different target server services correspond to different sampling service parameters. For example, when the target server service is the model operation service under the AI application, the sampling service parameters may be batch_size (batch size) and num_workers (number of worker threads), and so on.

[0036] Optionally, in this embodiment, the sizes of the sampling service parameters corresponding to the target server service are different when the server reaches different sampling loads. For example, when the target server service is the model operation service under the AI application, in the case of a 25% sampling load, the sampling service parameter batch_size may be 8, and the sampling service parameter num_workers may be 4. In the case of a 75% sampling load, the sampling service parameter batch_size may be 32, and the sampling service parameter num_workers may be 8, and so on; when the load is light, it may be necessary to set a smaller batch_size and fewer num_workers, while when the load gradually increases, a larger batch_size and more num_workers are required to fully utilize the computing resources of the server.

[0037] Optionally, in this embodiment, taking the model operation service under the AI application as an example of the target server service, when the server reaches 25%, 50%, 75%, and 100% sampling loads, the batch_size (equivalent to the sampling service parameter) and num_workers (equivalent to the sampling service parameter) corresponding to the model operation service under the AI application are obtained, and multiple groups of sampling service parameters are obtained. For example, at 25% sampling load: batch_size can be 8, and num_workers can be 4, which means that in the light load state, the amount of data processed per batch is relatively small, and the number of working threads running at the same time is also small, thus simulating the operating environment of the daily low-intensity model operation service; at 50% sampling load: batch_size can be 16, and num_workers can be 6, which means that in the medium load state, both the batch processing size and the number of working threads increase, reflecting the resource configuration and working state of the server when processing medium-intensity tasks; at 75% sampling load: batch_size can be 32, and num_workers can be 8, which means that in the high load state, the server needs to process a larger amount of data, and at the same time, more working threads are executed concurrently to make more full use of computing resources; at 100% sampling load: batch_size can be 64, and num_workers can be 12. This means that in the full load state, the batch processing size and the number of working threads are maximized, and the server reaches the limit of its processing performance, which is used to test the energy efficiency performance of the server under high-intensity services.

[0038] Step S16, control the server to run the target server service according to multiple groups of sampling service parameters, and detect the performance parameters and energy consumption parameters of the server under each sampling load, and obtain multiple groups of performance parameters and energy consumption parameters with corresponding relationships, where the performance parameters are used to indicate the performance of the server running the target server service under the corresponding sampling load, and the energy consumption parameters are used to indicate the energy consumption of the server running the target server service under the corresponding sampling load.

[0039] Optionally, in this embodiment, the performance parameters can be used to indicate the performance of the server running the target server service under the corresponding sampling load. For example, the performance parameters can include processing speed, CPU utilization rate, memory usage rate, network throughput, and so on.

[0040] Optionally, in this embodiment, the energy consumption parameters can be used to indicate the energy consumption of the server running the target server service under the corresponding sampling load. For example, the energy consumption parameters can include power consumption, usually in watts (W).

[0041] Optionally, in this embodiment, taking the target server service as the model operation service under the AI application service, the multiple sets of sampling service parameters are as follows: at 25% sampling load, set batch_size to 8 and num_workers to 4; at 50% sampling load, set batch_size to 16 and num_workers to 6; at 75% sampling load, set batch_size to 32 and num_workers to 8; at 100% sampling load, set batch_size to 64 and num_workers to 12 as an example. The control server runs the model operation service (such as image processing) under the AI application service according to the above multiple sets of sampling service parameters, and detects the processing speed (equivalent to the performance parameter) and power consumption (equivalent to the energy consumption parameter) of the server at each sampling load of 25%, 50%, 75% and 100%, and obtains multiple sets of processing speeds and power consumptions with corresponding relationships. For example, the server processing speed at 25% load is 1000 pictures per second, and the power consumption is 100W; the server processing speed at 50% load is 2000 pictures per second, and the power consumption is 200W; the server processing speed at 75% load is 3000 pictures per second, and the power consumption is 300W; the server processing speed at 100% load is 4000 pictures per second, and the power consumption is 400W. It should be noted that the above only takes the performance parameter including the processing speed as an example. In the actual test process, multiple performance parameters can be detected simultaneously, and this application does not limit this.

[0042] S18. Generate the energy efficiency parameter of the server according to multiple sets of performance parameters and energy consumption parameters with corresponding relationships.

[0043] Optionally, in this embodiment, the performance parameter and the energy consumption parameter can be in a corresponding relationship. Taking the model operation service (such as image processing) under the AI application service as an example, at 25% sampling load, the server processing speed of 1000 pictures per second corresponds to a power consumption of 100W; at 50% sampling load, the processing speed of 2000 pictures per second corresponds to a power consumption of 200W; at 75% sampling load, the processing speed of 3000 pictures per second corresponds to a power consumption of 300W; at 100% sampling load, the processing speed of 4000 pictures per second corresponds to a power consumption of 400W.

[0044] Through this application, it is possible to obtain the sampling service parameters corresponding to the target server service when the server reaches different sampling loads, run the target server service according to the sampling service parameters corresponding to different sampling loads respectively, detect the performance parameters and energy consumption parameters of the server under each sampling load, and finally generate the energy efficiency parameters of the server based on the detected multiple groups of performance parameters and energy consumption parameters with corresponding relationships. That is, through this application, it is possible to detect the performance parameters and energy consumption parameters of the server under different sampling loads, and generate energy efficiency parameters according to the detection results. This not only realizes the generation of energy efficiency parameters by integrating the performance parameters and energy consumption parameters of the server under multiple sampling loads, avoiding the inaccuracy of evaluating energy efficiency only based on the performance parameters and energy consumption parameters of the server under a single sampling load, but also realizes the automatic generation of energy efficiency parameters, eliminating the need for manual participation in the generation of energy efficiency parameters and reducing the potential error risk. Therefore, it can solve the technical problems such as the low accuracy of testing the energy efficiency of the server in the related art, and achieve the technical effect of improving the accuracy of testing the energy efficiency of the server.

[0045] As an optional solution, obtaining the sampling service parameters corresponding to the target server service when the server reaches multiple sampling loads to obtain multiple groups of sampling service parameters further includes:

[0046] S21, obtaining the load service information corresponding to the server, where the load service information records the correspondence between multiple loads of the server and multiple groups of service parameters, and each group of service parameters is the operating parameters required to control the target server service to reach the corresponding load;

[0047] S22, matching the sampling service parameters corresponding to each sampling load among the multiple sampling loads from the load service information to obtain multiple groups of sampling service parameters.

[0048] Optionally, in this embodiment, the load service information can be obtained by measuring and verifying the specific service parameters required for the target server service at each load.

[0049] Optionally, in this embodiment, the multiple loads may include multiple sampling loads, and the multiple groups of service parameters may include multiple groups of sampling service parameters.

[0050] Optionally, in this embodiment, the load service information records the correspondence between multiple loads of the server and multiple groups of service parameters. The correspondence between the multiple loads of the server and the multiple groups of service parameters can be stored in the form of a table or in the form of a curve graph. Taking the model operation service with the target server service as the AI application service as an example, Table 1 shows the load service information corresponding to the model operation service. The sampling service parameters corresponding to each sampling load among the multiple sampling loads can be matched from the load service information to obtain multiple groups of sampling service parameters, as shown in Table 1.

[0051] Table 1 Load service information corresponding to the AI model operation service

[0052]

[0053] Figure 3 is a correspondence diagram between multiple loads of an optional server and multiple sets of service parameters according to an embodiment of the present application. As shown in Figure 3 the figure, the abscissa is the load, the ordinate is the magnitude of the service parameter, Curve 1 corresponds to the curve of batch_size changing with the load, and Curve 2 corresponds to the curve of num_workers changing with the load. When the sampled load is determined, the magnitude of the sampled service parameter corresponding to the sampled load can be determined according to the curve corresponding to the sampled service parameter. For example, when the sampled load is 62.5%, the batch_size corresponding to Curve 1 is 20, and the num_workers corresponding to Curve 2 is 7.

[0054] It should be noted that the values of batch_size and num_workers under different loads given in Table 1 and Figure 3 are only examples. In practice, the batch_size and num_workers under different loads need to be further determined through preliminary experiments.

[0055] Through the embodiment of the present application, multiple sets of sampled service parameters can be matched according to the load service information of the server, which can truly reflect the energy efficiency performance of the server under different loads, not only simplifies the parameter setting process of the energy efficiency test, but also significantly improves the accuracy and reliability of the test.

[0056] As an optional solution, before obtaining the sampled service parameters corresponding to the target server service when the server reaches multiple sampled loads, the method further includes:

[0057] S31, displaying multiple scenario identifiers of the server on the target interface, where each scenario identifier is used to identify a service scenario that allows the energy efficiency parameters of the server to be tested;

[0058] S32, obtaining the target service scenario corresponding to the target scenario identifier on which a trigger operation is performed on the target interface;

[0059] S33, matching the server service corresponding to the target service scenario from the service scenarios and server services with corresponding relationships to obtain the target server service.

[0060] Optionally, in this embodiment, a friendly interaction interface (equivalent to the target interface) can be provided for the user. Multiple scenario identifiers are set on the friendly interaction page, such as: AI identifier, big data identifier, virtual machine identifier, database identifier, etc. The AI identifier can be used to identify that the business scenario for testing the energy efficiency parameters of the server is the AI business scenario, the big data identifier is used to identify that the business scenario for testing the energy efficiency parameters of the server is the big data business scenario, the virtual machine identifier is used to identify that the business scenario for testing the energy efficiency parameters of the server is the virtual machine business scenario, and the database identifier is used to identify that the business scenario for testing the energy efficiency parameters of the server is the database business scenario.

[0061] Optionally, in this embodiment, there is a corresponding relationship between the business scenario and the server business. For example, the AI business scenario corresponds to the AI application business, such as the model operation business under the AI application, etc.; the big data business scenario corresponds to the big data application business, such as data mining and real-time data analysis under the big data application, etc.; the virtual machine business scenario corresponds to the virtual machine application business, such as cloud server and virtual machine cluster management under the virtual machine application, etc.; the database business scenario corresponds to the database application business, such as distributed database and time series database, etc.

[0062] Optionally, in this embodiment, when the user checks (equivalent to the trigger operation) the scenario identifier, matches the server business corresponding to the target business scenario from the business scenario and the server business with the corresponding relationship, and obtains the target server business, the common test parameters that need to be set corresponding to the target server business can be called up, and the common test parameters that need to be set are displayed on the target interface; obtain the common test parameters corresponding to the target server business on the target interface where the input operation has been performed.

[0063] Optionally, in this embodiment, the common test parameters can include the test server IP address, username, password, and the power consumption meter address and port number connected to the test server, etc.

[0064] Optionally, in this embodiment, the user can select a single or multiple scenario identifiers. For example, the user can only select the AI identifier, that is, only select one scenario identifier, or can select all of the AI identifier, big data identifier, virtual machine identifier, and database identifier, that is, select all scenario identifiers.

[0065] Through the embodiments of the present application, users only need to perform simple triggering operations (such as ticking) on the target interface to link with the scenario matching logic in the background. The system automatically matches the server services corresponding to the target business scenario, significantly reducing the preparation workload before testing, shortening the testing cycle, and ensuring the standardization and reliability of testing. At the same time, this solution can test a single business scenario or cover multiple or even all scenarios, providing a comprehensive energy efficiency assessment.

[0066] Optionally, in this embodiment, the performance parameters and energy consumption parameters of the server under each sampling load can be detected in the following manner to obtain multiple sets of performance parameters and energy consumption parameters with corresponding relationships: When the user selects a test scenario (equivalent to a scenario identifier) and accurately enters relevant common test parameters, these common test parameters and the obtained multiple sets of sampled service parameters are then subjected to refined preprocessing and submitted to the test item selection and execution engine. This engine accurately matches the test modules that meet the user's requirements (equivalent to the target server services) from the rich test module library, and then executes the tests one by one in a serial manner. Since there may be potential mutual interference between the test modules, a serial test strategy is adopted to ensure the independence and accuracy of the tests. Each test module includes the following key steps: test parameter parsing, test environment preparation, test task execution, test environment reset, and test data collection. During the execution process, the test module will intelligently link with the power consumption monitoring module. The power consumption monitoring module uses efficient multi-threaded sampling technology to accurately record the power consumption data of the server at a frequency of once per second, that is, the power consumption monitoring module can run independently of the main test process, opening a sub-thread to collect the power consumption data of the server at a high frequency without interfering with the ongoing test tasks. When the test starts, the power consumption monitoring thread is activated accordingly, and when the test ends, it stops intelligently to ensure the accurate capture of the power consumption data (equivalent to the energy consumption parameters). During the test preparation and data parsing phases, the power consumption monitoring function will be intelligently paused to avoid interference from irrelevant data and further improve the accuracy of the power consumption data. To provide transparent monitoring of the test process, the system records and prints log information throughout the process, enabling users to intuitively understand the test progress. After the test ends, this log information will be sorted and organized according to the test modules to form a detailed log file, facilitating users to review the process, track problems, and optimize the tests. During the test preparation phase, the system also includes a comprehensive detection function for the server status, such as ping (Packet Internet Groper, a network connectivity test tool) connectivity test and ssh (Secure Shell, a secure shell protocol) service status check. Once an abnormal server connection is detected, the system will intelligently interrupt the test and retain detailed records, providing convenience for subsequent breakpoint resumption testing. In addition, after each test module is executed, the system will thoroughly reset the test server environment to ensure that there is no interference between the test items, thereby ensuring the accuracy and reliability of the final test data. This innovative design not only improves the test efficiency but also ensures the accuracy of the test results, providing users with a more professional and reliable test evaluation service.

[0067] As an optional solution, generating the energy efficiency parameters of the server based on multiple sets of performance parameters and energy consumption parameters with corresponding relationships further includes:

[0068] S41. Generate a carbon emission coefficient for the energy consumption parameter in each group of performance parameters and energy consumption parameters with a corresponding relationship, obtaining multiple groups of performance parameters, energy consumption parameters, and carbon emission coefficients with a corresponding relationship. Here, the carbon emission coefficient is used to indicate the amount of carbon dioxide emissions corresponding to the unit server energy consumption when the server energy consumption of the server reaches the energy consumption indicated by the corresponding energy consumption parameter.

[0069] S42. Generate an energy efficiency parameter of the server based on multiple groups of performance parameters, energy consumption parameters, and carbon emission coefficients with a corresponding relationship.

[0070] Optionally, in this embodiment, taking the energy consumption parameter as 100w as an example, the carbon emission coefficient can be used to indicate the amount of carbon dioxide emissions corresponding to the unit server energy consumption when the server energy consumption of the server reaches 100w, that is, the amount of carbon dioxide emissions corresponding to each watt of server energy consumption.

[0071] As an optional solution, generating a carbon emission coefficient for the energy consumption parameter in each group of performance parameters and energy consumption parameters with a corresponding relationship further includes:

[0072] In the case where there are n groups of performance parameters and energy consumption parameters with a corresponding relationship, the j-th carbon emission coefficient is generated for the j-th energy consumption parameter in the j-th group of the j-th performance parameter and the j-th energy consumption parameter through the following steps, where n is an integer greater than 1, and j is an integer greater than or equal to 1 and less than or equal to n:

[0073] S51. Obtain all the energy consumption parameters in n groups of performance parameters and energy consumption parameters with a corresponding relationship, obtaining n energy consumption parameters.

[0074] S52. Perform a division operation on the sum of the j-th energy consumption parameter and the n energy consumption parameters to obtain the j-th energy consumption ratio.

[0075] S53. Perform a multiplication operation on the j-th energy consumption ratio and the carbon emission factor to obtain the j-th carbon emission coefficient, where the carbon emission factor is used to indicate the amount of carbon dioxide emissions corresponding to the unit power energy consumption.

[0076] Optionally, in this embodiment, the carbon emission coefficient can be calculated through where W j represents the j-th energy consumption parameter, EF represents the carbon emission factor, the carbon emission factor can be a fixed constant, and ∑W j represents the sum of the n energy consumption parameters, and ∑W can be calculated through j , represents the carbon emission coefficient.

[0077] As an alternative solution, generating the energy efficiency parameter of the server based on multiple sets of performance parameters, energy consumption parameters, and carbon emission coefficients with corresponding relationships further includes:

[0078] When the multiple sets of performance parameters, energy consumption parameters, and carbon emission coefficients with corresponding relationships are n sets of performance parameters, energy consumption parameters, and carbon emission coefficients with corresponding relationships, generating the energy efficiency parameter of the server through the following steps, where n is an integer greater than 1:

[0079] S61, obtaining all the performance parameters in the n sets of performance parameters, energy consumption parameters, and carbon emission coefficients with corresponding relationships, and obtaining n performance parameters;

[0080] S62, performing a multiplication operation on the n performance parameters to obtain a performance product;

[0081] S63, respectively performing a multiplication operation on the n energy consumption parameters and carbon emission coefficients with corresponding relationships in the n sets of performance parameters, energy consumption parameters, and carbon emission coefficients with corresponding relationships to obtain n energy consumption products;

[0082] S64, performing an addition operation on the n energy consumption products to obtain an energy consumption sum value;

[0083] S65, generating an energy efficiency parameter based on the performance product and the energy consumption sum value.

[0084] Optionally, in this embodiment, the energy efficiency parameter can be generated through where represents the performance product, represents the carbon emission coefficient, W j represents the j-th energy consumption parameter, represents respectively performing a multiplication operation on the n energy consumption parameters and carbon emission coefficients with corresponding relationships, represents the energy consumption sum value. α and β are used as scenario weight factors, which can be used to balance the contribution ratios of the two key parameters, the performance parameter and the energy consumption parameter, in the generation of the energy efficiency parameter, and can be flexibly adjusted according to actual needs. For example, for a scenario that attaches more importance to performance, a higher weight can be given to α; for an application that pursues energy conservation, a higher proportion can be given to β, and 1 / n is a normalization factor.

[0085] Through the embodiments of the present application, it is possible to comprehensively capture the core performance data (equivalent to performance parameters) under various sampling loads (such as multiple sampling loads like 100% full load, 75% load, 50% load, and 25% load, etc.) during server testing, and at the same time accurately record the average power consumption information (equivalent to energy consumption parameters) during the execution process. On this basis, by retrieving the carbon emission factors (equivalent to carbon emission coefficients) and normalization factors closely related to the application scenario, and using a weighted calculation strategy, a comprehensive consideration of performance and energy consumption is carried out, ensuring the objectivity and pertinence of the evaluation results, constructing a high-precision energy efficiency calculation model, which can generate energy efficiency parameters in real time and intelligently, and improve the accuracy of energy efficiency evaluation.

[0086] Optionally, in this embodiment, after generating the energy efficiency parameters of the server based on multiple groups of performance parameters and energy consumption parameters with corresponding relationships, in order to intuitively display the complex energy efficiency parameters, a multi-dimensional data visualization engine can also be used to draw various analysis views such as energy consumption heat maps and performance topology maps, making data insight more intuitive and in-depth.

[0087] Optionally, in this embodiment, the analysis rules (equivalent to the energy efficiency parameter generation method) adopted in the present application are not fixed, but are built on an independent rule resource pool, and the generation method of energy efficiency parameters can be further adjusted according to user needs. This design greatly facilitates the flexible adjustment and expansion of the rules under different requirements, ensuring the continuous optimization and upgrade of the evaluation system. For example, by deeply integrating fuzzy logic with cutting-edge technologies such as machine learning and optimization algorithms, an intelligent evaluation system with the ability of self-evolution can be constructed. This system can not only continuously learn and optimize the evaluation model based on historical data, but also show strong adaptability and innovation ability when facing new scenarios and new challenges, bringing a revolutionary breakthrough to the field of energy efficiency evaluation.

[0088] As an optional solution, after generating the energy efficiency parameters of the server based on multiple groups of performance parameters and energy consumption parameters with corresponding relationships, the method further includes:

[0089] S71, obtaining the server configuration information of the server;

[0090] S72, filling the server configuration information, performance parameters, energy consumption parameters, and energy efficiency parameters into a reference test report template to obtain a target test report;

[0091] S73, transmitting the target test report to a preset storage location.

[0092] Optionally, in this embodiment, the server configuration information may include key information on the hardware and software configuration of the server, such as the operating system version, processor model, memory size, hard disk type, and so on.

[0093] Optionally, in this embodiment, the preset storage location may be a dedicated folder preset in the local hard disk of the server for storing test reports and log files, which is convenient for direct access and quick analysis.

[0094] Optionally, in this embodiment, the user can select the save format of the target test report according to requirements. For example, the target test report can be saved in Word format, PDF format, etc.

[0095] Optionally, in this embodiment, Figure 4 is an optional schematic diagram of dynamically generating a test report according to an embodiment of the present application. As Figure 4 shown, the test report can be generated through the following steps:

[0096] S401, Start, the starting point of the report generation process. At this time, the intelligent document generation engine is in the initialization state, waiting to receive test data;

[0097] S402, Read test data. The engine reads key information from the data collected during the energy efficiency test, including server configuration information, performance parameters, energy consumption parameters, energy efficiency parameters, etc.;

[0098] S403, Determine whether it is a single application scenario template. If it is a single application scenario template, execute step S404. If it is not a single application scenario template, execute step S405;

[0099] S404, The test only covers one application scenario (such as the AI business scenario), and a single scenario report template is selected;

[0100] S405, If the test involves multiple scenarios, read the report templates corresponding to the multiple scenarios;

[0101] S406, Parse template elements and locate numbers. The intelligent engine parses the selected report template, deeply analyzes the DOM tree of the template, identifies each element in the template (such as titles, paragraphs, and visualization charts, etc.) and locates numbers for them to ensure that the position of each element can be accurately located in the subsequent steps;

[0102] S407, Read machine configuration information (equivalent to server configuration information), and read key information from the hardware and software configurations of the server, such as operating system version, processor model, memory size, hard disk type, etc.;

[0103] S408, Loop through template elements;

[0104] S409, Determine whether it is basic information, that is, the engine will determine whether the read information belongs to basic information. If it is basic information, execute step S410. If it is not basic information, execute step S411;

[0105] S410, Match the basic information fields and fill them. If the corresponding ones in the template elements are basic information fields, match the obtained basic information to the corresponding data element positions in the template for filling. The basic information may include basic information such as server configuration information, sampling load, target server services, sampling service parameters, and report generation date, etc.;

[0106] S411, Match the test data and fill it. If the corresponding ones in the template elements are test data fields, match the information such as performance parameters, energy consumption parameters, and energy efficiency parameters collected during the test to the corresponding data element positions in the template to achieve automatic data filling;

[0107] S412, Check whether the basic configuration (equivalent to basic information) and test data have been filled completely. After the data filling is completed, the engine will check whether all the basic configuration and test data have been correctly filled into the report. If the basic configuration and test data have been filled completely, execute step S413. If the basic configuration and test data have not been filled completely, execute step S408;

[0108] S413, Delete the redundant elements of the template and save it. In this step, the system will perform intelligent trimming of the template, deleting the template elements not covered by the actual test content to keep the report concise. Finally, the engine will automatically generate a test report document (equivalent to the target test report) with consistent format and complete content in the specified directory (equivalent to the preset storage location);

[0109] S414, End.

[0110] This solution uses an intelligent document generation engine built based on cutting-edge template metaprogramming technology, integrating several modules such as an adaptive content layout framework (ACLF 2.0, Adaptive Content Layout Framework 2.0), an intelligent dynamic chart rendering engine (a deeply integrated kernel of Matplotlib / Seaborn), an intelligent format protection algorithm (DOM (Document Object Model) tree micro-difference parsing technology), intelligent retrieval of scenario-based test report templates, template document reuse, and intelligent cropping. It can flexibly adjust the layout according to the characteristics and requirements of the content. By integrating powerful data visualization libraries and intelligent algorithms, it realizes the instant generation and customized editing of various charts, from simple line charts to complex low-granularity bar charts. Through the fine analysis of DOM tree differences, it can intelligently identify and retain the positions of key elements in the template, such as tables, paragraphs, headings, etc., to ensure the integrity and consistency of the format during data filling. The engine can intelligently identify the test scenario, accurately retrieve the corresponding test report template, and dynamically locate the positions of each data element in the template according to the content and quantity of the actual test items (equivalent to the target server business), realizing the seamless docking and automatic rendering of performance parameters, energy consumption parameters, energy efficiency parameters, etc. The entire process of test report generation does not require manual entry. It can intelligently identify and automatically capture key configuration information such as hard disk, CPU, and memory from the machine operating system (equivalent to server configuration information) to ensure the comprehensiveness and accuracy of the test report. When calling the template, it adopts the method of reading instead of adding, effectively preserving the original format of the template document. When the test data filling is completed, the system will intelligently identify and delete the redundant template elements (for the case where the actual test content is less than the template content), and automatically generate a test report with a consistent format in the specified directory (equivalent to the preset storage location), realizing efficient and accurate document generation.

[0111] Optionally, in this embodiment, for a better understanding of the above process of testing the server, the following further describes the testing process of the server in combination with optional embodiments, but it is not used to limit the technical solutions of the embodiments of the present application.

[0112] In this embodiment, a method for testing a server is provided. Figure 5 It is a schematic diagram of an optional testing process of a server according to an embodiment of the present application. As Figure 5 shown, taking the business scenarios of AI business scenario, big data business scenario, virtual machine business scenario, and database business scenario as examples, it mainly includes the following steps:

[0113] Step S501, Start: The process starts, and preparations are made for server testing.

[0114] Step S502, Set test parameters: The user sets the test parameters of the server through a friendly interaction interface (equivalent to the target interface), including basic information such as the server IP address, username, password, etc. (equivalent to public test parameters), and the sampling load. For example, the number of sampling loads is set to 4.

[0115] Step S503, Select test items and execute tests: Based on the set parameters, select the corresponding test items and execute. This step connects to four modules, namely the AI load simulation module, the big data load simulation module, the virtual machine load simulation module, and the database load simulation module. Each module can be used to run different server services. During the test, through the power consumption acquisition module, multi-threading technology is used to automatically collect the power consumption data of the server at a high frequency (once per second) to ensure the real-time and accuracy of the data. At the same time, the log recording module records the log information during the test process throughout. For example, test parameter logs: record the test scenarios, test parameters, etc. set by the user; test module operation logs: detailed records of the execution process of each test module, including start time, end time, module status changes, execution results, etc., to help track the execution process of the module; power consumption data logs: record the power consumption data of the server during the test; system status logs: monitor and record the hardware status of the server during the test, such as CPU occupancy, memory usage, hard disk I / O, etc., as well as network status and software environment information; error and warning logs: capture any abnormal situations that occur during the test, including but not limited to software errors, hardware failures, network instabilities, etc.

[0116] Step S504, Data analysis and evaluation: After collecting the performance data (equivalent to performance parameters) and power consumption data (equivalent to energy consumption parameters), enter the data analysis stage and calculate the energy efficiency evaluation score (equivalent to energy efficiency parameters).

[0117] Step S505, Generate an energy efficiency evaluation report: The energy efficiency evaluation tool can automatically select a suitable template through the intelligent document generation engine, integrate the server configuration information, performance parameters, energy consumption parameters, and energy efficiency parameters, and automatically generate a comprehensive energy efficiency evaluation report.

[0118] Step S506, End.

[0119] This solution abstracts the overall architecture of the server energy efficiency evaluation tool and integrates technologies such as Python, PyInstaller, python-docx, and python-pptx to achieve fully automated execution of the server energy efficiency evaluation process and dynamic generation of test reports. By adopting remote network operation of power meters and multi-thread technology, high-frequency automatic sampling of server power consumption is realized. At the same time, the test module is independently designed for flexible change and expansion. During the test process, from parameter entry, test item execution to data analysis and report generation, console logs are automatically printed throughout the process and log files are saved for process traceability. Through this solution, the following can be achieved:

[0120] 1. Comprehensive evaluation and visual analysis: It can simulate various load states of the server during actual operation, thus achieving a comprehensive evaluation of the server energy efficiency, improving the accuracy and reliability of the test. Through an innovative energy efficiency parameter calculation model and a multi-dimensional data visualization engine, it can more accurately evaluate the energy efficiency under different application scenarios and provide flexible analysis views, making data insights more intuitive and in-depth.

[0121] 2. Automated testing: Fully automated testing throughout the process reduces manual participation, lowers test costs, and improves test efficiency at the same time. Through a friendly interactive interface and an intelligent test process design, users can easily set common test parameters and select test items. At the same time, the serial test strategy and the test environment reset function ensure the independence and accuracy of the test results.

[0122] 3. Real-time report generation: After the test is completed, a detailed test report can be automatically generated, including the server configuration information, performance data of each test item (equivalent to performance parameters), power consumption data of each test item (equivalent to power consumption parameters), evaluation scores (equivalent to energy efficiency parameters), etc., which is convenient for timely understanding and optimizing the energy efficiency status of the server. Based on the cutting-edge template metaprogramming technology, an intelligent document generation engine is constructed, which can flexibly adjust the layout according to the characteristics and requirements of the content and automatically generate test reports with consistent formats, greatly saving the time and effort of users.

[0123] 4. Easy to expand: The design is flexible and it is easy to expand and upgrade the functions of the test module according to actual needs to meet the new requirements of future server energy efficiency testing.

[0124] In addition to being applied to data center servers, this method can also be applied to other devices that require energy efficiency management, such as network devices, storage devices, etc., to achieve comprehensive monitoring and optimization of energy efficiency. At the same time, this method can further combine artificial intelligence and big data technologies to deeply mine and analyze test data, realizing the intelligence and automation of energy efficiency management, further improving the efficiency and accuracy of energy efficiency management. It can also use cloud technology and Internet of Things technology to remotely monitor and manage the energy efficiency status of servers, reduce operation and maintenance costs, and improve operation and maintenance efficiency.

[0125] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0126] Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the existing technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of this application.

[0127] In this embodiment, a test device for a server is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0128] Figure 6 is a structural block diagram of a test device for a server according to an embodiment of this application; as Figure 6 shown, it includes:

[0129] A receiving module 1001, configured to receive a test request for requesting to test the energy efficiency parameters of the server;

[0130] A first processing module 1002, configured to respond to the test request, obtain sampling service parameters corresponding to the target server service when the server reaches multiple sampling loads, and obtain multiple groups of sampling service parameters. Each group of sampling service parameters is the operating parameters required for the target server service when the server is controlled to reach the corresponding sampling load;

[0131] The second processing module 1003 is configured to control the server to run the target server service according to multiple sets of sampling service parameters, and detect the performance parameters and energy consumption parameters of the server under each sampling load, so as to obtain multiple sets of performance parameters and energy consumption parameters with corresponding relationships. The performance parameters are used to indicate the performance of the server running the target server service under the corresponding sampling load, and the energy consumption parameters are used to indicate the energy consumption of the server running the target server service under the corresponding sampling load;

[0132] The generation module 1004 is configured to generate the energy efficiency parameters of the server according to multiple sets of performance parameters and energy consumption parameters with corresponding relationships.

[0133] In an exemplary embodiment, the first processing module includes:

[0134] An acquisition unit, configured to acquire the load service information corresponding to the server, where the load service information records the corresponding relationships between multiple loads of the server and multiple sets of service parameters, and each set of service parameters is the operating parameters required for the target server service to control the server to reach the corresponding load;

[0135] A matching unit, configured to match the sampling service parameters corresponding to each sampling load in the multiple sampling loads from the load service information, so as to obtain multiple sets of sampling service parameters.

[0136] In an exemplary embodiment, the apparatus further includes:

[0137] The first display module is configured to display multiple scenario identifiers of the server on the target interface before acquiring the sampling service parameters corresponding to the target server service when the server reaches multiple sampling loads, where each scenario identifier is used to identify a service scenario that allows testing the energy efficiency parameters of the server;

[0138] The first acquisition module is configured to acquire the target service scenario corresponding to the target scenario identifier on which a trigger operation is performed on the target interface;

[0139] A matching module, configured to match the service corresponding to the target service scenario from the service scenarios and server services with corresponding relationships, so as to obtain the target server service.

[0140] In an exemplary embodiment, the generation module includes:

[0141] The first generation unit is configured to generate a carbon emission coefficient for the energy consumption parameter in each set of performance parameters and energy consumption parameters with corresponding relationships, so as to obtain multiple sets of performance parameters, energy consumption parameters and carbon emission coefficients with corresponding relationships. The carbon emission coefficient is used to indicate the carbon dioxide emission per unit of server energy consumption when the server energy consumption reaches the energy consumption indicated by the corresponding energy consumption parameter;

[0142] A second generation unit for generating the energy efficiency parameter of the server according to multiple sets of performance parameters, energy consumption parameters and carbon emission coefficients with corresponding relationships.

[0143] In an exemplary embodiment, the first generation unit is used for:

[0144] In the case where the multiple sets of performance parameters and energy consumption parameters with corresponding relationships are n sets of performance parameters and energy consumption parameters with corresponding relationships, the j-th carbon emission coefficient is generated for the j-th energy consumption parameter among the j-th performance parameter and the j-th energy consumption parameter with corresponding relationships through the following steps, where n is an integer greater than 1, and j is an integer greater than or equal to 1 and less than or equal to n:

[0145] Obtain all the energy consumption parameters in the n sets of performance parameters and energy consumption parameters with corresponding relationships to get n energy consumption parameters;

[0146] Perform a division operation on the sum value of the j-th energy consumption parameter and the n energy consumption parameters to obtain the j-th energy consumption ratio;

[0147] Perform a multiplication operation on the j-th energy consumption ratio and the carbon emission factor to obtain the j-th carbon emission coefficient, where the carbon emission factor is used to indicate the carbon dioxide emissions corresponding to unit power energy consumption.

[0148] In an exemplary embodiment, the second generation unit is used for:

[0149] Generating the energy efficiency parameter of the server according to multiple sets of performance parameters, energy consumption parameters and carbon emission coefficients, including:

[0150] In the case where the multiple sets of performance parameters, energy consumption parameters and carbon emission coefficients with corresponding relationships are n sets of performance parameters, energy consumption parameters and carbon emission coefficients with corresponding relationships, the energy efficiency parameter of the server is generated through the following steps, where n is an integer greater than 1:

[0151] Obtain all the performance parameters in the n sets of performance parameters, energy consumption parameters and carbon emission coefficients with corresponding relationships to get n performance parameters;

[0152] Perform a multiplication operation on the n performance parameters to obtain a performance product;

[0153] Perform a multiplication operation on the n energy consumption parameters and carbon emission coefficients with corresponding relationships in the n sets of performance parameters, energy consumption parameters and carbon emission coefficients with corresponding relationships respectively to obtain n energy consumption products;

[0154] Perform an addition operation on the n energy consumption products to obtain an energy consumption sum value;

[0155] Generate the energy efficiency parameter according to the performance product and the energy consumption sum value.

[0156] In an exemplary embodiment, the apparatus further includes:

[0157] A second display module, configured to display multiple test report templates of the server on a target interface after generating energy efficiency parameters of the server according to multiple sets of performance parameters and energy consumption parameters with corresponding relationships;

[0158] A second acquisition module, configured to acquire a reference test report template on which a trigger operation is performed on the target interface;

[0159] A third acquisition module, configured to acquire server configuration information of the server;

[0160] A filling module, configured to fill the server configuration information, performance parameters, energy consumption parameters, and energy efficiency parameters into the reference test report template to obtain a target test report;

[0161] A transmission module, configured to transmit the target test report to a preset storage location.

[0162] It should be noted that the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are respectively located in different processors in any combination form.

[0163] For the description of the features in the corresponding embodiment of the server test apparatus, reference can be made to the relevant description in the corresponding embodiment of the server test method, which will not be elaborated here one by one.

[0164] An embodiment of the present application further provides an electronic device, Figure 7 which is a schematic diagram of the electronic device according to the embodiment of the present application, as Figure 7 shown. The electronic device includes a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above-mentioned embodiments of the server test method.

[0165] In an exemplary embodiment, the above-mentioned electronic device may further include a transmission device and an input / output device. Among them, the transmission device is connected to the above-mentioned processor, and the input / output device is connected to the above-mentioned processor.

[0166] The specific examples in this embodiment may refer to the examples described in the above-mentioned embodiments and exemplary embodiments, and will not be elaborated here.

[0167] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. Among them, the computer program is configured to execute the steps in any one of the above-mentioned embodiments of the server test method when running.

[0168] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memory (ROM for short), random access memory (RAM for short), external hard drives, magnetic disks, or optical discs that can store computer programs.

[0169] The embodiments of the present application also provide a computer program product, including a computer program. When the computer program is executed by a processor, it implements the steps of the methods in the various embodiments of the present application; the computer program product also includes a non-volatile computer-readable storage medium that stores the computer program, and when the computer program is executed by a processor, it implements the steps of the server testing method in the various embodiments of the present application.

[0170] Those skilled in the art can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0171] The above has introduced in detail a server testing method provided by the present application. Specific examples are used herein to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A testing method for a server, characterized in that, Including: Receiving a test request for requesting to test the energy efficiency parameters of a server; Responding to the test request, obtaining sampling service parameters corresponding to a target server service when the server reaches multiple sampling loads, and obtaining multiple groups of sampling service parameters, wherein each group of the sampling service parameters is an operating parameter required for the target server service to reach the corresponding sampling load when controlling the server to reach the corresponding sampling load; Controlling the server to run the target server service according to multiple groups of the sampling service parameters, and detecting performance parameters and energy consumption parameters of the server under each of the sampling loads, obtaining multiple groups of the performance parameters and the energy consumption parameters with a corresponding relationship, wherein the performance parameters are used to indicate the performance of the server running the target server service under the corresponding sampling load, and the energy consumption parameters are used to indicate the energy consumption of the server running the target server service under the corresponding sampling load; Generating energy efficiency parameters of the server according to multiple groups of the performance parameters and the energy consumption parameters with a corresponding relationship.

2. The method according to claim 1, wherein: The obtaining sampling service parameters corresponding to a target server service when the server reaches multiple sampling loads, and obtaining multiple groups of sampling service parameters includes: Obtaining load service information corresponding to the server, wherein the load service information records the corresponding relationship between multiple loads of the server and multiple groups of service parameters, and each group of the service parameters is an operating parameter required for the target server service to reach the corresponding load when controlling the server to reach the corresponding load; Matching the sampling service parameters corresponding to each of the multiple sampling loads from the load service information, and obtaining multiple groups of the sampling service parameters.

3. The method according to claim 1, wherein: Before the obtaining sampling service parameters corresponding to a target server service when the server reaches multiple sampling loads, the method further includes: Displaying multiple scenario identifiers of the server on a target interface, wherein each of the scenario identifiers is used to identify a service scenario that allows testing of the energy efficiency parameters of the server; Obtaining a target service scenario corresponding to a target scenario identifier on which a trigger operation is performed on the target interface; Matching the server service corresponding to the target service scenario from the corresponding relationship between the service scenario and the server service, and obtaining the target server service.

4. The method according to claim 1, wherein: The generating energy efficiency parameters of the server according to multiple groups of the performance parameters and the energy consumption parameters with a corresponding relationship includes: Generating a carbon emission coefficient for the energy consumption parameter in each group of the performance parameters and the energy consumption parameters with a corresponding relationship, obtaining multiple groups of the performance parameters, the energy consumption parameters and the carbon emission coefficient with a corresponding relationship, wherein the carbon emission coefficient is used to indicate the carbon dioxide emission per unit of server energy consumption when the server energy consumption of the server reaches the energy consumption indicated by the corresponding energy consumption parameter. Generate the energy efficiency parameter of the server based on multiple sets of the performance parameters, the energy consumption parameters, and the carbon emission coefficients with corresponding relationships.

5. The method according to claim 4, wherein generating the carbon emission coefficient for the energy consumption parameter in each set of the performance parameters and the energy consumption parameters with corresponding relationships includes: when there are n sets of the performance parameters and the energy consumption parameters with corresponding relationships, generating the j-th carbon emission coefficient for the j-th energy consumption parameter in the j-th set of the corresponding performance parameter and the j-th energy consumption parameter through the following steps, where n is an integer greater than 1, and j is an integer greater than or equal to 1 and less than or equal to n: Obtain all the energy consumption parameters in the n sets of the performance parameters and the energy consumption parameters with corresponding relationships, and obtain n energy consumption parameters; Perform a division operation on the j-th energy consumption parameter and the sum value of the n energy consumption parameters to obtain the j-th energy consumption ratio; Perform a multiplication operation on the j-th energy consumption ratio and the carbon emission factor to obtain the j-th carbon emission coefficient, where the carbon emission factor is used to indicate the carbon dioxide emissions corresponding to the consumption of unit electric energy.

6. The method according to claim 4, wherein generating the energy efficiency parameter of the server based on multiple sets of the performance parameters, the energy consumption parameters, and the carbon emission coefficients with corresponding relationships includes: when there are n sets of the performance parameters, the energy consumption parameters, and the carbon emission coefficients with corresponding relationships, generating the energy efficiency parameter of the server through the following steps, where n is an integer greater than 1: Obtain all the performance parameters in the n sets of the performance parameters, the energy consumption parameters, and the carbon emission coefficients with corresponding relationships, and obtain n performance parameters; Perform a multiplication operation on the n performance parameters to obtain a performance product; Perform a multiplication operation on the n energy consumption parameters and the n carbon emission coefficients in the n sets of the corresponding performance parameters, energy consumption parameters, and carbon emission coefficients respectively to obtain n energy consumption products; Perform an addition operation on the n energy consumption products to obtain an energy consumption sum value; Generate the energy efficiency parameter according to the performance product and the energy consumption sum value.

7. The method according to claim 1, wherein after generating the energy efficiency parameter of the server based on multiple sets of the performance parameters and the energy consumption parameters, the method further includes: Display multiple test report templates of the server on the target interface; Obtain the reference test report template that has been triggered on the target interface; Obtain the server configuration information of the server; Fill the server configuration information, the performance parameters, the energy consumption parameters, and the energy efficiency parameter into the reference test report template to obtain a target test report; Transmit the target test report to a preset storage location.

8. A test device for a server, wherein comprises: A receiving module, configured to receive a test request for requesting to test the energy efficiency parameters of a server; A first processing module, configured to respond to the test request, obtain sampling service parameters corresponding to a target server service when the server reaches multiple sampling loads, and obtain multiple groups of sampling service parameters, wherein each group of the sampling service parameters is an operating parameter required for the target server service when controlling the server to reach the corresponding sampling load; A second processing module, configured to control the server to operate the target server service according to multiple groups of the sampling service parameters, and detect performance parameters and energy consumption parameters of the server under each of the sampling loads, so as to obtain multiple groups of the performance parameters and the energy consumption parameters with corresponding relationships, wherein the performance parameters are used to indicate the performance of the server when operating the target server service under the corresponding sampling load, and the energy consumption parameters are used to indicate the energy consumption of the server when operating the target server service under the corresponding sampling load; A generating module, configured to generate energy efficiency parameters of the server according to multiple groups of the performance parameters and the energy consumption parameters with corresponding relationships.

9. An electronic device, characterized in that, Comprising: A memory, configured to store a computer program; A processor, configured to implement the steps of the test method of the server according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the test method of the server according to any one of claims 1 to 7 when being executed by a processor.

Citation Information

Patent Citations

  • Load sensing performance optimization method of cloud data center server under energy consumption constraint

    CN111506431A

  • Energy consumption pressure measurement method and device of server, electronic equipment and storage medium

    CN115269353A

  • Multi-node server energy efficiency test method, device and system and electronic equipment

    CN119226116A