Towards a Methodology for Deliberate Sample-Based Statistical Performance Analysis Geoff Stoker.

Slides:



Advertisements
Similar presentations
CmpE 104 SOFTWARE STATISTICAL TOOLS & METHODS MEASURING & ESTIMATING SOFTWARE SIZE AND RESOURCE & SCHEDULE ESTIMATING.
Advertisements

Sections 7-1 and 7-2 Review and Preview and Estimating a Population Proportion.
Sampling: Final and Initial Sample Size Determination
Copyright 2004 David J. Lilja1 Errors in Experimental Measurements Sources of errors Accuracy, precision, resolution A mathematical model of errors Confidence.
Sampling Methods and Sampling Distributions Chapter.
1 A heart fills with loving kindness is a likeable person indeed.
Statistical Concepts (continued) Concepts to cover or review today: –Population parameter –Sample statistics –Mean –Standard deviation –Coefficient of.
Types of Errors Difference between measured result and true value. u Illegitimate errors u Blunders resulting from mistakes in procedure. You must be careful.
AP Statistics Section 12.1 A. Now that we have looked at the principles of testing claims, we proceed to practice. We begin by dropping the unrealistic.
Statistics for Managers Using Microsoft Excel, 5e © 2008 Pearson Prentice-Hall, Inc.Chap 8-1 Statistics for Managers Using Microsoft® Excel 5th Edition.
University of Maryland Automatically Adapting Sampling Rates to Minimize Overhead Geoff Stoker.
Statistical Inference: Which Statistical Test To Use? Pınar Ay, MD, MPH Marmara University School of Medicine Department of Public Health
Chapter 7 Estimation: Single Population
Chapter 1: Introduction to Statistics
+ Chapter 9 Summary. + Section 9.1 Significance Tests: The Basics After this section, you should be able to… STATE correct hypotheses for a significance.
ESTIMATING with confidence. Confidence INterval A confidence interval gives an estimated range of values which is likely to include an unknown population.
Many times in statistical analysis, we do not know the TRUE mean of a population of interest. This is why we use sampling to be able to generalize the.
Chapter Nine Copyright © 2006 McGraw-Hill/Irwin Sampling: Theory, Designs and Issues in Marketing Research.
© 2002 Thomson / South-Western Slide 8-1 Chapter 8 Estimation with Single Samples.
Albert Morlan Caitrin Carroll Savannah Andrews Richard Saney.
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 8-1 Confidence Interval Estimation.
Chapter 7 Estimates and Sample Sizes
University of Ottawa - Bio 4118 – Applied Biostatistics © Antoine Morin and Scott Findlay 08/10/ :23 PM 1 Some basic statistical concepts, statistics.
PowerPoint presentation to accompany Research Design Explained 6th edition ; ©2007 Mark Mitchell & Janina Jolley Chapter 10 The Simple Experiment.
Uncertainties for AH Phys. Accuracy and Precision The accuracy of a measurement tells you how close the measurement is to the “true” or accepted value.
Confidence Intervals: The Basics BPS chapter 14 © 2006 W.H. Freeman and Company.
1 Sampling Distributions. Central Limit Theorem*
Sections 7-1 and 7-2 Review and Preview and Estimating a Population Proportion.
Academic Research Academic Research Dr Kishor Bhanushali M
Lecture 2d: Performance Comparison. Quality of Measurement Characteristics of a measurement tool (timer) Accuracy: Absolute difference of a measured value.
1 Understanding and Measuring Uncertainty Associated with the Mid-Year Population Estimates Joanne Clements Ruth Fulton Alison Whitworth.
Section 7-3 Estimating a Population Mean: σ Known.
Logic and Vocabulary of Hypothesis Tests Chapter 13.
AP Statistics.  Has been about the distribution of sample means  and the distribution of the difference of sample means.  and the distribution of sample.
Session 1 Probability to confidence intervals By : Allan Chang.
Statistical Inference Drawing conclusions (“to infer”) about a population based upon data from a sample. Drawing conclusions (“to infer”) about a population.
BME 353 – BIOMEDICAL MEASUREMENTS AND INSTRUMENTATION MEASUREMENT PRINCIPLES.
INFERENCE Farrokh Alemi Ph.D.. Point Estimates Point Estimates Vary.
10.1 – Estimating with Confidence. Recall: The Law of Large Numbers says the sample mean from a large SRS will be close to the unknown population mean.
ESTIMATION OF THE MEAN. 2 INTRO :: ESTIMATION Definition The assignment of plausible value(s) to a population parameter based on a value of a sample statistic.
Chapter 12 Inference for Proportions AP Statistics 12.2 – Comparing Two Population Proportions.
Course Review. Distributions What are the important aspects needed to describe a distribution of one variable? List three types of graphs that could be.
Statistical Criteria for Establishing Safety and Efficacy of Allergenic Products Tammy Massie, PhD Mathematical Statistician Team Leader Bacterial, Parasitic.
ESTIMATION OF THE MEAN. 2 INTRO :: ESTIMATION Definition The assignment of plausible value(s) to a population parameter based on a value of a sample statistic.
Uncertainty and error in measurement
Sampling Design and Procedure
Can't Type? press F11 Can’t Hear? Check: Speakers, Volume or Re-Enter Seminar Put ? in front of Questions so it is easier to see them. 1 Welcome to Unit.
Random Sampling Error and Sample Size are Related
CHAPTER 6: SAMPLING, SAMPLING DISTRIBUTIONS, AND ESTIMATION Leon-Guerrero and Frankfort-Nachmias, Essentials of Statistics for a Diverse Society.
Section 8.1 Sampling Distributions Page Can't Type? press F11 Can’t Hear? Check: Speakers, Volume or Re-Enter Seminar Put ? in front of Questions.
Uncertainties in Measurement Laboratory investigations involve taking measurements of physical quantities. All measurements will involve some degree of.
Chapter 6 Inferences Based on a Single Sample: Estimation with Confidence Intervals Slides for Optional Sections Section 7.5 Finite Population Correction.
Inference: Conclusion with Confidence
Comparing Theory and Measurement
Lecture 2d1: Quality of Measurements
Chapter 8: Inference for Proportions
Week 10 Chapter 16. Confidence Intervals for Proportions
AP STATISTICS REVIEW INFERENCE
Confidence Intervals Tobias Econ 472.
Introduction to Inference
Inferences and Conclusions from Data
Descriptive and inferential statistics. Confidence interval
Estimating a Population Proportion
Lecture: statistical significance.
Confidence Intervals Tobias Econ 472.
Section 12.2 Comparing Two Proportions
Chapter 8: Estimating With Confidence
Chapter 12 Inference for Proportions
Comparing Theory and Measurement
How Confident Are You?.
Presentation transcript:

