CN111367737A - Method and device for optimizing memory performance test - Google Patents

Method and device for optimizing memory performance test Download PDF

Info

Publication number
CN111367737A
CN111367737A CN202010132748.2A CN202010132748A CN111367737A CN 111367737 A CN111367737 A CN 111367737A CN 202010132748 A CN202010132748 A CN 202010132748A CN 111367737 A CN111367737 A CN 111367737A
Authority
CN
China
Prior art keywords
test
cpu
memory
script
result
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.)
Withdrawn
Application number
CN202010132748.2A
Other languages
Chinese (zh)
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 CN202010132748.2A priority Critical patent/CN111367737A/en
Publication of CN111367737A publication Critical patent/CN111367737A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2236Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2289Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention provides a method and a device for optimizing memory performance test, wherein the method comprises the following steps: calculating a theoretical value of the memory bandwidth; executing the memory test script to identify the type of the CPU, selecting a test tool and carrying out memory performance test for a set number of times; summarizing the test result and outputting the average value of the performance tests of the set times; and comparing the average value with a set proportion value of the theoretical value, and automatically judging whether the performance requirement of the memory bandwidth is met. By writing simple scripts, the CPU core number and the number of the CPU cores can be automatically changed to carry out memory performance tests for set times, the average value of the tests for multiple times is automatically calculated and compared with the theoretical value of the memory bandwidth, the method is simple and efficient, and stable memory performance data results are obtained.

Description

