CN113468009B - Pressure testing method and device, electronic equipment and storage medium - Google Patents

Pressure testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113468009B
CN113468009B CN202110823214.9A CN202110823214A CN113468009B CN 113468009 B CN113468009 B CN 113468009B CN 202110823214 A CN202110823214 A CN 202110823214A CN 113468009 B CN113468009 B CN 113468009B
Authority
CN
China
Prior art keywords
test
memory
pressure
item
pressure test
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
CN202110823214.9A
Other languages
Chinese (zh)
Other versions
CN113468009A (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.)
Nettrix Information Industry Beijing Co Ltd
Original Assignee
Nettrix Information Industry Beijing 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 Nettrix Information Industry Beijing Co Ltd filed Critical Nettrix Information Industry Beijing Co Ltd
Priority to CN202110823214.9A priority Critical patent/CN113468009B/en
Publication of CN113468009A publication Critical patent/CN113468009A/en
Application granted granted Critical
Publication of CN113468009B publication Critical patent/CN113468009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/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
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/56External testing equipment for static stores, e.g. automatic test equipment [ATE]; Interfaces therefor

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)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application relates to a pressure testing method, a pressure testing device, electronic equipment and a storage medium, and belongs to the technical field of computers. The pressure test method comprises the following steps: acquiring a configuration item during pressure test, wherein the configuration item comprises a pressure test item; and performing pressure test on the test object corresponding to the pressure test item by using the test tool corresponding to the pressure test item to obtain a test result, wherein the test tool is a test tool based on an operating system bottom layer interface. According to the pressure test method provided by the embodiment of the application, when the pressure test is carried out, the test tool based on the bottom layer interface of the operating system is adopted to carry out the pressure test on the test object, and the test tool directly calls related kernel commands, so that the multilayer packaging can be bypassed, the limitation of tools of different manufacturers is broken, and the additional expense is reduced; meanwhile, larger pressure can be generated, the time required by testing is shortened, and the testing efficiency is improved.

Description

