Virtual platform performance evaluating method based on the program profile analysisTechnical field
The present invention relates to a kind of computer system performance method of testing, relate in particular to a kind of virtual platform performance evaluating method of analyzing based on program profile.
Background technology
Benchmark test (Benchmark) is the main method of computing power evaluation and test, and it refers to by carrying out a series of application program or instruction manipulation and estimates the performance of certain computing system.Specifically can be divided into microcosmic benchmark test (Micro Benchmark) and macroscopical benchmark test (Macro Benchmark) two classes.The speed that microcosmic benchmark test is tested this operation of computing system by the operation that repeats certain hardware level or operating system grade, for example CPU arithmetic speed, memory read-write speed, disk read-write speed, network read or write speed, process switching speed etc.Macroscopical benchmark test is is then evaluated and tested the performance of computing system class practical application by carrying out significant typical mission program, for example Web application performance, database service application performance, high performance computing service performance, file service performance etc.
Real daily use program is made of the sequence that comprises various operations, and the performance that is difficult to exactly all kinds of single operations that obtain from microcosmic benchmark test is inferred.Therefore, macroscopical benchmark test instrument is used in the evaluation and test of traditional services applicator platform usually, for example the SPEC of performance evaluating standardization body (Standard Performance Evaluation Corporation) comprises the SPECcpu of test CPU mission performance at macroscopical benchmark of all kinds of server application scenarios issues, the SPECmpi of test high-performance calculation, the SPECweb of test webpage service performance, the SPECmail of test mail service performance, the SPECsfs of test file system service performance, the SPECjEnterprise of test application service performance, the SPECjvm of test JAVA service performance, SPECvirt_sc of test virtual platform Server Consolidation performance or the like.These macroscopical benchmark test instruments are in order to allow test result more accurately more near the true performance of using, adopted fairly large exemplary operation load (Workload), cause test process slow, SPECcpu needs of entire run more than 12 hours on Intel Q66004 core processor for example, and the microcosmic benchmark test of test CPU operating speed only needs a few minutes even a few second.In short, microcosmic benchmark test is compared in macroscopical benchmark test, and its advantage is to reflect the true performance of using, and shortcoming is a testing complex degree height.
The computing system Intel Virtualization Technology refers to physical resource and operating system uncoupling, makes operating system on virtual hardware resource, and real hardware resource virtual machine manager (Virtual Machine Manager) is managed and dispatched.On the one hand realized Server Consolidation (Server Consolidation), made and to move a plurality of operating systems simultaneously on the physical platform, improved resource utilization, reduced demand resources such as electric power, spaces; Each operating system can be moved in separate space on the other hand, and the performance of each operating system and availability are not subjected to influence each other under the management of virtual machine manager, have guaranteed good isolation performance and availability.
This Server Consolidation ability of virtual platform has greatly enriched its application scenarios, comprises web service, mail service, database service, application program service, file system service etc.Therefore, need comprise macroscopical benchmark test of all these application scenarioss to the performance evaluating of virtual platform, this macroscopical benchmark test that makes its testing complex degree compare traditional single scene further increases, the installation of various macroscopical benchmark tests configuration needs complicated manually-operated in addition, and these factors have all improved testing cost greatly.
Profile analysis is a kind of dynamic routine analysis, and it obtains the relevant information of program behavior in the process that program is carried out, and usually is used for causing in the discovery procedure code part of performance bottleneck, so that developers' optimizer performance.
Summary of the invention
The invention provides a kind of virtual platform performance evaluating method based on profile analysis, it is too high to have solved traditional macro benchmark test complexity, and the time is long, the problem that cost is high.
A kind of virtual platform performance evaluating method based on profile analysis comprises:
(1) utilizes pitching pile, sampling and outer monitoring three class profile analysis technology to obtain the resource request of macroscopical load, comprising: all kinds of operation amounts of CPU, virtual machine sensitive operation quantity, memory read-write quantity and the cache hit rate, disk read-write data volume, the network amount of reading and writing data that cause virtual machine context to switch;
(2) virtual platform to be measured is carried out microcosmic benchmark test, obtain the resource provision ability of virtual platform to be measured, comprising: all kinds of operating speeds of CPU, the time-delay of virtual machine sensitive operation, memory read-write speed and cache read writing rate, disk read-write speed, network read or write speed;
(3) response time, cpu busy percentage, disk utilization factor and the network utilization of the macroscopical load of calculating.
As all resource operations all is serial, and then the response time can be expressed as:
T is the response time of macroscopical load, TiRepresent the time-delay of i class resource operation, NiThe quantity of representing i class resource operation, m is a resource operation kind quantity.
When all resource operations all walk abreast, then the response time can be expressed as:
T is the response time of macroscopical load, TjBe the time-delay of j class resource operation, n is a resource operation kind quantity.
When all resource operations are parallel and serial mixes, then calculate the final response time step by step by serial and parallel formula.
And cpu busy percentage, disk utilization factor and network utilization can be expressed as:
UCPU=TCPU/T,UDisk=TDisk/T,UNet=TNet/T
T whereinCPU, TDisk, TNetBe respectively CPU, disk, network operation and always delay time, only need respectively the delayed addition of their all operations can be tried to achieve, because can not there be two kinds of operations in same resource at synchronization.Described resource operation is meant the operation of CPU, internal memory, buffer memory, disk and network.
The inventive method service routine profile analysis technology is obtained the resource request of macroscopical load, utilizes microcosmic benchmark test to obtain the resource provision of virtual platform to be measured, and in conjunction with the above two analytical calculation macro properties.Because program profile analysis and platform independence to be measured can obtain the resource request information of macroscopical load in advance, only carry out microcosmic benchmark test during actual the test.Therefore, the inventive method can be analyzed the macroscopical application performance that obtains virtual platform to be measured under all kinds of scenes with the complexity of microcosmic benchmark test, has reduced the complexity and the cost of test.
Description of drawings
Fig. 1 is the inventive method operating process synoptic diagram;
Fig. 2 is the inventive method profile analysis operating process synoptic diagram;
Fig. 3 is the structural representation under the parallel and serial of all resource operation one-levels of macroscopical load.
Embodiment
As depicted in figs. 1 and 2, a kind of virtual platform performance evaluating method based on profile analysis comprises:
1) using the GCC compiler that the source code of macroscopical load is carried out pitching pile recompiles, the performance monitoring code is added in the original load program, the load of performance monitoring code is monitored all kinds of instructions, and when the load program end of run, all kinds of instruction numbers are outputed to specified file, comprise CPU operation amount, memory read-write quantity, virtual machine sensitive operation quantity.
2) backstage starts Oprofile hardware sampling instrument and exterior I O monitoring tools, the interrupt event that the Oprofile instrument is responsible for all kinds of performances such as cache invalidation are caused carries out sample record, obtain cache hit rate, the IO monitoring tools that adopts Linux to provide is responsible for writing down total disk read-write data volume, the network amount of reading and writing data of foreground program.
3) carry out macroscopical load program that this pitching pile is crossed, macroscopical load resource solicited message of collecting comprises: all kinds of operation amounts of CPU, virtual machine sensitive operation quantity, memory read-write quantity and the cache hit rate, disk read-write data volume, the network amount of reading and writing data that cause virtual machine context to switch;
4) virtual platform is carried out microcosmic benchmark test, obtain the resource provision ability of platform to be measured, comprising: all kinds of operating speeds of CPU, the time-delay of virtual machine sensitive operation, memory read-write speed and cache read writing rate, disk read-write speed, network read or write speed;
5) overall response time, the resource utilization of the macroscopical load of calculating.
As all resource operations all is serial, and then the response time can be expressed as:
T is the response time of macroscopical load, TiRepresent the time-delay of i class resource operation, NiThe quantity of representing i class resource operation, m is a resource operation kind quantity.
When all resource operations all walk abreast, then the response time can be expressed as:
T is the response time of macroscopical load, TjBe the time-delay of j class resource operation, n is a resource operation kind quantity.
When all resource operations are parallel and serial mixes, following in parallel and series connection is an example with one-level, illustrates computing method, and as shown in Figure 3, macroscopical load comprises the sync section of X serial, and each sync section comprises ksIndividual parallel resource operation, then overall response time can be expressed as:
T is the response time of macroscopical load, TBSlBe the time-delay of l resource operation of s sync section, as exist multistage serial parallel, according to above-mentioned formula and the like get final product.
Resource utilization can get final product total time-delay of related resource operation divided by overall response time, can be expressed as respectively as cpu busy percentage, disk utilization factor and network utilization: UCPU=TCPU/ T, UDisk=TDisk/ T, UNet=TNet/ T.
Be example with the bzip load among the computation-intensive macroscopic view benchmark test SPECcpu below, specifically set forth said method, the configuration of virtual platform is as follows:
The physical machine configuration: Intel Q66004 core processor, dominant frequency are 2.4GHz; Internal memory 4G;
The virtual machine manager configuration: Xen 3.3.1 operates on the linux kernel 2.6.27;
Virtual machine configuration: 1 VCPU, 1G internal memory
Step a: profile analysis obtains the quantity of all kinds of resource operations in the table 1 to load bzip, because bzip is the load of CPU intensity, these CPU arithmetic operations obtain by the method for profile analysis that recompiles pitching pile.
Step b:, obtain the unit operation time-delay in the table 1 to the benchmark test of virtual platform operation LMbench microcosmic.
Step c: according to formula 1: analytical calculation, obtain the response time analysis result of table 2, The actual running results relatively, its error is 5.4%.
Profile analysis and the microcosmic benchmark results of table-1 load bzip
Table-2 load bizip performance Analysis and Calculation and errors thereof
| Analysis result | The actual running results | Error |
| The bzip response time | 950.0022255 | 903 | 5.4266% |