Method and device for optimizing memory performance test
Technical Field
The invention relates to the technical field of memory testing, in particular to a method and a device for optimizing memory performance testing.
Background
The memory is a key component of the server system, and is used for temporarily storing operation data in the CPU and data exchanged with an external storage such as a hard disk. All programs in the computer are run in the memory, so the performance of the memory has a great influence on the computer, and the quality and capacity of the memory affect the running speed of the computer. When the computer is in operation, the CPU transfers data to be operated to the memory for operation, and after the operation is completed, the CPU transmits the result, and the memory determines the stable operation of the computer.
Because the performance of the memory has a great influence on the overall performance of the server, the memory performance test is an important test which must be tested in the memory test process. After the performance data of each type of memory is mastered, a powerful reference basis can be provided for server configuration. When the memory performance is tested, the CPU core number needs to be changed and continuously adjusted and optimized under the BIOS disable HT, then the memory performance is tested for many times, and each time of data is recorded and averaged to obtain stable performance data. Due to different configurations, the core number of the CPU needs to be changed under the condition of manually removing the CPU or the BIOS during performance testing.
When the memory performance test is carried out, according to different configurations, a CPU is manually dismantled or a server is restarted and a prompt key (DEL, ESC, F2 and the like) is pressed in the starting process to enter a BIOS interface, the number or the number of cores of the CPU is changed under the CPU Socket Configuration under the BIOS, the tuning test is continuously carried out, after the tuning is finished, the memory performance is tested for many times, and each time of data is recorded and averaged to obtain stable performance data. During testing, the CPU needs to be manually removed or the server needs to be restarted to enter a BIOS interface by pressing a prompt key (DEL, ESC, F2 and the like) in the starting process, and the number or the number of cores of the CPU is changed under the CPU Socket Configuration under the BIOS, so that a great deal of time is wasted in the process, the rapid test is not facilitated, the automation level is low, the production efficiency is low, and the error rate is high.
Disclosure of Invention
The invention provides a method and a device for optimizing memory performance test, aiming at the problems that in the existing test process of a memory, a CPU needs to be manually dismantled or a server needs to be restarted to enter a BIOS interface in the starting process, the core number or the number of the CPU is changed under the CPU Socket Configuration under the BIOS, a large amount of time is wasted in the process, the test is not facilitated to be rapidly carried out, the automation level is low, the production efficiency is low, and the error rate is extremely high.
The technical scheme of the invention is as follows:
in one aspect, the present invention provides a method for optimizing memory performance test, comprising the following steps:
calculating a theoretical value of the memory bandwidth;
executing the memory test script to identify the type of the CPU, selecting a test tool and carrying out memory performance test for a set number of times;
summarizing the test result and outputting the average value of the performance tests of the set times;
and comparing the average value with a set proportion value of the theoretical value, and automatically judging whether the performance requirement of the memory bandwidth is met.
Further, the method further comprises:
compiling a CPU setting script, wherein the step of compiling the CPU setting script comprises the following steps:
configuring the number of CPUs under a script grabbing system;
the configuration script sets the CPU0 online all the time;
configuring a script to set an online CPU;
configuring a script to set an offline CPU;
the configuration script outputs the CPU core number on/off result and gives color display.
After the CPU setting script is configured, the current CPU core number is prompted, then the CPU setting script is executed on the premise of HT (hyper thread) disable by referring to the technical parameters provided by the CPU DCL file, and the on/off result of the CPU core is output.
Further, the step of executing the memory test script to identify the CPU model and selecting the test tool to perform the memory performance test for the set number of times includes:
giving the testing tool executable authority;
and identifying the CPU model, selecting a test tool and collecting performance data for set times.
Further, the step of outputting the average value of the performance tests of the set number of times by the summary test result includes:
intercepting Triad values in the data;
the Triad values in the truncated data are summed and the mean is calculated.
Further, the step of comparing the average value with the set ratio of the theoretical value and automatically judging whether the memory bandwidth performance requirement is met includes:
and comparing the average value with the set proportion of the theoretical value, judging that the memory bandwidth requirement is met and outputting a PASS result when the test result reaches the set proportion of the theoretical value, or else, outputting a FAIL result when the memory bandwidth requirement is not met.
According to the configuration of the server, the method for carrying out the memory performance optimization test by automatically changing the number and the number of the CPU cores in the linux environment automatically carries out the memory performance test for changing the number and the number of the CPU cores for the set times by compiling a simple script, automatically calculates the average value of the test, and quickly finishes the memory performance test to obtain the test data.
On the other hand, the invention provides a device for optimizing memory performance test, which comprises a calculation module, a test execution module, a result summarizing module and a comparison and judgment module;
the calculation module is used for calculating a theoretical value of the memory bandwidth;
the test execution module is used for executing the memory test script to identify the type of the CPU and selecting a test tool to perform the memory performance test for the set times;
the result summarizing module is used for summarizing the test result and outputting the average value of the performance test of the set times;
and the comparison and judgment module is used for comparing the average value with a set proportion value of the theoretical value and automatically judging whether the performance requirement of the memory bandwidth is met.
Further, the device further comprises a configuration script module, wherein the configuration script module is used for compiling the CPU setting script, and specifically comprises:
the configuration script is used for capturing the number of CPUs in the system;
the configuration script is used to set the CPU0 to be always on-line;
the configuration script is used for setting an online CPU;
the configuration script is used for setting an offline CPU;
the configuration script is used for outputting the CPU core number on/off result and giving color display.
Furthermore, the test execution module comprises an authority setting unit and a test and data collection unit;
the permission setting unit is used for endowing the testing tool with executable permission;
and the test and data collection unit is used for identifying the CPU model, selecting a test tool and collecting performance data for set times.
Furthermore, the result summarizing module comprises a data intercepting unit and a calculating unit;
the data interception unit is used for intercepting the Triad value in the data;
and the computing unit is used for summing the Triad values in the intercepted data and computing an average value.
Further, the comparison and judgment module is configured to compare the average value with a theoretical value set ratio, judge that the requirement for memory bandwidth is met and output a PASS result when the test result reaches the set ratio of the theoretical value, and otherwise, output a FAIL result when the requirement for memory bandwidth is not met.
According to the technical scheme, the invention has the following advantages: by writing simple scripts, the CPU core number and the number of the CPU cores can be automatically changed to carry out memory performance tests for set times, the average value of the tests for multiple times is automatically calculated and compared with the theoretical value of the memory bandwidth, the method is simple and efficient, and stable memory performance data results are obtained.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for optimizing a memory performance test according to an embodiment of the present invention.
Fig. 2 is a schematic flowchart of a method for optimizing a memory performance test according to a second embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
As shown in fig. 1, the present invention provides a method for optimizing memory performance test, comprising the following steps:
s11: calculating a theoretical value of the memory bandwidth;
s12: executing the memory test script to identify the type of the CPU, selecting a test tool and carrying out memory performance test for a set number of times;
s13: summarizing the test result and outputting the average value of the performance tests of the set times;
s14: and comparing the average value with a set proportion value of the theoretical value, and automatically judging whether the performance requirement of the memory bandwidth is met.
Example two
As shown in fig. 2, the present invention provides a method for optimizing memory performance tests, which is a method for automatically changing cpu core number and number to perform memory performance tests in a linux environment, and automatically changes cpu core number and number to perform memory performance tests 30 times by writing a simple script, and automatically calculates an average value of the tests 30 times, and then determines whether the requirements are met according to a theoretical value, the method includes the following steps:
s21: sh of a CPU setting script is compiled, and the step of compiling the CPU setting script comprises the following steps:
configuring the number of CPUs under a script grabbing system;
Figure BDA0002396251910000071
Figure BDA0002396251910000081
the configuration script sets the CPU0 online all the time;
Figure BDA0002396251910000082
configuring a script to set an online CPU;
Figure BDA0002396251910000083
Figure BDA0002396251910000091
configuring a script to set an offline CPU;
Figure BDA0002396251910000092
the configuration script outputs the CPU core number on/off result and gives color display.
Figure BDA0002396251910000093
Figure BDA0002396251910000101
The CPU core.sh is written to indicate the number of the CPU cores at present, and then the CPU core.sh n (n is the number of the CPU cores to be turned on) is executed on the premise of HT (hyper thread) disable with reference to the technical parameters provided by the CPU DCL file, and the on/off result of the CPU cores is output.
S22, calculating a theoretical value m of the memory bandwidth, wherein the theoretical value m of the memory bandwidth is equal to the total number * 64/8 of the memory operation frequency * channels;
s23: executing the memory test script to identify the type of the CPU, selecting a test tool and carrying out memory performance test for a set number of times;
# granting executable Authority to intel test tool
Chmod+x$DIR/tool/mlc
chmod+x$DIR/tool/mlc_avx512
Identifying CPU model, selecting intel testing tool, performing performance data collection 30 times, generally performing 30 times of tests, and if the number of times needs to be changed, changing the following statement 30
test_times=30
for((i=0;i<$test_times;i++))
do
if[[″$a″==″Platinum″||″$a″==″Gold″||″$a″==″Sliver″||″$a″==″Bronze″]];
then
$DIR/tool/mlc_avx512|tee-a$DIR/log/$date.log
else
$DIR/tool/mlc|tee-a$DIR/log/$date.log
fi
done
S24: summarizing the test result and outputting the average value of the performance tests of the set times;
# intercept Triad value in data
cat$DIR/log/$date.log|grep-i″Stream-triad″|awk′{print$3}′>$DIR/log/result.log
# summing and calculating the mean
sumi=`cat$DIR/log/result.log|awk NR==$a`
sum=`echo$sum+$sumi|bc`
done
sum_average=`echo$sum/$n|bc`
S25: and comparing the average value with a set proportion value of the theoretical value, and automatically judging whether the performance requirement of the memory bandwidth is met. In this embodiment, the set ratio of the theoretical value is 70% of the theoretical value;
# the average value was compared with the theoretical value of 70% and the test results were output. If more test criteria are needed, then statement 0.7 below may be modified. And automatically judging whether the memory bandwidth requirement is met or not according to the test standard. The following script, when the test result reaches 70%, outputs PASS result, otherwise outputs FAIL result
echo$sum_average|tee-a$DIR/log/$date.log
eff=$1
eff1=`echo$eff*0.7|bc`
re=`echo″$sum_average>$eff1″|bc`
if[[″$re″=″1″]];then
echo″the test is PASS!!!″|tee-a$DIR/log/$date.log
else
echo″the test is FAIL!!!″|tee-a$DIR/log/$date.log
fi
According to the configuration of the server, the method for carrying out the memory performance optimization test by automatically changing the number and the number of the CPU cores in the linux environment automatically carries out the memory performance test for changing the number and the number of the CPU cores for the set times by compiling a simple script, automatically calculates the average value of the test, and quickly finishes the memory performance test to obtain the test data.
EXAMPLE III
The invention provides a device for optimizing memory performance test, which comprises a configuration script module, a calculation module, a test execution module, a result summarizing module and a comparison and judgment module, wherein the configuration script module is used for executing the test;
the configuration script module is used for compiling the CPU setting script and specifically comprises: the configuration script is used for capturing the number of CPUs in the system; the configuration script is used to set the CPU0 to be always on-line; the configuration script is used for setting an online CPU; the configuration script is used for setting an offline CPU; the configuration script is used for outputting the CPU core number on/off result and giving color display.
The calculation module is used for calculating a theoretical value of the memory bandwidth;
the test execution module is used for executing the memory test script to identify the type of the CPU and selecting a test tool to perform the memory performance test for the set times; the test execution module comprises an authority setting unit and a test and data collection unit; the permission setting unit is used for endowing the testing tool with executable permission; and the test and data collection unit is used for identifying the CPU model, selecting a test tool and collecting performance data for set times.
The result summarizing module is used for summarizing the test result and outputting the average value of the performance test of the set times; the result summarizing module comprises a data intercepting unit and a calculating unit; the data interception unit is used for intercepting the Triad value in the data; and the computing unit is used for summing the Triad values in the intercepted data and computing an average value.
And the comparison and judgment module is used for comparing the average value with a set proportion value of the theoretical value and automatically judging whether the performance requirement of the memory bandwidth is met. And the comparison and judgment module is used for comparing the average value with the set proportion of the theoretical value, judging that the requirement of the memory bandwidth is met and outputting the PASS result when the test result reaches the set proportion of the theoretical value, and otherwise, outputting the FAIL result when the requirement of the memory bandwidth is not met.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for optimizing memory performance test is characterized by comprising the following steps:
calculating a theoretical value of the memory bandwidth;
executing the memory test script to identify the type of the CPU, selecting a test tool and carrying out memory performance test for a set number of times;
summarizing the test result and outputting the average value of the performance tests of the set times;
and comparing the average value with a set proportion value of the theoretical value, and automatically judging whether the performance requirement of the memory bandwidth is met.
2. The method of claim 1, further comprising:
compiling a CPU setting script, wherein the step of compiling the CPU setting script comprises the following steps:
configuring the number of CPUs under a script grabbing system;
the configuration script sets the CPU0 online all the time;
configuring a script to set an online CPU;
configuring a script to set an offline CPU;
the configuration script outputs the CPU core number on/off result and gives color display.
3. The method according to claim 2, wherein the step of executing the memory test script to identify the CPU model and selecting the test tool to perform the memory performance test for the set number of times comprises:
giving the testing tool executable authority;
and identifying the CPU model, selecting a test tool and collecting performance data for set times.
4. The method according to claim 3, wherein the step of outputting the average value of the performance tests for the set number of times by the summary test result comprises:
intercepting Triad values in the data;
the Triad values in the truncated data are summed and the mean is calculated.
5. The method according to claim 4, wherein the step of comparing the average value with the set ratio of the theoretical value and automatically determining whether the performance requirement of the memory bandwidth is met comprises:
and comparing the average value with the set proportion of the theoretical value, judging that the memory bandwidth requirement is met and outputting a PASS result when the test result reaches the set proportion of the theoretical value, or else, outputting a FAIL result when the memory bandwidth requirement is not met.
6. A device for optimizing memory performance test is characterized by comprising a calculation module, a test execution module, a result summarizing module and a comparison and judgment module;
the calculation module is used for calculating a theoretical value of the memory bandwidth;
the test execution module is used for executing the memory test script to identify the type of the CPU and selecting a test tool to perform the memory performance test for the set times;
the result summarizing module is used for summarizing the test result and outputting the average value of the performance test of the set times;
and the comparison and judgment module is used for comparing the average value with a set proportion value of the theoretical value and automatically judging whether the performance requirement of the memory bandwidth is met.
7. The apparatus according to claim 6, wherein the apparatus further comprises a configuration script module, the configuration script module is configured to write a CPU setting script, and the apparatus specifically comprises:
the configuration script is used for capturing the number of CPUs in the system;
the configuration script is used to set the CPU0 to be always on-line;
the configuration script is used for setting an online CPU;
the configuration script is used for setting an offline CPU;
the configuration script is used for outputting the CPU core number on/off result and giving color display.
8. The apparatus according to claim 7, wherein the test execution module comprises an authority setting unit and a test and data collection unit;
the permission setting unit is used for endowing the testing tool with executable permission;
and the test and data collection unit is used for identifying the CPU model, selecting a test tool and collecting performance data for set times.
9. The apparatus according to claim 8, wherein the result summarizing module comprises a data intercepting unit and a calculating unit;
the data interception unit is used for intercepting the Triad value in the data;
and the computing unit is used for summing the Triad values in the intercepted data and computing an average value.
10. The apparatus according to claim 9, wherein the comparing and determining module is configured to compare the average value with a theoretical value setting ratio, determine that the PASS result meets the memory bandwidth requirement when the test result reaches the theoretical value setting ratio, and output a FAIL result if the PASS result does not meet the memory bandwidth requirement.
CN202010132748.2A 2020-02-29 2020-02-29 Method and device for optimizing memory performance test Withdrawn CN111367737A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010132748.2A CN111367737A (en) 2020-02-29 2020-02-29 Method and device for optimizing memory performance test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010132748.2A CN111367737A (en) 2020-02-29 2020-02-29 Method and device for optimizing memory performance test

