Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Analyzing Performance Test Data

2,632 views

Published on

Carles Roch-Cunill, Test Lead for System Performance at McKesson Medical Imaging Group, shared his expertise in Analyzing Performance Test Data.

Published in: Technology
  • Be the first to comment

Analyzing Performance Test Data

  1. 2. Analyzing Performance test data (or how to convert your numbers to information) Carles Roch-Cunill Test Lead for System Performance McKesson Medical Imaging Group [email_address]
  2. 3. Agenda <ul><li>Performance testing as an experimental activity </li></ul><ul><li>Very fast review of Scientific Method </li></ul><ul><li>Errors, forget them at your own risk </li></ul><ul><li>About the meaning of data </li></ul><ul><li>Some statistical concepts </li></ul><ul><li>Analyzing data </li></ul><ul><li>Adjusting your data to a model </li></ul><ul><li>Summary </li></ul>
  3. 4. Performance testing as an experimental activity <ul><li>There are two approaches to testing: </li></ul><ul><ul><li>a) Without added value </li></ul></ul><ul><ul><ul><li>This feature does not work </li></ul></ul></ul><ul><ul><ul><li>This requirement is not meet </li></ul></ul></ul><ul><ul><li>b) With added value </li></ul></ul><ul><ul><ul><li>This feature does not work, and this module/component/software artifact is the culprit </li></ul></ul></ul><ul><ul><ul><li>This requirement is not meet, and it fails for this reason. </li></ul></ul></ul><ul><li>Usually, things are not so clear, and testers statements fall somehow in the middle. </li></ul><ul><li>Because Performance testing gathers data that can be analyzed, the performance tester is well positioned to provide added value information to the team. </li></ul>
  4. 5. Performance testing as an experimental activity <ul><li>If you want to provide added value and explain why the requirement is not met you will </li></ul><ul><li>Formulate a hypothesis: “My performance degrades due to component X” </li></ul><ul><li>Test the hypothesis by developing an appropriate test environment </li></ul><ul><li>Gather results </li></ul><ul><li>Analyze the results to see if they confirm or reject your hypothesis </li></ul><ul><li>If you are lucky and your guess (the hypothesis) was good, you will have explained at least a part of the performance behaviour. </li></ul><ul><li>However, usually there may be other factors that may also influence your performance, so you have catch one low hanging fruit. </li></ul>
  5. 6. Performance testing as an experimental activity <ul><li>You can create different test that will put more emphasis in one of the components of the system. </li></ul><ul><li>For example, you may want to specifically measure the performance of the data repository tier, or the network, or only the UI. </li></ul><ul><li>Depending where is your focus, your methodology and your tools will change. </li></ul><ul><li>In all cases, you need to fix all the parameters but one. For example, if you want to study the influence of the network on your system, you need to do the following: </li></ul><ul><ul><li>Determine the parameters that characterize the network (latency, bandwidth, utilization…) </li></ul></ul><ul><ul><li>Identify if they are independent or not (utilization and latency may not be independent) </li></ul></ul><ul><ul><li>Modify one parameter at a time while keeping the other constant </li></ul></ul>
  6. 7. Very fast review of Scientific Method <ul><li>An effect has been observed. Example: performance degradation on your application </li></ul><ul><li>You try to reproduce it and learn the conditions to reproduce it at will </li></ul><ul><li>You may gather some data through testing </li></ul><ul><li>To explain the data you formulate a model (hypothesis) </li></ul><ul><li>You refine your testing and tailor it around your model </li></ul><ul><li>You analyze the new data and check if your model fits the data </li></ul><ul><li>If the model fits it, you are on a good footing </li></ul><ul><li>If the model partially fits it, you either refine your model or discard it. </li></ul><ul><li>If the model does not fits it, you formulate another model </li></ul><ul><li>In both cases, new data obtained from other tests may force you to modify/rethink or even dump your model. </li></ul><ul><li>Once your data fits the model, you draw conclusions based on the framework provided by the model. </li></ul>
  7. 8. Very fast review of Scientific Method <ul><li>Unstated principles: </li></ul><ul><li>Simpler is better </li></ul><ul><li>Same procedure and system, you get the same results. </li></ul><ul><li>A model should not introduce mode questions than it answers </li></ul><ul><li>Usually, newer models include the older models as particular cases </li></ul><ul><li>Models are dynamic. </li></ul>
  8. 9. Errors, forget them at your own risk <ul><li>Errors happen… so take them into account </li></ul><ul><li>There are two main kind of errors: </li></ul><ul><ul><li>Human Errors: stopping the watch in the wrong moment, confusing digits… </li></ul></ul><ul><ul><li>Instrument error: Your watch is not precise, has a mechanical defect… </li></ul></ul>
  9. 10. Errors, forget them at your own risk In the graph besides. If your error bar is ± 1, we can say the trend is to a larger value. However, if the error bar is ± 3, then we can not say anything about the trend of this data
  10. 11. About the meaning of data <ul><li>Performance generates a lot of data. But what all the data means? To explain this data you need to take into account: </li></ul><ul><ul><li>Hardware </li></ul></ul><ul><ul><li>Network characteristics </li></ul></ul><ul><ul><li>Network topology </li></ul></ul><ul><ul><li>Physical support for Data tier (storage, database..) </li></ul></ul><ul><ul><li>The architecture of your application </li></ul></ul><ul><ul><li>How your application is coded </li></ul></ul><ul><li>… . </li></ul>
  11. 12. About the meaning of data <ul><li>In addition, you need to analyze the results in the context of the requirement or the question you are trying to answer. </li></ul><ul><li>For example: </li></ul><ul><ul><ul><li>“ Event A should not take more than x seconds” </li></ul></ul></ul><ul><li>In most of the circumstances involving computer systems, you will have an stochastic component in your distribution. Assuming a normal one you will have something like </li></ul>
  12. 13. About the meaning of data But, what exactly the requirement means? Strictly it means:
  13. 14. About the meaning of data <ul><li>However, the requirement it usually interpreted as : </li></ul>For formal point of view the requirement “Event A should not take more than x seconds” would have failed with the above distribution. However the statement “The average of Event A should not take more than x seconds” would pass
  14. 15. About the meaning of data <ul><li>The requirement can also be expressed as percentile </li></ul>In this case the requirement will be stated as “Event A should not take more than X seconds 50% of the time”
  15. 16. Some statistical concepts <ul><li>Once we have defined the question, we can provide the answer. The answer will be obtained through measurements (either manual or automated). </li></ul><ul><li>The more measurements you take, the better will be your statistics and the better will be your answers. </li></ul><ul><li>However, the measurements need to be statistically significant . What it means is the measurement is good enough to be included in your statistics. </li></ul><ul><li>All the measurements that are included in your statistics need to be statistically equivalent </li></ul>
  16. 17. Some statistical concepts <ul><li>How you determine if your data is statistically equivalent? </li></ul><ul><li>You can apply some complex mathematical analysis or apply common sense. </li></ul><ul><li>Some rules of thumb: </li></ul><ul><ul><li>If in a single set of measurements, 20% of your data is very different, you either have a problem in your test system or you are observing different phenomena. </li></ul></ul><ul><ul><li>If you have done several runs, and the 90th percentile of a new test is bigger (smaller) than the maximum (minimum) of the previous tests, then the new data is not statistically similar, and has no statistically significance for your results. </li></ul></ul><ul><ul><li>If you are expecting a specific distribution, and you are not getting it, the current set can not be compared (is not statistically equivalent) to the data you were expecting. </li></ul></ul><ul><ul><li>Outliers are not statistically equivalent to the rest of the set. </li></ul></ul>
  17. 18. Some statistical concepts <ul><ul><li>Example of 90 th percentile for Test 3 being bigger than the maximum of the other sets of measurements. In this context Test 3 is not statistically equivalent and will be rejected. </li></ul></ul>
  18. 19. Some statistical concepts <ul><li>Outliers are usually defined as </li></ul><ul><ul><li>Measurement outside the overall pattern of a distribution (Moore and McCabe 1999). </li></ul></ul><ul><ul><li>A more precise definition is a point the is 1.5 more than the interquartile range above the third quartile of below the first quartile </li></ul></ul><ul><li>Usually, the presence of an outlier indicates either an error in the measurement or an incomplete model </li></ul>
  19. 20. Analyzing data <ul><li>While testing a non deterministic system you will always get a distribution of values, all of them valid in principle. </li></ul><ul><li>For example, if your average in a measure is 3 and you sample again and get 6, this ‘6’ is also correct and you can not discard this number ( unless you do not determine this point is an outlier ). </li></ul><ul><li>The good news is you can extract information from this succession of different numbers. </li></ul>
  20. 21. Analyzing data <ul><li>For example, we may have the following collection of raw data for a measure that generically we will describe as “query database”, in seconds 4.18; 2.1; 1.9; 2.23; 4.5; 4.2; 2.19; 2.21; 4.24; 2.23; 1.99; 2.01; 2.39; 4.19; 2.42; 2.08; 2.27; 3.98; 2.21; 2.45; 4.32;  average: 2.9 These results seem to be a mix of two series: 2.1; 1.9; 2.23; 2.19; 2.21; 2.23; 1.99; 2.01; 2.39; 2.42; 2.08; 2.27; 2.21; 2.45  average: 2.2 And 4.18; 4.24; 4.19; 3.98; 4.32; 4.5; 4.2  average: 4.2 </li></ul>
  21. 22. Analyzing data <ul><li>What the previous slide is telling us? </li></ul><ul><li>Averaging all the results tells us nothing. </li></ul><ul><li>The results point to a hidden effect: the system executes the query in different ways. </li></ul><ul><li>One possible cause could be that one query joints more tables and thus, it takes more time to return the results </li></ul><ul><li>So, if you want to answer the question of “What is the time to execute this query” you would need to be more nuanced or would need to know the frequency of these queries, so you would be able to make a weighted average. </li></ul>
  22. 23. Adjusting your data to a model <ul><li>The most common one is the usual Gaussian or normal distribution, where σ is the standard deviation and μ is the average </li></ul>The importance of this distribution lay in the Central Limit Theorem, that indicates the distribution of random variables tend to be a normal distribution when sampled a large number of times. Example: if we assume that latency experience by users in a wireless network only depend on the distance to the hub, μ can be interpreted as the average distance of the user to the hub and σ will indicate how spread are the users around the hub.
  23. 24. Adjusting your data to a model <ul><li>Another example of analysis: </li></ul><ul><li>The Chi distribution </li></ul>Resembles in first approximation to the Gaussian distribution, however, it refers when a phenomena depends of K independent parameters, and each of them individually would provide a Gaussian distribution. Example: the observed latency time in a ADSL city wide network may depend of the network utilization, and the latency induced by the distance to the nearest hub. If we want to improve the performance of the system, then we need to tackle both problems.
  24. 25. Adjusting your data to a model <ul><li>This would be an example of two uniform distributions </li></ul>
  25. 26. Adjusting your data to a model <ul><li>If your model can not explain well the results, you need to change or improve the model </li></ul><ul><li>A useful model should have predictive capabilities, so you can design new tests to prove/disprove the model. </li></ul><ul><li>Negative results (model disproved) can be as useful as a positive results </li></ul><ul><li>The analysis of the performance data can help to prevent future bottlenecks and problems </li></ul><ul><li>The analyzed results will have a range of validity. Do not force too many consequences from them </li></ul>
  26. 27. Summary <ul><li>Performance testers provide information beyond requirement compliance </li></ul><ul><li>Performance testing should be treated like a experimental activity </li></ul><ul><li>As experimental activity, scientific method is the most appropriate method of enquiry. </li></ul><ul><li>In tune with the scientific method, you need to make assumptions, design your experiment accordingly and reduce the error bars </li></ul><ul><li>Data should be subject to an statistical analysis </li></ul><ul><li>After the analysis, you should try explain your data with a model </li></ul><ul><li>If the models does not a good job explaining your data, you should change/refine the model </li></ul><ul><li>Your analysis should help to make the software better. </li></ul>
  27. 28. Analyzing Performance test data <ul><li>Questions? </li></ul>

×