Towards a Methodology for Deliberate Sample-Based Statistical Performance Analysis Geoff Stoker

Why Deliberate Statistical Profiling? Move statistical profiling sample rate selection out of the realm of ad hoc Use mathematical model to balance change in statistical accuracy and effects of perturbation Allow measured program parameters and system context to inform sampling Likely to scale better

Abstract Model How much execution is attributable to foo? true performance Measured Performance total # of samples Perturbation Error Measurement Best Possible Measurement Point

How much execution time is attributable to foo? Analytical Model How much execution time is attributable to foo? t(n) – execution time of foo, after n samples n – number of samples o – overhead time cost per sample p – foo’s proportion of total program execution time T – uninstrumented (true) total program execution time z – standard score (z-value) true performance Measured Performance total # of samples Perturbation Error Measurement Best Possible Measurement Point

Assumptions Time is a representative surrogate for all perturbation effects Hypergeometric distribution is appropriately approximated by a Normal (Gaussian) where n>=100; and M, N >> n Systematic sampling provides results similar to random sampling and occurs asynchronously with periodic events in the measured program

Example Predict the expected range of measurement results for foo (20% of a program’s execution) at the 95% confidence level o = 250 µseconds p = .20 T = 300 seconds z = 1.96 for 95% confidence level

Analytical Model Prediction minimum