Publications (1)

Publication Number Publication Date
CN111367737A true CN111367737A (en) 2020-07-03

Family

ID=71206522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010132748.2A Withdrawn CN111367737A (en) 2020-02-29 2020-02-29 Method and device for optimizing memory performance test

Country Status (1)

Country Link
CN (1) CN111367737A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076237A (en) * 2021-03-05 2021-07-06 山东英信计算机技术有限公司 Memory performance test method, system and medium
CN116560962A (en) * 2023-05-15 2023-08-08 海光信息技术股份有限公司 Kernel performance verification method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076237A (en) * 2021-03-05 2021-07-06 山东英信计算机技术有限公司 Memory performance test method, system and medium
CN116560962A (en) * 2023-05-15 2023-08-08 海光信息技术股份有限公司 Kernel performance verification method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN101093462B (en) Automatization method for testing schooling pressure on database application
CN111258830B (en) Server power consumption comparison test system and method
CN110750396B (en) Server operating system compatibility testing method and device and storage medium
CN103838663A (en) Application testing method and device
CN111367737A (en) Method and device for optimizing memory performance test
CN103294579A (en) Method for testing high-performance computing cluster application performance
CN104572422A (en) Memory monitoring achievement method based on startup and shutdown of Linux system
US11106509B2 (en) Cluster tuner
CN104636242A (en) Method for automatically deleting repeated content in system logs on basis of Linux operating system
Liu Research of performance test technology for big data applications
CN107273378B (en) File storage method and device
CN105260286A (en) Method for monitoring CPU working state in real time
CN107133137B (en) Method for conveniently acquiring RMT test information
CN110377519B (en) Performance capacity test method, device and equipment of big data system and storage medium
CN110941520A (en) Hardware function test system and method based on two-out-of-two safety control unit
CN107832176A (en) Hard disk pressure automatic test approach and system under a kind of Windows
CN112269697B (en) Equipment storage performance testing method, system and related device
Qian et al. Load balancing on generalized hypercube and mesh multiprocessors with LAL
WO2024066635A1 (en) Method and system for intelligently optimizing database performance
CN106371956A (en) Method for automatically testing memory performance
CN115480970A (en) Performance test method, device, equipment and storage medium
CN113849484A (en) Big data component upgrading method and device, electronic equipment and storage medium
CN106095631B (en) Multi-cycle non-pipeline CPU dynamic debugging method based on finite state machine
CN115757099A (en) Automatic test method and device for platform firmware protection recovery function
CN211603369U (en) Server DC power-down fault positioning system

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200703