Top Banner
Vertical Profiling: Understanding the Behavior of Object-Oriented Applications Matthias Hauswirth, Amer Diwan University of Colorado at Boulder Peter F. Sweeney, Michael Hind IBM Thomas J. Watson Research Center Presented by: Irantha Suwandarathna
25

Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

May 16, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Vertical Profiling: Understandingthe Behavior of Object-OrientedApplications

Matthias Hauswirth, Amer DiwanUniversity of Colorado at Boulder

Peter F. Sweeney, Michael HindIBM Thomas J. Watson Research Center

Presented by: Irantha Suwandarathna

Page 2: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Outline

What is Vertical Profiling Motivations Implementation Case studies Conclusions

Page 3: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Motivations

Increased Virtualization Dynamic recompilation/garbage

collection

ApplicationFrameworkJava LibraryVirtual MachineNative LibraryOperating SystemHardware

Java

ApplicationNative LibraryOperating SystemHardware

C Program

Page 4: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Implementation

One trace file for JikesRVM Thread Virtual Processor ID, Thread ID, Real Time, Real Time duration , Compiled Method ID, Monitor Values

Only 1 thread execute in measurementperiod

Real time value to merge trace files &durations for non-VM Threads

Meta file for ID name mappings

Page 5: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Where Monitor values are kept

Native code Instrumentations PThread specific storage

Java level Instrumentations Virtual Processor object

Page 6: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Measurement Overhead

With 148 Software performancemonitors

Page 7: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Perturbation Analysis

End-to end perturbation for HPM Runs with no collection during execution 5 runs & taking the average

Temporal impact of HPM Qualitative analysis with their knowledge

Impact of SPMs on HPMs Runs with & without SPMs

Impact of SPMs on SPMs Qualitative analysis with their knowledge

Page 8: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Validation

Hypothesis about the cause Eliminate the cause See whether phenomenon is gone

Page 9: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Case Studies

Primary performance Metric Instructions Per Cycle (IPC)

Page 10: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Gradual Increase in jbb

50 transactions per time slice From previous studies

Optimized code has 32% higher IPC Increase IPC low LSU flushes

15.2% LSU flushes in optimized code 0.1% LSU flushes in un-optimized code

Page 11: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Gradual Increase in jbb …

Measure time spent on optimized &un-optimized code

Approximate- Number ofsynchronized methods executed

Different synchronized methodentry points for optimized & un-optimized code

Validate with AOS disabled

Page 12: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Gradual Increase in jbb …

Page 13: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Sudden Increase in compress

Two long running methods Compress & decompress

1st jump compress optimized 2nd jump decompress optimized Instrumentation

Top of the stack method ID Most recently optimized method

Page 14: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Sudden Increase in compress …

Page 15: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Dip before GC in HSQL

Adaptive heap resizing App. runs out of memory Trigger GC page fault exceptions low IPC Instrumentation

Number of virtual page requests CPU cycles with exceptions disabled Number of bytes allocated in JAVA

Page 16: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Dip before GC in HSQL …

Cross correlation MmapBytes & AllocBytes 0.9995

Validation – disable adaptive heap resizing

Page 17: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Periodic Pattern in Db

Each Pattern corresponds to a Shellsort run

L2 cache not enough to keep theworking set drop in IPC

-0.916 correlation between IPC &L2 cache miss rate

Measure set size

Page 18: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Periodic Pattern in Db …

Validation Object in lining IPC drop start at larger set size

Page 19: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Why lot of small time slices in Multi-Threaded benchmarks?

For jbb 1 worker thread – 2221 time slices More than 1 – 10,441 time slices

Small time slices High lock contention

Thread yield end time sliceprematurely

Page 20: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Why lot of small time slices in Multi-Threaded benchmarks?

Decrease in wall clock time Increase in CPU time Samples – Lock Yields = constant

Page 21: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Where Lock contention Happens

Page 22: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Instrumentation & Layers

Approach Browsing Searching

Page 23: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Problems with statistical correlation

Low even frequency No linear relationships Leverage points Direction of causality

Page 24: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Difficulties of this approach

Knowledge on all layers H/W ,OS, VM ,Libraries , Application

Required metrics not known Perturbation Not automated

Thousands of metrics to manuallyinspect

Page 25: Vertical Profiling: Understanding the Behavior of …people.cs.vt.edu/ryder/oosem05/lectures/VertProfile...Vertical Profiling: Understanding the Behavior of Object-Oriented Applications

Conclusions

Vertical profiling can be used tounderstand performance phenomenain modern multi layers systems.