After multi-party analysis, this is the best Java performance evaluation method.
Benchmark Testing is the core of Research and Development of experimental computer science. Therefore, it is essential to have a rigorous benchmarking method. An less rigorous method may distort the overall situation, or even lead to incorrect conclusions, promote research and development to non-productive development, or lead to the release of a non-optimal product to the market.
A good benchmark requires a well-selected, dynamic experiment design. In addition, it requires a complete performance evaluation method.
The performance evaluation method must fully deal with the non-deterministic problems in the experimental environment. The commonly used data analysis methods for processing non-deterministic data are usually not rigorous in statistics.
In the context of Java, non-deterministic sources include JIT compilation, thread scheduling, and garbage collection. For many benchmark tests running on the cloud platform, non-certainty in the underlying cloud platform is also an important factor.
Performance evaluation Problems
It is usually an evaluation method during release, which can perform some performance operations (and report the best performance value (minimum execution time ). For example, compare the performance of five different garbage collectors.
CopyMS and GenCopy are similar, while SemiSpace is superior to GenCopy.
The following are the same lab results, but the report uses a 95% confidence interval, a more rigorous statistical reporting method.
Now we can see that GenCopy is significantly better than CopyMS, while SemiSpace and GenCopy have overlapping confidence intervals, and the difference between them may only be due to random Performance Changes in the tested system.
After investigating 50 Java performance articles, the author says that there is no uniform opinion on the Java performance evaluation methodology. The following table summarizes some of the methods used in these papers:
Example of misleading results
If you use a non-strict method, you need to obtain a single number from a group of operations, such as the best, average, and worst. In the paired comparison, if the increment between two systems exceeds a certain threshold, there may be a meaningful performance difference θ. If statistically rigorous methodologies and confidence interval reports are used, you may see:
· Overlapping intervals
· Non-overlapping intervals, same as non-strict Methods
· Non-overlapping intervals, different from non-rigorous methods
This will lead to six different situations, of which only one is possible. You can rely on the results of the non-rigorous method:
The author conducted a series of tests and found that all popular methods may be misleading, most of which are up to 16% alternative methods. Even in the 3% comparison, a wrong conclusion may appear. (If you really have to get a single number, the average and median will be a better choice ).
Statistics
We advocate increasing statistics to manage runtime systems, especially the performance evaluation of Java systems. Statistically strict data analysis is motivated by statistics, especially confidence intervals, it enables people to determine whether the difference observed during measurement is caused by random fluctuations in measurement or by comparing actual differences in alternative methods.
This part of the original article is basically a customized mini statistical tutorial for testers. If we can get exactly the number that can be repeated from each experiment, everything becomes simple. However, this is not the case. The existence of uncertainty forces us to control harassment events unrelated to the measurement content. The first step is to discard extreme outliers and calculate a confidence interval.
In each experiment, samples are extracted from the potential population. Obtain the confidence interval of the mean from these samples, and then quantify the range that includes the given probability value of the actual total mean.
Define a confidence interval [C1, C2] so that the probability of μ Between C1 and C2 is 1-α, where α is a significant level and (1-α) is a confidence level.
The 90% confidence interval means that the probability of 90% is that the actual distribution mean of the potential population is within the confidence interval. For the same data, if we want to be more confident that the real mean is within the interval, for example, the confidence interval of 95%, then we need to make the interval wider.
Comparison of alternatives
So far, we know how to calculate the confidence interval of the average of a single system. If we compare two systems and their confidence intervals, we cannot conclude that the difference in the average value is not caused by random fluctuations in the measurement. If the confidence interval does not overlap, we can conclude that there is no evidence that the difference is statistically significant.
This paper provides two methods for calculating the confidence interval of Differential Calculation (see section 3.3 ). If this interval contains 0, we can draw a conclusion on the selected confidence level, there is no significant statistical difference between the two.
If we want to compare two or more alternatives, we can use a technology called variance analysis ).
Variance analysis divides the total changes in a group of measurements into the components caused by random fluctuations in the measurements and those caused by actual differences between alternatives... if the changes between alternatives are greater than those in each alternative, we can conclude that there is a significant statistical difference between alternatives.
The ansible test does not tell you which option has a statistical difference. If so, you can use the Tukey HSD (very different) test.
In variance analysis, we can change an input variable in an experiment. Multi-factor variance analysis enables you to study multiple input variables and their interactions. ANOVA (MANOVA) enables you to draw conclusions from multiple benchmark tests.
Suggestions
There are usually two problems when using more complex analyses, such as multi-factor variance analysis and MANOVA. First, their output is usually not intuitive, and in many cases, it is hard to understand without in-depth statistical background. Second, as mentioned above, all the measurements required in the analysis process are time-consuming, making it hard to process.
Join the study exchange group 569772982 to learn and exchange.