Example Continued T = 300, z = 1.96, p = .2, o = .000250

Analytical Model Prediction minimum

Simulation 1,000,000 int array int=300 µsec of exec 200,000, p=.2, foo shuffled sample 1,000,000 int array int=300 µsec of exec 200,000, p=.2, foo Shuffle Draw rnd sample 1000x 900, then every 1,500 up to 44,400 Sample rate 3/sec – 148/sec Assess 250 µsec/sample s s s s s s s s s s

Simulation Results

Experiment Measured program Tool executes ≈ 300 sec Setup Signal Handler Measured program executes ≈ 300 sec 1,000,000 function calls 300 µsec functions Compiled with -g Tool Forks measured program Initialization, signal handler, close-out 23 different sample rates: 3/sec to 166/sec s s s s s s Close-out

Experimental Results

Combined Results

Experiments with SPEC Omnetpp Bzip2 Runtime ≈ 340 sec 115 runs at 2 samples/sec to establish “truth” 10 runs at 28 different sample rates (hpcrun 4.9.9) Use Mean Absolute Percent Error (MAPE) to determine closest sample set to “truth” Bzip2 Similar experiment procedure Runtime ≈ 90 sec Look at functions 1-4

Omnetpp Analysis Distribution of 10 runs at 28 different sampling intervals - cMessageHeap::shiftup(int)

Omnetpp Analysis T=343, z=1.96, p=.1585, o=.000068 n=50,623

Bzip2 Analysis

Bzip2 Analysis

Bzip2 Analysis T=87, z=1.96, p=.385, o=.000050 n=16,685

Some Concerns of Oversampling Tool performance variation Misleading results Functions heavily perturbed by sampling (SPEC OMP examples)

Example Analytical Result Best Possible Measurement Point Published Result performance (time) total # of samples

Apsi Analysis

Fma3d Analysis

Future Work More experiments with additional sequential and parallel SPEC programs Overhead calculation process Overhead function enhancement Deliberate statistical profiling methodology refinement

Conclusion Oversampling can generate misleading analysis Deliberate statistical profiling can lead to better results Questions??

Backup Slides

Determining Sample Size Sample size for determining proportions Jain: r is CI for p/100 Lilja: r is CI for ci/p

Effective Sample Rates

Omnetpp “Truth”

Analytical Model How much execution time is attributable to foo?

Sample Size and Accuracy One order of magnitude accuracy change Two orders of magnitude sample size change

Value of p(1-p)

Mathematical Model

Sample Size and Accuracy cont

Another Look at Statistical Results

Sample of Sampling Practices 100 samples/sec [gprof, XProfiler] 200 samples/sec [T09] 1000 samples/sec [Intel VTune] 5200 samples/sec [DCPI, A91] 10,000 samples/sec [A05] 2.5% all memory ops [O05] 15 sec CPU, 10 sec mem analysis [R08] 1,000,000 mem accesses, skip 9,000,000 [W08]

Current Practice “To ensure good statistical coverage of profiled code, one must collect a large number of samples, either by measuring over a long interval, or by using a high sample rate.” “Volume and accuracy are antithetical” Instrumentation Uncertainty Principle Instrumentation perturbs the system state Execution phenomena and instrumentation are coupled logically Volume and accuracy are antithetical

References A91 – Anderson, Berc, Dean, Ghemawat, … A91 – Andersland, Casavant A05 – Azimi, Stumm, Wisniewski K71 – Knuth K05 – Kumar, Childers, Soffa L07 – Lahiri, Chatterjee, Maiti M92 – Malony, Reed, Wijshoff M07 – Malony, Shende, Morris, Wolf N04 – Najafzadeh, Chaiken O05 – Odom, Hollingsworth, DeRose, Ekanadham, … P95 – Miller, Callaghan, Cargille, Hollingsworth, … R08 - Reiss T09 – Tallent, Mellor-Crummey, Fagan V99 – Vetter, Reed W47 – Wald W08 – Weinberg, Snavely