Pressure testing method and device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of computers, and particularly relates to a pressure testing method, a pressure testing device, electronic equipment and a storage medium.
Background
Servers are very important in networks and thus the overall demands on the servers are also increasing, while server component stress testing plays a critical role in verifying the stability and reliability of the machine. The term "component stress test" refers to stress testing of components of a server such as a memory (memory), a hard disk, etc.
The existing automatic pressure testing tools for memories and hard disks are mostly developed on an application layer, and interact with a kernel (kernel) through packaging multi-layer application program interfaces (Application Programming Interface, API), so that the testing purpose is achieved. When the API interface is multi-layer packaged, there are many complex protocol stacks and unnecessary resource overhead, so that the generated pressure is slow and small, so that the testing cost is high and the efficiency is low.
Disclosure of Invention
In view of the above, the present application is directed to a pressure testing method, a pressure testing device, an electronic device and a storage medium, so as to solve the problems of high testing cost and low efficiency of the existing testing method.
Embodiments of the present application are implemented as follows:
In a first aspect, an embodiment of the present application provides a pressure testing method, including: acquiring a configuration item during pressure test, wherein the configuration item comprises a pressure test item; and performing pressure test on the test object corresponding to the pressure test item by using the test tool corresponding to the pressure test item to obtain a test result, wherein the test tool is a test tool based on an operating system bottom layer interface. In the embodiment of the application, when the pressure test is carried out, a test tool based on an operating system bottom layer interface is adopted to carry out the pressure test on the test object, and the test tool directly calls related kernel commands, so that the multi-layer package can be bypassed, the limitation of tools of different manufacturers is broken, and the additional expense is reduced; meanwhile, larger pressure can be generated, the time required by testing is shortened, and the testing efficiency is improved.
With reference to a possible implementation manner of the embodiment of the first aspect, the test object corresponding to the pressure test item is a complete machine, and the configuration item further includes a memory usage rate; using the testing tool corresponding to the pressure testing item to perform pressure testing on the testing object corresponding to the pressure testing item, including: performing pressure test on the memory according to the pressure corresponding to the memory utilization rate by using a memory testing tool, so that the memory utilization rate reaches the memory utilization rate during test; and calling a bottom interface function to send a read-write command to the hard disk, and using an IO test tool to carry out read-write pressure test on the hard disk. In the embodiment of the application, the memory is subjected to pressure test by using the memory test tool at the same time, and the hard disk is subjected to read-write pressure test by using the IO test tool, so that the method can realize the test of the whole machine and cover various test modes.
With reference to a possible implementation manner of the embodiment of the first aspect, the test object corresponding to the pressure test item is a memory, and the configuration item further includes a memory usage rate; using the testing tool corresponding to the pressure testing item to perform pressure testing on the testing object corresponding to the pressure testing item, including: and performing pressure test on the memory according to the pressure corresponding to the memory utilization rate by using a memory testing tool, so that the memory utilization rate reaches the memory utilization rate during test. In the embodiment of the application, when the pressure test is carried out on the memory, the memory utilization rate in the process of the pressure test is required to be set, and when the pressure test is carried out on the memory by using the memory test tool according to the pressure corresponding to the memory utilization rate, the memory utilization rate in the test can reach the memory utilization rate, so that the memory can be subjected to targeted test according to different test requirements.
With reference to a possible implementation manner of the embodiment of the first aspect, the test object corresponding to the pressure test item is a hard disk; using the testing tool corresponding to the pressure testing item to perform pressure testing on the testing object corresponding to the pressure testing item, including: and calling a bottom interface function to send a read-write command to the hard disk, and using an IO test tool to carry out read-write pressure test on the hard disk. In the embodiment of the application, the limit of tools of different manufacturers can be broken through by directly calling the bottom interface function to send the read-write command to the hard disk, the additional expenditure is reduced, and the test flow is accelerated.
With reference to a possible implementation manner of the embodiment of the first aspect, the test object corresponding to the pressure test item is a memory or a complete machine; the method further comprises the steps of: and monitoring related information of each core in the memory during the pressure test by using a memory monitoring tool, wherein the related information comprises: at least one of memory bandwidth usage, cache miss, last level cache usage, instructions executed in each clock cycle. In the embodiment of the application, in the test process, the memory monitoring tool is also used for monitoring the related information of each core in the memory during the pressure test so as to acquire the test process based on the related information and analyze the test efficiency.
With reference to a possible implementation manner of the embodiment of the first aspect, before performing a pressure test on a test object corresponding to the pressure test item by using a test tool corresponding to the pressure test item, the method further includes: and automatically clearing the current system log, acquiring the hardware information of the tested machine, and storing the hardware information log. In the embodiment of the application, the current system log is automatically cleared before the pressure test, so that confusion of new and old logs is avoided, and Error generated after the pressure test is finished is ensured; meanwhile, the condition of the tested machine can be intuitively known by acquiring the hardware information of the tested machine.
With reference to a possible implementation manner of the embodiment of the first aspect, performing, with a testing tool corresponding to the pressure test item, a pressure test on a test object corresponding to the pressure test item includes: judging whether a test object corresponding to the pressure test item is a first test or not; if the test object corresponding to the pressure test item is not the first test, using the installed test tool corresponding to the pressure test item to perform pressure test on the test object corresponding to the pressure test item; and if the test object corresponding to the pressure test item is the first test, automatically installing a test tool corresponding to the pressure test item, and performing pressure test on the test object corresponding to the pressure test item by using the installed test tool corresponding to the pressure test item.
In a second aspect, an embodiment of the present application further provides a pressure testing apparatus, including: the device comprises an acquisition module and a test module; the acquisition module is used for acquiring configuration items during pressure test, wherein the configuration items comprise pressure test items; and the test module is used for performing pressure test on the test object corresponding to the pressure test item by using the test tool corresponding to the pressure test item to obtain a test result, wherein the test tool is a test tool based on an operating system bottom layer interface.
In a third aspect, an embodiment of the present application further provides an electronic device, including: the device comprises a memory and a processor, wherein the processor is connected with the memory; the memory is used for storing programs; the processor is configured to invoke the program stored in the memory, so as to perform the foregoing embodiment of the first aspect and/or the method provided in connection with any possible implementation manner of the embodiment of the first aspect.
In a fourth aspect, embodiments of the present application further provide a storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the embodiments of the first aspect and/or any of the possible implementations provided in connection with the embodiments of the first aspect.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the embodiments of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. The above and other objects, features and advantages of the present application will become more apparent from the accompanying drawings. Like reference numerals refer to like parts throughout the several views of the drawings. The drawings are not intended to be drawn to scale, with emphasis instead being placed upon illustrating the principles of the application.
Fig. 1 shows a flow chart of a pressure testing method according to an embodiment of the present application.
Fig. 2 shows a schematic diagram of a parameter configuration interface according to an embodiment of the present application.
Fig. 3 is a schematic diagram of a monitoring interface according to an embodiment of the present application.
Fig. 4 shows a schematic diagram of yet another monitoring interface provided by an embodiment of the present application.
Fig. 5 shows a functional block diagram of a pressure test method according to an embodiment of the present application.
Fig. 6 shows a schematic block diagram of a pressure testing device according to an embodiment of the present application.
Fig. 7 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, relational terms such as "first," "second," and the like may be used solely to distinguish one entity or action from another entity or action in the description of the application without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Furthermore, the term "and/or" in the present application is merely an association relationship describing the association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone.
In view of the pressure testing tools used in the existing pressure testing methods, most of the pressure testing tools are developed on an application layer, and interaction is achieved through packaging multi-layer API interfaces and kernels, so that the generated pressure is low and small, the testing cost is high, and the efficiency is low. Based on the method, the application provides a testing tool for interacting with the kernel based on the bottom layer interface, which directly calls related kernel commands, bypasses multi-layer packaging, breaks the limitation of tools of different manufacturers and reduces the additional expense.
The testing tool based on the bottom layer interface provided by the embodiment of the application comprises different modules, provides a multi-parameter execution mode and can realize memory pressure test, hard disk pressure test and complete machine pressure test of memory and hard disk and CPU. Corresponding parameters can be selected according to different test requirements to perform corresponding test items. For easy understanding, the pressure test method provided by the embodiment of the present application will be described with reference to fig. 1.
S1: and acquiring configuration items during the pressure test, wherein the configuration items comprise pressure test items.
After the test script is run, configuration items configured by a user during the pressure test are obtained, wherein the configuration items comprise pressure test items. The test object corresponding to the pressure test item may be a Memory (Memory), a hard Disk (Disk) or a complete machine (All), and the test object defaults to be the complete machine. The Memory may be a Local Memory (Local Memory) or a Remote Memory (Remote Memory), and the Memory pressure test defaults to testing the Local Memory.
Optionally, if the test object is a memory or a complete machine, the configuration item further includes a memory usage rate (percentage). When a Memory pressure branch is selected, i.e. the test object is a Memory, the default value of the Memory usage is 90% of the free Memory capacity, and when an All pressure test branch is selected, i.e. the test object is a complete machine, the default value of the Memory usage is 70% of the free Memory capacity. The default memory usage rate can be modified as required, and can be increased or decreased, for example, the default value (70%) of the memory usage rate of the test object as the whole machine is modified to 95%.
Before starting to run the test script, the configuration items during the stress test are set according to the help information of the test script, and then the test script is executed. The parameter interface in configuration is shown in fig. 2, and the parameters are explained as follows:
help is help information;
run is a pressure test item selected for execution, and includes a Memory pressure test branch (divided into Local Memory or Remote Memory), an IO pressure test branch (i.e. hard disk pressure test), and an All pressure test branch (i.e. whole machine pressure test). The default parameter is the whole machine pressure test branch, in which the Memory pressure test defaults to testing the Local Memory.
Mode is mainly used for Memory pressure test branches, and Local Memory and/or Remote Memory can be selected.
The percentage is used for setting the memory utilization rate of the pressure test, can be modified according to the requirement, and defaults to a default value defined by a program if the memory utilization rate is not modified.
By configuring configuration items during the pressure test, the pressure test can be performed on different test objects, and coverage of multiple test modes is realized.
S2: and performing pressure test on the object corresponding to the pressure test item by using the test tool corresponding to the pressure test item to obtain a test result.
After the pressure test item in the configuration item in the pressure test is obtained, the test tool corresponding to the pressure test item is used for carrying out the pressure test on the object corresponding to the pressure test item, so that a test result is obtained. The test tool used in the embodiment of the application is a test tool based on an interface of an operating system bottom layer, and can directly call related kernel commands during testing, bypass multi-layer packaging, break the limitation of tools of different manufacturers and reduce the additional cost.
Optionally, the process of performing the pressure test on the test object corresponding to the pressure test item by using the test tool corresponding to the pressure test item may be: judging whether a test object corresponding to the pressure test item is a first test or not; if the test object corresponding to the pressure test item is not the first test, using the test tool corresponding to the installed pressure test item to perform the pressure test on the test object corresponding to the pressure test item; and if the test object corresponding to the pressure test item is the first test, automatically installing a test tool corresponding to the pressure test item, and using the installed test tool corresponding to the pressure test item to perform pressure test on the test object corresponding to the pressure test item. That is, after the configuration item when the pressure test is obtained, judging whether the test object corresponding to the pressure test item is the first test, if so, installing tools required by the test, such as a test tool corresponding to the pressure test item, and tools required by a pyPdf library, a reportlab library and the like for generating a test report; if the test object corresponding to the pressure test item is tested for the first time (not for the first time), the tool required by the test is not required to be installed again, and the tool required by the test can be installed in the first time of the test, so that the test object corresponding to the pressure test item is directly tested by using the test tool corresponding to the pressure test item which is installed before.
The test objects are different, for example, the test objects are memories, the test objects comprise memory test tools, the test objects are hard disks, the test objects comprise IO test tools, the test objects are complete machines, and the test tools comprise memory test tools and IO test tools.
In one embodiment, the test object corresponding to the pressure test item is a Memory (which may be classified as a Local Memory or a Remote Memory), and the configuration item further includes a Memory usage rate. The process of performing the pressure test on the test object corresponding to the pressure test item by using the test tool corresponding to the pressure test item may be: and performing pressure test on the memory according to the pressure corresponding to the memory utilization rate by using the memory testing tool, so that the memory utilization rate reaches the memory utilization rate during the test. For example, if the configured memory usage is 90%, the memory usage needs to be 90% when the memory is tested by using the memory test tool.
The Local/Remote memory may be pressure tested using a different instruction set provided by membw tools (one of the memory test tools), and after the test tool begins execution, a 12 hour pressure test may be performed. The pressure generated by the different instruction sets provided by the membw tool is different, and the membw tool comprises the instruction sets of :prefetcht0、prefetcht1、prefetcht2、prefetchtnta、prefetchw、x86 loads、SSE loads、SSE NT loads、x86 load XOR write、x86 stores、AVX512 stores、x86 stores+clwb、SSE stores、x86 NT stores、AVX512 NT stores、x86 NT stores+clwb、SSE NT stores.
In one embodiment, the test object corresponding to the pressure test item is a hard disk; the process of performing the pressure test on the test object corresponding to the pressure test item by using the test tool corresponding to the pressure test item may be: and calling a bottom interface function to send a read-write command to the hard disk, and using an IO test tool to perform read-write pressure test on the hard disk. For example, the device control interface function io_ctl in the underlying device driver is called, SCSI (Small Computer SYSTEM INTERFACE ) read/write command is sent to the hard disk, and the sg_ utils tool (which is an IO test tool based on the underlying interface) is used to perform pressure test on the hard disk device. The method comprises the steps of using a sg_read (block size is 4k or 1M) command in a sg_ utils tool to conduct hard disk read operation and using a sg_dd (block size is 4k or 1M) command to conduct hard disk write operation. After the test tool begins execution, a 12 hour pressure test is performed.
In one embodiment, the test object corresponding to the pressure test item is a complete machine, and the configuration item further comprises a memory utilization rate; the process of using the testing tool corresponding to the pressure test item to conduct pressure test on the test object corresponding to the pressure test item is as follows: and performing pressure test on the memory according to the pressure corresponding to the memory utilization rate by using the memory testing tool, so that the memory utilization rate reaches the memory utilization rate during test, calling a bottom interface function to send a read-write command to the hard disk, and performing read-write pressure test on the hard disk by using the IO testing tool. For example, the configured memory usage is 95%, and then the memory usage needs to be 95% when the memory is tested by using the memory test tool. The Local/Remote memory may be pressure tested using a different instruction set provided by membw tools (one of the memory test tools). When the hard disk test is performed, a device control interface function IO_Ctl in the bottom device driver can be called, a SCSI read-write command is sent to the hard disk, and the sg_ utils tool is used for performing the pressure test on the hard disk device.
The pressure test of the whole machine is carried out, and the Memory pressure test and the IO pressure test are simultaneously carried out, in this case, the pressure of each core of the CPU can reach 100%, the utilization rate of the Memory can reach 95%, and the read-write pressure of the hard disk can reach the maximum, so that the purpose of the pressure test of the whole machine is realized. After the test tool begins execution, a 12 hour pressure test may be performed. Because the test tool used in the embodiment of the application is a test tool based on an interface of an operating system bottom layer, related kernel commands can be directly called for pressure test, so that extra resource expenditure can be reduced, and larger pressure can be generated during test, compared with the prior test tool adopting an API interface calling multi-layer packaging, the time (usually 48 hours) can be greatly shortened, and the test time can be greatly shortened to 12 hours.
The pressure test is a destructive test, i.e. the operation of the test system under abnormal, overload conditions. The assessment of how the system will operate beyond maximum load is a test of the ability of the system to withstand a certain load strength under normal conditions.
In an optional embodiment, when the test object corresponding to the pressure test item is a memory or a complete machine, the pressure test method further includes: a memory monitoring tool is used to monitor information about each CORE (CORE) in the memory during the stress test. The related information includes: at least one of memory bandwidth usage (MBR (Memory Bandwidth Remote) or MBL (Memory Bandwidth Local)), cache Miss (MISSES), last level cache (LAST LEVEL CACHE, LLC) usage, instructions executed per clock cycle (Instruction Per Clock, IPC) conditions. The last level of cache is also called a third level of cache, and is abbreviated as L3.
For example, pqos (a memory monitoring tool) may be used to monitor information about each core in the memory during the pressure test, and the monitoring interface is shown schematically in fig. 3. Meanwhile, the cache miss condition (sum of cache miss conditions of each core) of the memory is counted in real time, the use condition (sum of LLC use conditions of each core) of the L3 cache used by the memory is counted, and a monitoring interface is shown as 4. The CORE in fig. 3 is a CORE of the memory, MISSES is a cache miss, LLC is a last level cache or a third level cache use case, MBL is a bandwidth use case of the local memory (Memory Bandwidth Local), and MBR is a remote memory bandwidth use case (Memory Bandwidth Remote). MISSES in fig. 4 is a statistical memory cache miss, and Usage is a Usage of the memory using the L3 cache (which is a sum of LLC Usage of each core).
Optionally, before the test tool corresponding to the pressure test item is used for performing pressure test on the test object corresponding to the pressure test item, the pressure test method further comprises: and automatically clearing the current system log, acquiring the hardware information of the tested machine, and storing the hardware information log. Before the pressure test is started, old system logs are automatically cleared, confusion of new and old logs is avoided, and Error generated after the pressure test is finished is ensured. Meanwhile, the number and capacity of in-place memories of the server (the tested machine), the number and capacity of in-place hard disks and other important hardware information are automatically detected, and a hardware information log is stored, so that after the pressure test is finished for 12 hours, the hardware information of the tested machine, the pressure test result and the latest generated system log are summarized to generate a final test report, such as a PDF report.
In an alternative embodiment, the testing procedure using the pressure testing method of the present application may be:
(1) Preparing a test environment, installing a test script on a tested machine, configuring configuration items in the pressure test according to help information of the test script, and executing the script.
(2) After the script runs, configuration items in the pressure test process can be automatically acquired.
(3) Judging whether the test corresponding to the pressure test item is the first test or not, and if so, automatically installing the installation package needed in the test process.
(4) Old system logs can be automatically cleared, confusion between new and old logs is avoided, and the Error generated after the pressure test is completed is ensured to be generated.
(5) The automatic Machine Information check is performed, and the main purpose is to check the number and capacity of the in-place memory of the server, the number and capacity of the in-place hard disk, and the rest important hardware information. And a hardware information log is saved.
(6) And performing pressure test on the object corresponding to the pressure test item for 12 hours by using a test tool corresponding to the pressure test item to obtain a test result.
(7) And after the 12-hour pressure test is finished, automatically closing the pressure process, and then summarizing the machine hardware information, the pressure test result and the system log to generate a final test report.
The functional block diagram of the pressure test method provided by the embodiment of the application is shown in fig. 5. According to the flow direction of the machine pressure (MACHINE STRESS) in the schematic diagram, the pressure test method can realize the Memory pressure test (Memory), the hard Disk pressure test (Disk) and the whole machine pressure test (All) of the Memory, the hard Disk and the CPU. The Memory may be further classified as a Local Memory or a Remote Memory. During the memory pressure test, a membw tool can be used for performing the memory pressure test, and a pqos tool can be used for performing real-time monitoring, including monitoring the use condition of the memory using the L3 cache. And when the hard disk pressure test is performed, a device control interface function IO_Ctl in the bottom device driver is called, a read-write command is sent to the hard disk, and the sg_ utils tool is used for performing the pressure test on the hard disk device. During the whole machine test, the default memory pressure test and the hard disk pressure test are performed simultaneously. The memory pressure test and the whole machine pressure test both require that the memory utilization rate reaches the configured memory utilization rate.
Based on the same inventive concept, an embodiment of the present application also provides a pressure testing apparatus 100, as shown in fig. 6. The pressure testing apparatus 100 includes: an acquisition module 110 and a test module 120.
The obtaining module 110 is configured to obtain a configuration item during the pressure test, where the configuration item includes a pressure test item.
And the testing module 120 is configured to perform a pressure test on the test object corresponding to the pressure test item by using a testing tool corresponding to the pressure test item to obtain a test result, where the testing tool is a testing tool based on an operating system bottom layer interface.
Optionally, the test object corresponding to the pressure test item is a complete machine, and the configuration item further includes a memory usage rate, and the test module 120 is specifically configured to perform a pressure test on the memory according to a pressure corresponding to the memory usage rate by using a memory test tool, so that the memory usage rate reaches the memory usage rate during the test; and calling a bottom interface function to send a read-write command to the hard disk, and using an IO test tool to carry out read-write pressure test on the hard disk.
Optionally, the test object corresponding to the pressure test item is a memory, and the configuration item further includes a memory usage rate, and the test module 120 is specifically configured to perform a pressure test on the memory according to a pressure corresponding to the memory usage rate by using a memory test tool, so that the memory usage rate reaches the memory usage rate during the test.
Optionally, the test object corresponding to the pressure test item is a hard disk; the testing module 120 is specifically configured to call a bottom interface function to send a read-write command to a hard disk, and perform a read-write pressure test on the hard disk by using an IO testing tool.
Optionally, the test object corresponding to the pressure test item is a memory or a complete machine; the test module 120 is further configured to monitor, using a memory monitoring tool, related information of each core in the memory during the pressure test, where the related information includes: at least one of memory bandwidth usage, cache miss, last level cache usage, instructions executed in each clock cycle.
Optionally, the test module 120 is further configured to automatically clear a current system log before performing a pressure test on the test object corresponding to the pressure test item by using a test tool corresponding to the pressure test item, obtain hardware information of the tested machine, and store the hardware information log.
Optionally, the test module 120 is specifically configured to determine whether the test object corresponding to the pressure test item is a first test; if the test object corresponding to the pressure test item is not the first test, using the installed test tool corresponding to the pressure test item to perform pressure test on the test object corresponding to the pressure test item; and if the test object corresponding to the pressure test item is the first test, automatically installing a test tool corresponding to the pressure test item, and performing pressure test on the test object corresponding to the pressure test item by using the installed test tool corresponding to the pressure test item.
The pressure testing device 100 according to the embodiment of the present application has the same implementation principle and technical effects as those of the foregoing method embodiment, and for brevity, reference may be made to the corresponding content of the foregoing method embodiment for the part of the device embodiment that is not mentioned.
As shown in fig. 7, fig. 7 shows a block diagram of an electronic device 200 according to an embodiment of the present application. The electronic device 200 includes: a transceiver 210, a memory 220, a communication bus 230, and a processor 240.
The transceiver 210, the memory 220, and the processor 240 are electrically connected directly or indirectly to each other to realize data transmission or interaction. For example, the components may be electrically coupled to each other via one or more communication buses 230 or signal lines. Wherein the transceiver 210 is configured to transmit and receive data. The memory 220 is used to store a computer program, such as the software functional modules shown in fig. 6, i.e. the pressure testing device 100. The pressure test device 100 includes at least one software functional module that may be stored in the memory 220 in the form of software or firmware (firmware) or cured in an Operating System (OS) of the electronic apparatus 200. The processor 240 is configured to execute executable modules stored in the memory 220, such as software functional modules or computer programs included in the pressure testing apparatus 100. For example, the processor 240 is configured to obtain configuration items during the pressure test, where the configuration items include a pressure test item; and performing pressure test on the test object corresponding to the pressure test item by using the test tool corresponding to the pressure test item to obtain a test result, wherein the test tool is a test tool based on an operating system bottom layer interface.
The Memory 220 may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
The processor 240 may be an integrated circuit chip with signal processing capabilities. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field programmable gate array (Field Programmable GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 240 may be any conventional processor or the like.
The electronic device 200 includes, but is not limited to, a computer, which may be a server, etc.
The embodiment of the present application further provides a non-volatile computer readable storage medium (hereinafter referred to as a storage medium) having a computer program stored thereon, which when executed by a computer such as the above-described electronic device 200, performs the above-described pressure test method.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a notebook computer, a server, or an electronic device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (7)

1. A method of pressure testing, comprising:
Acquiring a configuration item in a pressure test, wherein the configuration item comprises a pressure test item, wherein test objects corresponding to the pressure test item comprise a complete machine, a memory or a hard disk, test tools corresponding to different test objects are different, the test objects are memories, the test tools comprise memory test tools, the test objects are hard disks, the test tools comprise IO test tools, the test objects are complete machines, and the test tools comprise memory test tools and IO test tools;
Automatically clearing a current system log, acquiring hardware information of a tested machine, and storing the hardware information log;
performing pressure test on a test object corresponding to the pressure test item by using a test tool corresponding to the pressure test item to obtain a test result, and summarizing the hardware information log, the test result and the latest generated system log to generate a test report, wherein the test tool is a test tool based on an operating system bottom layer interface;
the test object corresponding to the pressure test item is a whole machine or a memory, the memory comprises a local memory and a remote memory, and the configuration item also comprises a memory utilization rate; using the testing tool corresponding to the pressure testing item to perform pressure testing on the testing object corresponding to the pressure testing item, including:
Performing pressure test on the local memory and the remote memory according to the pressure corresponding to the memory utilization rate by using a memory test tool, so that the utilization rates of the local memory and the remote memory reach the memory utilization rate during test;
in the test process, counting the miss condition of a memory cache, the use condition of a memory using L3 cache, the bandwidth use condition of a local memory and the bandwidth use condition of a remote memory in real time; the memory cache miss condition is the sum of the cache miss conditions of all cores in the memory, and the use condition of the memory used L3 cache is the sum of the last-stage cache use condition of all cores.
2. The method of claim 1, wherein the test object corresponding to the pressure test item is a complete machine, and the pressure test is performed on the test object corresponding to the pressure test item by using a test tool corresponding to the pressure test item, further comprising:
and calling a bottom interface function to send a read-write command to the hard disk, and using an IO test tool to carry out read-write pressure test on the hard disk.
3. The method of claim 1, wherein the test object corresponding to the pressure test item is a memory or a complete machine; the method further comprises the steps of:
And monitoring related information of each core in the memory during the pressure test by using a memory monitoring tool, wherein the related information comprises: at least one of memory bandwidth usage, cache miss, last level cache usage, instructions executed in each clock cycle.
4. The method of claim 1, wherein the performing a pressure test on the test object corresponding to the pressure test item using the test tool corresponding to the pressure test item comprises:
judging whether a test object corresponding to the pressure test item is a first test or not;
if the test object corresponding to the pressure test item is not the first test, using the installed test tool corresponding to the pressure test item to perform pressure test on the test object corresponding to the pressure test item;
And if the test object corresponding to the pressure test item is the first test, automatically installing a test tool corresponding to the pressure test item, and performing pressure test on the test object corresponding to the pressure test item by using the installed test tool corresponding to the pressure test item.
5. A pressure testing device, comprising:
The device comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring a configuration item in a pressure test, the configuration item comprises a pressure test item, wherein test objects corresponding to the pressure test item comprise a complete machine, a memory or a hard disk, test tools corresponding to different test objects are different, the test objects comprise memory test tools, the test objects comprise the hard disk, the test tools comprise IO test tools, the test objects comprise the complete machine, and the test tools comprise memory test tools and IO test tools;
The test module is used for automatically clearing the current system log, acquiring the hardware information of the tested machine and storing the hardware information log; performing pressure test on a test object corresponding to the pressure test item by using a test tool corresponding to the pressure test item to obtain a test result, and summarizing the hardware information log, the test result and the latest generated system log to generate a test report, wherein the test tool is a test tool based on an operating system bottom layer interface;
the test object corresponding to the pressure test item is a whole machine or a memory, the memory comprises a local memory and a remote memory, and the configuration item also comprises a memory utilization rate; the test module is specifically used for:
Performing pressure test on the local memory and the remote memory according to the pressure corresponding to the memory utilization rate by using a memory test tool, so that the utilization rates of the local memory and the remote memory reach the memory utilization rate during test;
in the test process, counting the miss condition of a memory cache, the use condition of a memory using L3 cache, the bandwidth use condition of a local memory and the bandwidth use condition of a remote memory in real time; the memory cache miss condition is the sum of the cache miss conditions of all cores in the memory, and the use condition of the memory used L3 cache is the sum of the last-stage cache use condition of all cores.
6. An electronic device, comprising:
the device comprises a memory and a processor, wherein the processor is connected with the memory;
The memory is used for storing programs;
the processor is configured to invoke a program stored in the memory to perform the method of any of claims 1-4.
7. A storage medium having stored thereon a computer program which, when executed by a processor, performs the method of any of claims 1-4.
CN202110823214.9A 2021-07-21 2021-07-21 Pressure testing method and device, electronic equipment and storage medium Active CN113468009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110823214.9A CN113468009B (en) 2021-07-21 2021-07-21 Pressure testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110823214.9A CN113468009B (en) 2021-07-21 2021-07-21 Pressure testing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113468009A CN113468009A (en) 2021-10-01
CN113468009B true CN113468009B (en) 2024-05-24

Family

ID=77881533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110823214.9A Active CN113468009B (en) 2021-07-21 2021-07-21 Pressure testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113468009B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114265729B (en) * 2021-11-09 2023-03-28 北京云宽志业网络技术有限公司 Pressure testing method and device, storage medium and electronic equipment
CN115061870A (en) * 2022-07-22 2022-09-16 苏州浪潮智能科技有限公司 Server heat dissipation and pressurization testing method, system and device and readable storage medium
CN116913361B (en) * 2023-06-08 2024-05-07 深圳市晶存科技有限公司 Automatic hard disk testing method, system and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NO20004194D0 (en) * 1999-08-25 2000-08-22 Schlumberger Holdings Reservoir management system and method
CN102789565A (en) * 2011-05-19 2012-11-21 鸿富锦精密工业(深圳)有限公司 System and method for access control of access driver
CN107302473A (en) * 2017-06-20 2017-10-27 郑州云海信息技术有限公司 A kind of high frequency data transfer method for testing pressure and system
CN107577545A (en) * 2016-07-05 2018-01-12 北京金山云网络技术有限公司 A kind of failed disk detection and restorative procedure and device
CN109032874A (en) * 2018-08-15 2018-12-18 郑州云海信息技术有限公司 A kind of memory pressure test method, device, terminal and storage medium
CN109032894A (en) * 2018-07-26 2018-12-18 郑州云海信息技术有限公司 A kind of direct-connected hard disk method, apparatus of sg3_utils tool, equipment and storage medium
CN111367745A (en) * 2020-03-13 2020-07-03 苏州浪潮智能科技有限公司 Memory pressure testing method and system without support of operating system and related components
CN111966549A (en) * 2020-08-19 2020-11-20 苏州浪潮智能科技有限公司 CPU pressure testing method and device of server and computer readable storage medium
CN112214384A (en) * 2020-09-18 2021-01-12 苏州浪潮智能科技有限公司 Hard disk serial number management method, system, terminal and storage medium
CN112597051A (en) * 2020-12-30 2021-04-02 北京华胜天成科技股份有限公司 Method and device for obtaining test result, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10360051B2 (en) * 2014-12-22 2019-07-23 International Business Machines Corporation Emulated device firmware testable by native operating system tools

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NO20004194D0 (en) * 1999-08-25 2000-08-22 Schlumberger Holdings Reservoir management system and method
CN102789565A (en) * 2011-05-19 2012-11-21 鸿富锦精密工业(深圳)有限公司 System and method for access control of access driver
CN107577545A (en) * 2016-07-05 2018-01-12 北京金山云网络技术有限公司 A kind of failed disk detection and restorative procedure and device
CN107302473A (en) * 2017-06-20 2017-10-27 郑州云海信息技术有限公司 A kind of high frequency data transfer method for testing pressure and system
CN109032894A (en) * 2018-07-26 2018-12-18 郑州云海信息技术有限公司 A kind of direct-connected hard disk method, apparatus of sg3_utils tool, equipment and storage medium
CN109032874A (en) * 2018-08-15 2018-12-18 郑州云海信息技术有限公司 A kind of memory pressure test method, device, terminal and storage medium
CN111367745A (en) * 2020-03-13 2020-07-03 苏州浪潮智能科技有限公司 Memory pressure testing method and system without support of operating system and related components
CN111966549A (en) * 2020-08-19 2020-11-20 苏州浪潮智能科技有限公司 CPU pressure testing method and device of server and computer readable storage medium
CN112214384A (en) * 2020-09-18 2021-01-12 苏州浪潮智能科技有限公司 Hard disk serial number management method, system, terminal and storage medium
CN112597051A (en) * 2020-12-30 2021-04-02 北京华胜天成科技股份有限公司 Method and device for obtaining test result, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于高性能I/O技术的Memcached优化研究;安仲奇;杜昊;***;霍志刚;马捷;;计算机研究与发展;20180415;第55卷(第04期);864-874 *

Also Published As

Publication number Publication date
CN113468009A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
CN113468009B (en) Pressure testing method and device, electronic equipment and storage medium
CN101515316B (en) Trusted computing terminal and trusted computing method
CN112906008B (en) Kernel vulnerability restoration method, device, server and system
US20110191630A1 (en) Diagnosing a fault incident in a data center
CN101593146B (en) Method and device for automatically testing page
US8694834B2 (en) Preventing log wrap with debug scripts
CN111881014B (en) System test method, device, storage medium and electronic equipment
US8984335B2 (en) Core diagnostics and repair
US8752027B2 (en) Injecting faults into program for testing software
CN110413432B (en) Information processing method, electronic equipment and storage medium
CN111522703A (en) Method, apparatus and computer program product for monitoring access requests
GB2504496A (en) Removing code instrumentation based on the comparison between collected performance data and a threshold
CN115587041A (en) Mobile application delivery task processing method and device, electronic equipment and storage medium
CN114780412A (en) Page testing method, system, device and medium
CN113360389A (en) Performance test method, device, equipment and storage medium
CN114327981A (en) Safety verification system, method and device of function safety mechanism
CN100369009C (en) Monitor system and method capable of using interrupt signal of system management
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
US20060230196A1 (en) Monitoring system and method using system management interrupt
CN112530139B (en) Monitoring system, method, device, collector and storage medium
CN114116291B (en) Log detection method, log detection device, computer device and storage medium
CN112000579B (en) Software interface testing method, system, equipment and medium
CN114090382B (en) Health inspection method and device for super-converged cluster
CN113868030B (en) CPU test tool self-adaptive matching method, system, terminal and storage medium
CN115373923A (en) 0x7c error positioning method, device and medium

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