statically inferring performance properties of software
play

Statically Inferring Performance Properties of Software - PowerPoint PPT Presentation

Statically Inferring Performance Properties of Software Configurations Chi Li , Shu Wang, Henry Hoffmann, Shan Lu Configurations Explosion Tianyin Xu, Long Jin, Xuepeng Fan, Yuanyuan Zhou, Shankar Pasupathy, and Rukma Talwadker . Hey, You Have


  1. Statically Inferring Performance Properties of Software Configurations Chi Li , Shu Wang, Henry Hoffmann, Shan Lu

  2. Configurations Explosion Tianyin Xu, Long Jin, Xuepeng Fan, Yuanyuan Zhou, Shankar Pasupathy, and Rukma Talwadker . Hey, You Have Given Me Too Many Knobs! Understanding and Dealing with Over-Designed Configuration in System Software. In FSE, 2016 2

  3. Which configuration affects performance? #36170959, Cassandra Performance Tuning "Please let me know what more settings I can tweak to get maximum performance out of my cluster." #47665640, Memory configurations “I am finding that I am running out of memory when running my queries. I was able to figure out how to restrict cassandra to run in less than 4gb. Is there such a setting for hadoop?” #45565896, MapReduce Error: Java heap space “Besides those parameters in the configuration, I do not change anything else, so I use the default values. How can I solve the Error: Java Heap Space” 3

  4. How to performance-tune configurations? #37897438, Hbase Performance Tuning “ I have the following petameters in Hbase: … Can anyone suggest any configuration changes to generate more IO per second? ” #7243670, Hbase performance “My major configurations are: … Am I doing something wrong with the configuration? This is my last shot at Hbase. Please help” #HBase-13919, Rationalize Client Timeout “There are current many setting that influence how/when an HBase client times out. This is hard to configure, hard to understand, and badly documented.” 4

  5. Performance Misconfigurations • Common – 65% of configuration issue reports – 35% of configuration posts on Stack Overflow • Severe – 20% of MySQL misconfig. -> severe slowdown – 1/3 of Hadoop misconfig. -> memory issue (OOM) Shu Wang, Chi Li, Henry Hoffmann, Shan Lu, William Sentosa, and Achmad Imam Kistijantoro. Understanding and auto-adjusting performance-sensitive configurations. In ACM SIGPLAN Notices, volume 53, pages 154–168. ACM, 2018. Zuoning Yin, Xiao Ma, Jing Zheng, Yuanyuan Zhou, Lakshmi N Bairavasundaram, and Shankar Pasupathy. An empirical study on configuration errors in commercial and open source systems. In SOSP, 2011 5

  6. Can we help? Can we automatically answer ... Does a configuration affect performance? How does a configuration affect performance? 6

  7. Previous work ---- Auto-tuning Profiling Data Machine Learning and Optimal Settings Control Theory • Expensive training and profiling • Not working if workload/environment changes at run time How can we do better? 7

  8. Our Key Insights Static program logic Dynamic behavior Does a Performance Does a configuration Operation (PerfOp) depend affect performance? reflects on the configuration? How does the How does a Performance- PerfOp depend on sensitive Configuration the PerfConf? (PerfConf) affect performance? PerfConf int sortmb = job.getInt(“io.sort.mb”); int maxUsage = sortmb * 1024 * 1024; buffer = new Byte[maxUsage]; PerfOp 8

  9. How to use program analysis to infer configurations' performance impact? • Understanding • Tool design • Evaluation 9

  10. How to use program analysis to infer configurations' performance impact? • Understanding • Tool design • Evaluation 10

  11. How can a Conf affect a Perf-Op? Data Dependency If Related Control Dependency ? Loop Related 11

  12. How can a Conf affect performance? Data Dependency What type of Constant variables are Approaching If compared in IF Control Dependency Related predicate? Bouncy Unrelated Loop Bound How does Conf affect loop? Loop Stride Loop Related Sync. Loop Infinite Loop 12

  13. How can a Conf affect performance? Data Dependency Constant Approaching If Control Dependency Related Bouncy Unrelated Loop Bound Loop Stride Loop Related Sync. Loop Infinite Loop 13

  14. Data Dependency Configuration affects the impact of every instance • of PerfOp through parameters Code Example Formula Performance Graph PerfOp(Conf) 𝑄𝑓𝑠𝑔𝑝𝑠𝑛𝑏𝑜𝑑 = 𝐷𝑝𝑜𝑔 int sortmb = job.getInt(“io.sort.mb”); int maxUsage = sortmb * 1024 * 1024; buffer = new Byte[maxUsage]; 14

  15. How can a Conf affect performance? Data Dependency Constant Approaching If Control Dependency Related Bouncy Unrelated Loop Bound Loop Stride Loop Related Sync. Loop Infinite Loop 15

  16. If Related Patterns • Conf affects whether the PerfOp is executed Code Example Formula Performance Graph Performance If (V <= C) { = ,𝑏, 𝑊 ≤ 𝐷 PerfOpA 𝑐, 𝑊 > 𝐷 } else { PerfOpB } 16

  17. How can a Conf affect performance? Data Dependency Constant Approaching If Control Dependency Related Bouncy Unrelated Loop Bound Loop Stride Loop Related Sync. Loop Infinite Loop 17

  18. Compared with Constant • The if-else decision does not change over time 80 Latency(ms) if (maxFsObjects != 0) { lock(); 40 } 0 0 5 10 Request 18

  19. How can a Conf affect performance? Data Dependency Constant Approaching If Control Dependency Related Bouncy Unrelated Loop Bound Loop Stride Loop Related Sync. Loop Infinite Loop 19

  20. Compared with Bouncy Variable • The if-else decision keeps changing over time 10 currentSize += put.heapSize(); 5 ∆ Memory(MB) writeBuffer.add(put); 0 -5 If (currentSize > bufferSize) { -10 writeBuffer.clear(); -15 Mem Flush -20 currentSize = 0; -25 200 400 600 800 1000 } Request 20

  21. How can a Conf affect performance? Data Dependency Constant Approaching If Control Dependency Related Bouncy Unrelated Loop Bound Loop Stride Loop Related Sync. Loop Infinite Loop 21

  22. How can a Conf affect performance? Data Dependency Constant Approaching If Control Dependency Related Bouncy Unrelated Loop Bound Loop Stride Loop Related Sync. Loop Infinite Loop 22

  23. Affect Loop Stride • Conf used as a loop stride in the loop-exit condition Code Example Formula Performance Graph 𝑄𝑓𝑠𝑔𝑝𝑠𝑛𝑏𝑜𝑑𝑓 for (; i < N; i+=Conf) = 𝑏𝑂/𝐷𝑝𝑜𝑔 { PerfOp(); } 25 while (bytesRemaining > 0) { Job Latency(s) 20 splits.add(makeSplit()); 15 bytesRemaining -= splitSize ; 10 5 } 0 0 20 40 60 80 100 120 140 Configuration(splitSize) 23

  24. How can a Conf affect performance? Data Dependency Constant Approaching If Control Dependency Related Bouncy Unrelated Loop Bound Loop Stride Loop Related Sync. Loop More details in the paper Infinite Loop 24

  25. • Understanding • Tool design • Evaluation 25

  26. LearnConf Overview PerfConf- PerfConf - PerfOp pair Pattern Binary PerfOp Analysis Identification Performance Pattern- Properties specific LearnConf Analysis List of PerfConf iosort.mb • Pattern: Data Dependency • io.sort.factor Pat. Spe. Properties: • handler.count… User request: MapTask • • input.buffer Linear: Yes • • indexcache.mb Slope: 1024 * 1024 • … • Range effect: No • Related PerfConf: No • Monotonic: Yes • 26

  27. Identify Configuration Variable • Identify configuration-loading API – Add return var. to configuration variable set • Track data-dependence chain – Tag more variables as configuration variables configuration-loading API Configuration variable int sortmb = job.getInt(“io.sort.mb”); int maxUsage = sortmb * 1024 * 1024; buffer = new Byte[maxUsage]; 27

  28. Identify PerfOps • Latency related • Sleep(), lock(), IO, etc. • Memory related • new byte[], List.add(), etc. int sortmb = job.getInt(“io.sort.mb”); int maxUsage = sortmb * 1024 * 1024; buffer = new Byte[maxUsage]; Memory Intensive Operation 28

  29. Identify PerfConf If a PerfOp depends on the Configuration Variable, ... int sortmb = job.getInt(“io.sort.mb”); List of PerfConf int maxUsage = sortmb * 1024 * 1024; io.sort.mb • buffer = new Byte[maxUsage]; … • 29

  30. Categorize PerfConf-PerfOp dependency • Data Dependency Pattern – Conf used in the parameter of the PerfOp • If Pattern – Conf used in an if-predicate • Loop Pattern – Conf used in a loop-exit condition Pattern: Data Dependency int sortmb = job.getInt(“io.sort.mb”); int maxUsage = sortmb * 1024 * 1024; buffer = new Byte[maxUsage]; 30

  31. Pattern-Specific Analysis PerfConf- PerfConf - PerfOp pair Pattern Binary PerfOp Analysis Identification Performance Pattern- Properties specific LearnConf Analysis List of PerfConf iosort.mb • Pattern: Data Dependency io.sort.factor • Pat. Spe. Properties: handler.count… • • User request: MapTask input.buffer • int sortmb = job.getInt(“io.sort.mb”); Linear: Yes • indexcache.mb • int maxUsage = sortmb * 1024 * 1024; • Slope: 1024 * 1024 … • Range effect: No buffer = new Byte[maxUsage]; • • Related PerfConf: No • Monotonic: Yes 31

  32. • Understanding • Tool design • Evaluation 32

  33. Methodology • Benchmarks – Four widely used distributed systems – Each contains around 100~150 configurations 33

  34. Identify Correct PerfConf UNION of tutorials and papers • Correctly identify 60 out of 71 true PerfConfs • 9 false positives • 4 true PerfConfs not in previous work that can lead to OOM or timeout failures! Identified False Positive False Negative MapReduce 16 1 7 HBase 19 1 2 HDFS 13 5 1 Cassandra 21 2 1 Total 69 9 11 34

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend