CN112667493B - Stress testing method and device for simulating boards and applications occupying CPU resources - Google Patents

Stress testing method and device for simulating boards and applications occupying CPU resources Download PDF

Info

Publication number
CN112667493B
CN112667493B CN202011425394.7A CN202011425394A CN112667493B CN 112667493 B CN112667493 B CN 112667493B CN 202011425394 A CN202011425394 A CN 202011425394A CN 112667493 B CN112667493 B CN 112667493B
Authority
CN
China
Prior art keywords
cpu
tested
board
test
full
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011425394.7A
Other languages
Chinese (zh)
Other versions
CN112667493A (en
Inventor
陈佳旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202011425394.7A priority Critical patent/CN112667493B/en
Publication of CN112667493A publication Critical patent/CN112667493A/en
Application granted granted Critical
Publication of CN112667493B publication Critical patent/CN112667493B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

本发明提供一种模拟板卡与应用占满CPU资源的压力测试方法及装置,所述方法步骤:搭建测试环境,在服务器中安装待测板卡;启动测试,设置待测板卡满压力运行,并获取满压力运行时,待测板卡占用的CPU逻辑核及剩余逻辑核;对剩余逻辑核加压直至剩余逻辑核满压力运行,实现模拟板卡与应用占满CPU资源;记录CPU与待测板卡的实际运行功耗与散热量,并进行输出。本发明通过对待测板卡满载运行的CPU逻辑核数的占用情况进行监控,对剩余逻辑核加压,直至待测板卡与CPU都能满载运行,模拟服务器的实际应用场景,为待测板卡功耗以及CPU散热测试提供数据依据,既能保证待测板卡的满载运转,也极大的节省了测试时间和手动测试工作量。

Figure 202011425394

The invention provides a stress testing method and device in which an analog board and an application occupy full CPU resources. The method includes the steps of: building a test environment, installing a board to be tested in a server; starting the test, and setting the board to be tested to run under full pressure , and obtain the CPU logic cores and remaining logic cores occupied by the board to be tested when running at full pressure; pressurize the remaining logic cores until the remaining logic cores run at full pressure, so that the simulated boards and applications occupy full CPU resources; The actual operating power consumption and heat dissipation of the board to be tested are output. The invention monitors the occupancy of the CPU logic cores running at full load of the board to be tested, pressurizes the remaining logic cores until the board to be tested and the CPU can run at full load, simulates the actual application scenario of the server, and is the board to be tested. The card power consumption and CPU heat dissipation test provide data basis, which can not only ensure the full-load operation of the board under test, but also greatly save the test time and manual test workload.

Figure 202011425394

Description

模拟板卡与应用占满CPU资源的压力测试方法及装置Stress testing method and device for simulating boards and applications occupying CPU resources

技术领域technical field

本发明属于服务器板卡测试技术领域,具体涉及一种模拟板卡与应用占满CPU资源的压力测试方法及装置。The invention belongs to the technical field of server board card testing, and in particular relates to a stress testing method and device in which an analog board card and an application occupy CPU resources.

背景技术Background technique

随着服务器搭配不同板卡的需求不断增多,以下一代Whitely平台为例,双路服务器会插满很多板卡设备。当前的Purly平台,服务器可以根据需求搭配GPU、NPU以及显卡等设备。在服务器测试领域,当服务器插上某一板卡设备后,该设备只会占用CPU的一部分资源,根据测试需求要保证板卡设备满压力测试的情况下还要让CPU剩余利用率满载,所谓满载在实际应用场景中是通过一些应用的运行或者硬盘与其他板卡硬件的占用实现的。现有的测试方法一种是需要搭配其他板卡设备,先将所测试板卡满功率运转,然后对其他设备加压;二种是先对所测试板卡满功率运转然后用PTU工具对CPU进行加压。As the demand for servers with different boards continues to increase, taking the next-generation Whitely platform as an example, a dual-socket server will be filled with many board devices. On the current Purly platform, servers can be equipped with GPUs, NPUs, graphics cards and other devices as required. In the field of server testing, when a certain board device is plugged into the server, the device will only occupy a part of the CPU resources. According to the test requirements, it is necessary to ensure that the remaining CPU utilization is fully loaded when the board device is fully stressed and tested. The so-called In practical application scenarios, full load is achieved through the operation of some applications or the occupation of hard disks and other board hardware. One of the existing test methods is to match other board equipment, first run the tested board at full power, and then pressurize other devices; the second is to run the tested board at full power and then use the PTU tool to test the CPU. Pressurize.

上述两种方法虽然都能让CPU满足占用率满压的情况,但会对所测试的板卡部件造成影响,会减少所测板卡对CPU的占有率,造成所测板卡部件不能满功耗运转,达不到先满足所测板卡部件满压运行的情况下再对CPU剩余资源满载运行的情况。Although the above two methods can make the CPU meet the full occupancy rate, they will affect the tested board components, reduce the occupancy rate of the tested board on the CPU, and cause the tested board components not to be fully functional. It is not possible to run at full load on the remaining CPU resources under the condition that the board components under test are run at full voltage.

此为现有技术的不足,因此,针对现有技术中的上述缺陷,提供一种模拟板卡与应用占满CPU资源的压力测试方法及装置,是非常有必要的。This is a shortcoming of the prior art. Therefore, in view of the above-mentioned defects in the prior art, it is very necessary to provide a stress testing method and apparatus for simulating a board card and an application to occupy CPU resources.

发明内容SUMMARY OF THE INVENTION

针对现有技术的上述现有的两种板卡测试方法不能实现所测板卡满压力运行,或者需要搭配其他硬件,逐步调控的方式,费时费力的缺陷,本发明提供一种模拟板卡与应用占满CPU资源的压力测试方法及装置,以解决上述技术问题。Aiming at the shortcomings of the prior art that the above-mentioned two existing board testing methods cannot realize the full pressure operation of the tested board, or need to be matched with other hardware, and the method of step-by-step regulation is time-consuming and labor-intensive, the present invention provides an analog board with A stress testing method and device that occupies CPU resources are applied to solve the above-mentioned technical problems.

第一方面,本发明提供一种模拟板卡与应用占满CPU资源的压力测试方法,包括如下步骤:In a first aspect, the present invention provides a stress test method for simulating a board and an application to occupy CPU resources, including the following steps:

S1.搭建测试环境,在服务器中安装待测板卡;S1. Build a test environment and install the board to be tested in the server;

S2.启动测试,设置待测板卡满压力运行,并获取满压力运行时,待测板卡占用的CPU逻辑核及剩余逻辑核;S2. Start the test, set the board to be tested to run at full pressure, and obtain the CPU logic cores and remaining logic cores occupied by the board to be tested when running at full pressure;

S3.对剩余逻辑核加压直至剩余逻辑核满压力运行,实现模拟板卡与应用占满CPU资源;S3. Pressurize the remaining logic cores until the remaining logic cores run under full pressure, so that the simulation board and application can occupy the CPU resources;

S4.记录CPU与待测板卡的实际运行功耗与散热量,并进行输出。S4. Record the actual operating power consumption and heat dissipation of the CPU and the board to be tested, and output them.

进一步地,步骤S1具体步骤如下:Further, the specific steps of step S1 are as follows:

S11.搭建测试环境;S11. Build a test environment;

S12.设置服务器内存和CPU满配;S12. Set the server memory and CPU full configuration;

S13.安装操作系统;S13. Install the operating system;

S14.安装待测板卡。S14. Install the board to be tested.

进一步地,步骤S2具体步骤如下:Further, the specific steps of step S2 are as follows:

S21.启动测试;S21. Start the test;

S22.获取待测板卡类型,并根据待测板卡类型选择测试工具对待测板卡进行满压力测试;S22. Obtain the type of the board to be tested, and select a test tool according to the type of the board to be tested to perform a full pressure test on the board to be tested;

S23.获取待测板卡满压力运行时,CPU被占用的逻辑核;S23. Obtain the logic cores occupied by the CPU when the board to be tested is running under full pressure;

S24.判断是否CPU的所有逻辑核均被占用;S24. Determine whether all logical cores of the CPU are occupied;

若是,进入步骤S4;If yes, go to step S4;

若否,获取剩余逻辑核,进入步骤S3。If not, obtain the remaining logic cores, and go to step S3.

进一步地,步骤S3具体步骤如下:Further, the specific steps of step S3 are as follows:

S31.判断CPU被占用逻辑核的占用率是否均为100%;S31. Determine whether the occupancy rate of the CPU occupied logic core is 100%;

若是,进入步骤S33;If yes, go to step S33;

若否,进入步骤S32;If not, go to step S32;

S32.获取占用率不为100%的逻辑核,设定为未充分利用核,通过PTU工具对未充分利用核进行加压测试,直至未充分利用核利用率达100%;S32. Obtain the logical core whose occupancy rate is not 100%, set it as an underutilized core, and perform a stress test on the underutilized core through the PTU tool until the underutilized core utilization rate reaches 100%;

S33.通过PTU工具对剩余逻辑核进行加压测试,直至剩余逻辑核满压力运行,实现模拟板卡与应用占满CPU资源。S33. Use the PTU tool to perform a pressure test on the remaining logic cores until the remaining logic cores run under full pressure, so that the simulated boards and applications can fill up the CPU resources.

进一步地,步骤S4具体步骤如下:Further, the specific steps of step S4 are as follows:

S41.获取待测板卡满压力运行的运行功耗与散热量,并记录;S41. Obtain and record the operating power consumption and heat dissipation of the board to be tested under full pressure;

S42.获取CPU各逻辑核满压力运行的总运行功耗与散热量,并记录;S42. Obtain and record the total operating power consumption and heat dissipation of each logical core of the CPU running under full pressure;

S43.输出待测板卡及CPU各自的运行功耗及散热量。S43. Output the respective operating power consumption and heat dissipation of the board to be tested and the CPU.

第二方面,本发明提供一种模拟板卡与应用占满CPU资源的压力测试装置,包括:In a second aspect, the present invention provides a stress testing device in which an analog board and an application occupy full CPU resources, including:

测试环境搭建模块,用于搭建测试环境,在服务器中安装待测板卡;The test environment building module is used to build the test environment and install the board to be tested in the server;

待测板卡满压力测试模块,用于启动测试,设置待测板卡满压力运行,并获取满压力运行时,待测板卡占用的CPU逻辑核及剩余逻辑核;The board under test is full of pressure test module, which is used to start the test, set the board under test to run under full pressure, and obtain the CPU logic cores and remaining logic cores occupied by the board under test when it runs under full pressure;

CPU逻辑核占满模拟模块,对剩余逻辑核加压直至剩余逻辑核满压力运行,实现模拟板卡与应用占满CPU资源;The CPU logic core fills the analog module, and the remaining logic cores are pressurized until the remaining logic cores run under full pressure, so that the simulation board and applications can fill up the CPU resources;

功耗与散热量输出模块,用于记录CPU与待测板卡的实际运行功耗与散热量,并进行输出。The power consumption and heat dissipation output module is used to record and output the actual operating power consumption and heat dissipation of the CPU and the board under test.

进一步地,测试环境搭建模块包括:Further, the test environment building module includes:

测试环境搭建单元,用于搭建测试环境;The test environment building unit is used to build the test environment;

内存及CPU配置单元,用于设置服务器内存和CPU满配;The memory and CPU configuration unit is used to set the full configuration of server memory and CPU;

操作系统安装单元,用于安装操作系统;an operating system installation unit for installing an operating system;

待测板卡安装单元,用于安装待测板卡。The installation unit for the board to be tested is used to install the board to be tested.

进一步地,待测板卡满压力测试模块包括:Further, the full pressure test module of the board to be tested includes:

测试启动单元,用于启动测试;Test start unit, used to start the test;

待测板卡满压力测试设置单元,用于获取待测板卡类型,并根据待测板卡类型选择测试工具对待测板卡进行满压力测试;The full pressure test setting unit of the board to be tested is used to obtain the type of the board to be tested, and select a test tool to perform a full pressure test of the board to be tested according to the type of the board to be tested;

CPU占用逻辑核获取单元,用于获取待测板卡满压力运行时,CPU被占用的逻辑核;The CPU occupied logic core acquisition unit is used to obtain the logic cores occupied by the CPU when the board under test is running under full pressure;

逻辑核占用判断单元,用于判断是否CPU的所有逻辑核均被占用;The logic core occupancy judgment unit is used to judge whether all the logic cores of the CPU are occupied;

剩余逻辑核获取单元,用于存在CPU的所有逻辑核未被占用时,获取剩余逻辑核。The remaining logical core acquiring unit is used to acquire the remaining logical cores when all logical cores of the CPU are not occupied.

进一步地,CPU逻辑核占满模拟模块包括:Further, the full simulation module of the CPU logic core includes:

占用逻辑核占用率判断单元,用于判断CPU被占用逻辑核的占用率是否均为100%;The occupied logic core occupancy rate judgment unit is used to judge whether the occupancy rate of the CPU occupied logic core is 100%;

未充分利用核加压单元,用于存在CPU被占用逻辑核未被占满时,获取占用率不为100%的逻辑核,设定为未充分利用核,通过PTU工具对未充分利用核进行加压测试,直至未充分利用核利用率达100%;The underutilized core pressurization unit is used to obtain logical cores whose occupancy rate is not 100% when the CPU is occupied and the logical cores are not fully occupied, and set them as underutilized cores. Pressure testing until the underutilized nuclear utilization reaches 100%;

剩余逻辑加压单元,用于通过PTU工具对剩余逻辑核进行加压测试,直至剩余逻辑核满压力运行,实现模拟板卡与应用占满CPU资源。The remaining logic pressurization unit is used to pressurize the remaining logic cores through the PTU tool until the remaining logic cores run under full pressure, so that the simulation board and applications can occupy the CPU resources.

进一步地,功耗与散热量输出模块包括:Further, the power consumption and heat dissipation output module includes:

待测板卡功耗和散热量获取单元,用于获取待测板卡满压力运行的运行功耗与散热量,并记录;The power consumption and heat dissipation acquisition unit of the board to be tested is used to obtain and record the operating power consumption and heat dissipation of the board to be tested under full pressure;

CPU功耗和散热量获取单元,用于获取CPU各逻辑核满压力运行的总运行功耗与散热量,并记录;The CPU power consumption and heat dissipation acquisition unit is used to obtain and record the total operating power consumption and heat dissipation of each logical core of the CPU running under full pressure;

功耗及散热量输出单元,用于输出待测板卡及CPU各自的运行功耗及散热量。The power consumption and heat dissipation output unit is used to output the respective operating power consumption and heat dissipation of the board under test and the CPU.

本发明的有益效果在于,The beneficial effect of the present invention is that,

本发明提供的模拟板卡与应用占满CPU资源的压力测试方法及装置,通过对待测板卡满载运行时对CPU逻辑核数的实际占用情况进行监控,然后对剩余逻辑核加压,直至达到待测板卡与CPU都能满载运行的应用场景,对于模拟服务器的实际应用场景、待测板卡的功耗以及CPU的散热测试提供数据依据,本发明相较于传统的测试方法既能保证待测板卡的满载运转,也极大的节省了测试时间和手动测试工作量。The stress testing method and device for simulating board cards and applications that occupy full CPU resources provided by the present invention monitor the actual occupancy of the number of CPU logical cores when the board to be tested is fully loaded, and then pressurize the remaining logical cores until the The application scenario where both the board to be tested and the CPU can run at full load provides data basis for the actual application scenario of the simulated server, the power consumption of the board to be tested, and the heat dissipation test of the CPU. Compared with the traditional testing method, the present invention can ensure that both The full-load operation of the board under test also greatly saves test time and manual test workload.

此外,本发明设计原理可靠,结构简单,具有非常广泛的应用前景。In addition, the present invention has reliable design principle and simple structure, and has a very wide application prospect.

由此可见,本发明与现有技术相比,具有突出的实质性特点和显著的进步,其实施的有益效果也是显而易见的。It can be seen that, compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. In other words, other drawings can also be obtained based on these drawings without creative labor.

图1是本发明的方法流程示意图一;Fig. 1 is method flow schematic diagram one of the present invention;

图2是本发明的方法流程示意图二;Fig. 2 is method flow schematic diagram two of the present invention;

图3是本发明的系统示意图;Fig. 3 is the system schematic diagram of the present invention;

图中,1-测试环境搭建模块;1.1-测试环境搭建单元;1.2-内存及CPU配置单元;1.3-操作系统安装单元;1.4-待测板卡安装单元;2-待测板卡满压力测试模块;2.1-测试启动单元;2.2-待测板卡满压力测试设置单元;2.3-CPU占用逻辑核获取单元;2.4-逻辑核占用判断单元;2.5-剩余逻辑核获取单元;3-CPU逻辑核占满模拟模块;3.1-占用逻辑核占用率判断单元;3.2-未充分利用核加压单元;3.3-剩余逻辑加压单元;4-功耗与散热量输出模块;4.1-待测板卡功耗和散热量获取单元;4.2-CPU功耗和散热量获取单元;4.3-功耗及散热量输出单元。In the figure, 1- test environment building module; 1.1- test environment building unit; 1.2- memory and CPU configuration unit; 1.3- operating system installation unit; 1.4- board under test installation unit; 2- board under test full pressure test Module; 2.1-Test startup unit; 2.2-Board under test full stress test setting unit; 2.3-CPU occupied logic core acquisition unit; 2.4-Logical core occupied judgment unit; 2.5-Remaining logic core acquisition unit; 3-CPU logic core Occupied analog module; 3.1-Occupied logic core occupancy rate judgment unit; 3.2-Unfully utilized core pressure unit; 3.3-Remaining logic pressure unit; 4-Power consumption and heat dissipation output module; 4.1-Untested board power Power consumption and heat dissipation acquisition unit; 4.2-CPU power consumption and heat dissipation acquisition unit; 4.3-Power consumption and heat dissipation output unit.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

实施例1:Example 1:

如图1所示,本发明提供一种模拟板卡与应用占满CPU资源的压力测试方法,包括如下步骤:As shown in FIG. 1 , the present invention provides a stress test method for simulating a board and an application to occupy CPU resources, including the following steps:

S1.搭建测试环境,在服务器中安装待测板卡;S1. Build a test environment and install the board to be tested in the server;

S2.启动测试,设置待测板卡满压力运行,并获取满压力运行时,待测板卡占用的CPU逻辑核及剩余逻辑核;S2. Start the test, set the board to be tested to run at full pressure, and obtain the CPU logic cores and remaining logic cores occupied by the board to be tested when running at full pressure;

S3.对剩余逻辑核加压直至剩余逻辑核满压力运行,实现模拟板卡与应用占满CPU资源;S3. Pressurize the remaining logic cores until the remaining logic cores run under full pressure, so that the simulation board and application can occupy the CPU resources;

S4.记录CPU与待测板卡的实际运行功耗与散热量,并进行输出。S4. Record the actual operating power consumption and heat dissipation of the CPU and the board to be tested, and output them.

实施例2:Example 2:

如图2所示,本发明提供一种模拟板卡与应用占满CPU资源的压力测试方法,包括如下步骤:As shown in FIG. 2 , the present invention provides a stress test method in which an analog board and an application occupy CPU resources, including the following steps:

S1.搭建测试环境,在服务器中安装待测板卡;具体步骤如下:S1. Build a test environment and install the board to be tested in the server; the specific steps are as follows:

S11.搭建测试环境;S11. Build a test environment;

S12.设置服务器内存和CPU满配;S12. Set the server memory and CPU full configuration;

S13.安装操作系统;S13. Install the operating system;

S14.安装待测板卡;S14. Install the board to be tested;

S2.启动测试,设置待测板卡满压力运行,并获取满压力运行时,待测板卡占用的CPU逻辑核及剩余逻辑核;具体步骤如下:S2. Start the test, set the board to be tested to run at full pressure, and obtain the CPU logic cores and remaining logic cores occupied by the board to be tested when running at full pressure; the specific steps are as follows:

S21.启动测试;S21. Start the test;

S22.获取待测板卡类型,并根据待测板卡类型选择测试工具对待测板卡进行满压力测试;例如,当待测板卡为GPU板卡时,采用nvqual测试工具;S22. Obtain the type of the board to be tested, and select a test tool according to the type of the board to be tested to perform a full stress test on the board to be tested; for example, when the board to be tested is a GPU board, use the nvqual test tool;

S23.获取待测板卡满压力运行时,CPU被占用的逻辑核;可通过代码:sar–P ALL 110查看CPU的逻辑核占用情况;S23. Obtain the logic cores occupied by the CPU when the board to be tested is running under full pressure; you can check the logic core occupancy status of the CPU through the code: sar-P ALL 110;

S24.判断是否CPU的所有逻辑核均被占用;S24. Determine whether all logical cores of the CPU are occupied;

若是,进入步骤S4;If yes, go to step S4;

若否,获取剩余逻辑核,进入步骤S3;将占用逻辑核与物理核对照表进行比对,即可找出需要加压的剩余逻辑核;If not, obtain the remaining logical cores, and proceed to step S3; compare the occupied logical cores with the physical core comparison table, and then find out the remaining logical cores that need to be pressurized;

S3.对剩余逻辑核加压直至剩余逻辑核满压力运行,实现模拟板卡与应用占满CPU资源;具体步骤如下:S3. Pressurize the remaining logic cores until the remaining logic cores run at full pressure, so that the simulation board and applications can occupy the CPU resources; the specific steps are as follows:

S31.判断CPU被占用逻辑核的占用率是否均为100%;S31. Determine whether the occupancy rate of the CPU occupied logic core is 100%;

若是,进入步骤S33;If yes, go to step S33;

若否,进入步骤S32;If not, go to step S32;

S32.获取占用率不为100%的逻辑核,设定为未充分利用核,通过PTU工具对未充分利用核进行加压测试,直至未充分利用核利用率达100%;S32. Obtain the logical core whose occupancy rate is not 100%, set it as an underutilized core, and perform a stress test on the underutilized core through the PTU tool until the underutilized core utilization rate reaches 100%;

S33.通过PTU工具对剩余逻辑核进行加压测试,直至剩余逻辑核满压力运行,实现模拟板卡与应用占满CPU资源;可通过如下代码:ptugen–ct2–cpu 1core 0x**对剩余逻辑核进行加压测试;S33. Use the PTU tool to pressurize the remaining logic cores until the remaining logic cores run under full pressure, so that the simulation board and applications can occupy the CPU resources; the following code can be used: ptugen–ct2–cpu 1core 0x** to the remaining logic Nuclear pressure test;

S4.记录CPU与待测板卡的实际运行功耗与散热量,并进行输出;具体步骤如下:S4. Record the actual operating power consumption and heat dissipation of the CPU and the board to be tested, and output them; the specific steps are as follows:

S41.获取待测板卡满压力运行的运行功耗与散热量,并记录;S41. Obtain and record the operating power consumption and heat dissipation of the board to be tested under full pressure;

S42.获取CPU各逻辑核满压力运行的总运行功耗与散热量,并记录;S42. Obtain and record the total operating power consumption and heat dissipation of each logical core of the CPU running under full pressure;

S43.输出待测板卡及CPU各自的运行功耗及散热量。S43. Output the respective operating power consumption and heat dissipation of the board to be tested and the CPU.

实施例3:Example 3:

如图3所示,本发明提供一种模拟板卡与应用占满CPU资源的压力测试装置,包括:As shown in FIG. 3 , the present invention provides a stress testing device for simulating a board and an application that occupies CPU resources, including:

测试环境搭建模块1,用于搭建测试环境,在服务器中安装待测板卡;测试环境搭建模块1包括:The test environment building module 1 is used to build the test environment and install the board to be tested in the server; the test environment building module 1 includes:

测试环境搭建单元1.1,用于搭建测试环境;The test environment building unit 1.1 is used to build the test environment;

内存及CPU配置单元1.2,用于设置服务器内存和CPU满配;Memory and CPU configuration unit 1.2, used to set the server memory and CPU full configuration;

操作系统安装单元1.3,用于安装操作系统;The operating system installation unit 1.3 is used to install the operating system;

待测板卡安装单元1.4,用于安装待测板卡;The board under test installation unit 1.4 is used to install the board under test;

待测板卡满压力测试模块2,用于启动测试,设置待测板卡满压力运行,并获取满压力运行时,待测板卡占用的CPU逻辑核及剩余逻辑核;待测板卡满压力测试模块2包括:The board under test is full of pressure test module 2, which is used to start the test, set the board under test to run under full pressure, and obtain the CPU logic cores and remaining logic cores occupied by the board under test when the board under test runs under full pressure; the board under test is full Stress Test Module 2 includes:

测试启动单元2.1,用于启动测试;Test start unit 2.1, used to start the test;

待测板卡满压力测试设置单元2.2,用于获取待测板卡类型,并根据待测板卡类型选择测试工具对待测板卡进行满压力测试;The full pressure test setting unit 2.2 of the board to be tested is used to obtain the type of the board to be tested, and select a test tool to perform a full pressure test of the board to be tested according to the type of the board to be tested;

CPU占用逻辑核获取单元2.3,用于获取待测板卡满压力运行时,CPU被占用的逻辑核;The CPU occupied logic core acquisition unit 2.3 is used to obtain the logic cores occupied by the CPU when the board under test is running under full pressure;

逻辑核占用判断单元2.4,用于判断是否CPU的所有逻辑核均被占用;The logical core occupation determination unit 2.4 is used to determine whether all logical cores of the CPU are occupied;

剩余逻辑核获取单元2.5,用于存在CPU的所有逻辑核未被占用时,获取剩余逻辑核;The remaining logical core acquisition unit 2.5 is used to acquire the remaining logical cores when all logical cores of the CPU are not occupied;

CPU逻辑核占满模拟模块3,对剩余逻辑核加压直至剩余逻辑核满压力运行,实现模拟板卡与应用占满CPU资源;CPU逻辑核占满模拟模块3包括:The CPU logic core fills up the simulation module 3, and pressurizes the remaining logic cores until the remaining logic cores run at full pressure, so that the simulation board and applications fill up the CPU resources; the CPU logic core fills up the simulation module 3, including:

占用逻辑核占用率判断单元3.1,用于判断CPU被占用逻辑核的占用率是否均为100%;The occupied logic core occupancy rate judgment unit 3.1 is used to judge whether the occupancy rate of the CPU occupied logic core is 100%;

未充分利用核加压单元3.2,用于存在CPU被占用逻辑核未被占满时,获取占用率不为100%的逻辑核,设定为未充分利用核,通过PTU工具对未充分利用核进行加压测试,直至未充分利用核利用率达100%;The underutilized core pressure unit 3.2 is used to obtain logical cores whose occupancy rate is not 100% when the CPU is occupied and the logical cores are not fully occupied, and set them as underutilized cores. Pressure testing is performed until the underutilized nuclear utilization reaches 100%;

剩余逻辑加压单元3.3,用于通过PTU工具对剩余逻辑核进行加压测试,直至剩余逻辑核满压力运行,实现模拟板卡与应用占满CPU资源;The remaining logic pressurization unit 3.3 is used to pressurize the remaining logic cores through the PTU tool until the remaining logic cores run under full pressure, so that the simulation boards and applications can fill up the CPU resources;

功耗与散热量输出模块4,用于记录CPU与待测板卡的实际运行功耗与散热量,并进行输出;功耗与散热量输出模块4包括:The power consumption and heat dissipation output module 4 is used to record the actual operating power consumption and heat dissipation of the CPU and the board to be tested, and output them; the power consumption and heat dissipation output module 4 includes:

待测板卡功耗和散热量获取单元4.1,用于获取待测板卡满压力运行的运行功耗与散热量,并记录;The power consumption and heat dissipation acquisition unit 4.1 of the board to be tested is used to obtain and record the operating power consumption and heat dissipation of the board to be tested under full pressure;

CPU功耗和散热量获取单元4.2,用于获取CPU各逻辑核满压力运行的总运行功耗与散热量,并记录;The CPU power consumption and heat dissipation acquisition unit 4.2 is used to obtain and record the total operating power consumption and heat dissipation of each logical core of the CPU under full pressure;

功耗及散热量输出单元4.3,用于输出待测板卡及CPU各自的运行功耗及散热量。The power consumption and heat dissipation output unit 4.3 is used to output the respective operating power consumption and heat dissipation of the board to be tested and the CPU.

尽管通过参考附图并结合优选实施例的方式对本发明进行了详细描述,但本发明并不限于此。在不脱离本发明的精神和实质的前提下,本领域普通技术人员可以对本发明的实施例进行各种等效的修改或替换,而这些修改或替换都应在本发明的涵盖范围内/任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。Although the present invention has been described in detail in conjunction with the preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, those of ordinary skill in the art can make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions should all fall within the scope of the present invention/any Those skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should all be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (10)

1. A pressure test method for simulating board cards and applying full CPU resources is characterized by comprising the following steps:
s1, building a test environment, and installing a board card to be tested in a server;
s2, starting a test, setting the board to be tested to operate under full pressure, and acquiring a CPU logic core and the rest logic cores occupied by the board to be tested when the board to be tested operates under full pressure;
s3, pressurizing the residual logic cores until the residual logic cores run at full pressure, and realizing that the CPU resources are fully occupied by the simulation board card and the application;
and S4, recording the actual operation power consumption and the heat dissipation capacity of the CPU and the board card to be tested, and outputting.
2. The method for testing the pressure of the simulation board card and the application occupying the CPU resource according to claim 1, wherein the step S1 specifically comprises the following steps:
s11, building a test environment;
s12, setting a server memory and a CPU full configuration;
s13, installing an operating system;
and S14, mounting a board card to be tested.
3. The method for testing the pressure of the simulation board card and the application occupying the CPU resource according to claim 1, wherein the step S2 specifically comprises the following steps:
s21, starting a test;
s22, acquiring the type of the board card to be tested, and selecting a testing tool to perform full pressure test on the board card to be tested according to the type of the board card to be tested;
s23, acquiring an occupied logic core of the CPU when the board to be tested runs under full pressure;
s24, judging whether all logic cores of the CPU are occupied or not;
if yes, go to step S4;
if not, the remaining logical cores are acquired, and the process proceeds to step S3.
4. The method for testing the pressure of the simulation board card and the application occupying the CPU resource according to claim 1, wherein the step S3 specifically comprises the following steps:
s31, judging whether the occupancy rates of the occupied logic cores of the CPU are both 100%;
if yes, go to step S33;
if not, go to step S32;
s32, acquiring a logic core with the occupancy rate of not 100%, setting the logic core as an underutilized core, and performing a pressurization test on the underutilized core through a PTU tool until the utilization rate of the underutilized core reaches 100%;
and S33, performing pressurization test on the remaining logic cores through the PTU tool until the remaining logic cores run at full pressure, so that the CPU resources are fully occupied by the simulation board card and the application.
5. The method for testing the pressure of the simulation board card and the application occupying the CPU resource according to claim 1, wherein the step S4 specifically comprises the following steps:
s41, acquiring and recording the running power consumption and the heat dissipation capacity of the board to be tested in full-pressure running;
s42, acquiring and recording the total operation power consumption and heat dissipation capacity of each logic core of the CPU in full-pressure operation;
and S43, outputting the respective running power consumption and heat dissipation capacity of the board card to be tested and the CPU.
6. A pressure test device for simulating board cards and applications occupying CPU resources is characterized by comprising:
the test environment building module (1) is used for building a test environment and installing a board card to be tested in the server;
the full-pressure test module (2) of the board to be tested is used for starting a test, setting the full-pressure operation of the board to be tested, and acquiring a CPU logic core and the residual logic core occupied by the board to be tested when the board to be tested operates at the full pressure;
the CPU logic core full-occupation simulation module (3) is used for pressurizing the rest logic cores until the rest logic cores run at full pressure, so that the CPU resources are occupied by the simulation board card and the application;
and the power consumption and heat dissipation output module (4) is used for recording the actual operation power consumption and heat dissipation of the CPU and the board card to be tested and outputting the actual operation power consumption and heat dissipation.
7. The pressure testing device for simulating the board card and the application occupying the CPU resource according to claim 6, wherein the testing environment building module (1) comprises:
the test environment building unit (1.1) is used for building a test environment;
the memory and CPU configuration unit (1.2) is used for setting the full configuration of the memory and the CPU of the server;
an operating system installation unit (1.3) for installing an operating system;
and the board card mounting unit (1.4) to be tested is used for mounting the board card to be tested.
8. The pressure test device for simulating the board card and the application occupying the CPU resources according to claim 6, wherein the board card full pressure test module (2) to be tested comprises:
a test start unit (2.1) for starting a test;
the full pressure test setting unit (2.2) of the board card to be tested is used for acquiring the type of the board card to be tested and selecting a test tool to perform full pressure test on the board card to be tested according to the type of the board card to be tested;
a CPU occupation logic core obtaining unit (2.3) for obtaining the logic core occupied by the CPU when the board to be tested runs at full pressure;
a logic core occupation judging unit (2.4) for judging whether all logic cores of the CPU are occupied;
and a remaining logic core acquisition unit (2.5) for acquiring the remaining logic cores when all the logic cores of the CPU are not occupied.
9. The pressure test device for simulating board card and application full of CPU resources as claimed in claim 6, wherein the CPU logic core full simulation module (3) comprises:
an occupancy rate judgment unit (3.1) for judging whether the occupancy rates of the occupied logic cores of the CPU are both 100%;
the underutilization core pressurizing unit (3.2) is used for acquiring the logic core with the occupancy rate of not 100% when the logic core occupied by the CPU is not fully occupied, setting the logic core as the underutilization core, and performing pressurization test on the underutilization core through a PTU tool until the utilization rate of the underutilization core reaches 100%;
and the residual logic pressurization unit (3.3) is used for performing pressurization test on the residual logic cores through the PTU tool until the residual logic cores run at full pressure, so that the simulation board card and the application occupy the CPU resource.
10. The pressure test device for simulating the occupation of the board card and the application of the CPU resource according to claim 6, wherein the power consumption and heat dissipation output module (4) comprises:
the power consumption and heat dissipation capacity acquisition unit (4.1) of the board card to be tested is used for acquiring and recording the running power consumption and heat dissipation capacity of the board card to be tested in full-pressure operation;
a CPU power consumption and heat dissipation capacity acquisition unit (4.2) for acquiring and recording the total operation power consumption and heat dissipation capacity of each logic core of the CPU in full pressure operation;
and the power consumption and heat dissipation output unit (4.3) is used for outputting the respective operation power consumption and heat dissipation of the board card to be tested and the CPU.
CN202011425394.7A 2020-12-09 2020-12-09 Stress testing method and device for simulating boards and applications occupying CPU resources Active CN112667493B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011425394.7A CN112667493B (en) 2020-12-09 2020-12-09 Stress testing method and device for simulating boards and applications occupying CPU resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011425394.7A CN112667493B (en) 2020-12-09 2020-12-09 Stress testing method and device for simulating boards and applications occupying CPU resources

Publications (2)

Publication Number Publication Date
CN112667493A CN112667493A (en) 2021-04-16
CN112667493B true CN112667493B (en) 2022-08-05

Family

ID=75401556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011425394.7A Active CN112667493B (en) 2020-12-09 2020-12-09 Stress testing method and device for simulating boards and applications occupying CPU resources

Country Status (1)

Country Link
CN (1) CN112667493B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114003373B (en) * 2021-09-30 2023-11-03 苏州浪潮智能科技有限公司 Service testing method, device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104502690A (en) * 2014-12-30 2015-04-08 中科创达软件股份有限公司 CPU power consumption test method and CPU power consumption test system
CN111966549A (en) * 2020-08-19 2020-11-20 苏州浪潮智能科技有限公司 CPU pressure testing method and device of server and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9417927B2 (en) * 2014-04-01 2016-08-16 International Business Machines Corporation Runtime capacity planning in a simultaneous multithreading (SMT) environment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104502690A (en) * 2014-12-30 2015-04-08 中科创达软件股份有限公司 CPU power consumption test method and CPU power consumption test system
CN111966549A (en) * 2020-08-19 2020-11-20 苏州浪潮智能科技有限公司 CPU pressure testing method and device of server and computer readable storage medium

Also Published As

Publication number Publication date
CN112667493A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
CN104317709B (en) Software performance testing method and system
CN111694714B (en) A method, device, device, and readable storage medium for estimating power consumption of many-core chips
CN107608893B (en) Pressure test scheduling method and device, scheduling server and computing equipment
CN108804768A (en) One kind making the light-weighted method of BIM models
CN111652279B (en) Behavior evaluation method and device based on time sequence data and readable storage medium
CN112667493B (en) Stress testing method and device for simulating boards and applications occupying CPU resources
CN112631865B (en) A server power consumption test method, device, control system and medium
CN110413462B (en) Server pressure testing method and device
Ardito et al. Creating and evaluating a software power model for linux single board computers
Qingchuan et al. Improved step stress accelerated life testing method for electronic product
CN107590037A (en) A kind of method that EDPP tests are carried out to server GPU
CN107944112A (en) A kind of method and system of RES(rapid evaluation system) high-speed link risk point
CN109213665B (en) Distributed concurrent accelerated test technology and platform construction method
CN106445761A (en) Test method and system for regularly recording CPU and memory based on SSH (Secure Shell) protocol
CN118779168A (en) Stability testing method, device, electronic equipment and storage medium for vehicle-mounted system
CN106126223A (en) Method for automatically establishing Raid card array based on K-UX rescue mode
CN105204999A (en) Method for realizing automatic test of CPU VR Static LL test
CN118627440A (en) UVM verification platform and verification, generation method, device, system, medium, and equipment
CN112231159B (en) A memory installation position testing method, system, terminal and storage medium
CN113821442B (en) Stress testing method, system, terminal and storage medium based on normal distribution
CN117149555A (en) Test management method, device, equipment and medium based on server power consumption
CN105910884B (en) A kind of parallel branch lifting and lowering method for fatigue strength test
CN110045257A (en) One kind is based on gray system theory LED chip heat vibration accelerated aging prediction technique
CN104199777B (en) A kind of central processing unit system verification method and device
TWI259360B (en) Computer platform testing method and system thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant