Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Java Performance Analyse mit YourKit (JavaLand 2018)

Java Performance Analyse mit YourKit (JavaLand 2018)

(Mostly German)
To analyse Java performance bottlenecks the tool YourKit Java Profiler is an excellent though commercial tool. In this talk I showed when to tweak performance and how to use the tool. Most of the presentation was an interactive demo of the tool, but the slides also cover some screenshots of findings. As a showcase I profiled the Eclipse Java IDE and looked at some expensive use cases like project build or software update.

Karsten Thoms

March 15, 2018
Tweet

More Decks by Karsten Thoms

Other Decks in Technology

Transcript

  1. @kthoms @ #javaland #performance #yourkit Safe Harbor Statement Das vorgestellte

    Tool YourKit ist kommerziell Diese Präsentation erfolgt nicht im Auftrag von YourKit Ich beziehe keine Benefits von YourKit Die vorgestellten Use Cases sind nicht allgemein gültig Closed Source Use Cases kann ich leider nicht zeigen Es geht weder um Application Performance Monitoring, noch um Micro Benchmarking https://pixabay.com/de/schatzkiste-kette-schlo%C3%9F-3005312/
  2. @kthoms @ #javaland #performance #yourkit • Kommerzielles Profiling Tool für

    Java and .NET • Integration mit gängigen IDEs • CPU & Memory Profiling • Local & Remote Profiling • Schnell & Leichtgewichtig Promo Code „javaland“ 10% off all licenses
  3. @kthoms @ #javaland #performance #yourkit GC Root, Shallow & Retained

    Size GC Roots obj1 obj2 obj3 obj4 obj5 GC Roots obj1 obj2 obj3 obj4 obj5
  4. @kthoms @ #javaland #performance #yourkit Optimierung Instanzgrößen • Example: Simple

    optimization of data classes reduced heap by 1/3 • => Lazy initialization of collections • => Using wrappers instead of primitives for sparsely populated fields • => Used literals for frequent values (i.e. BigInteger.ZERO/ONE …)
  5. @kthoms @ #javaland #performance #yourkit Lessons Learned Performance vs. Memory

    Consumption Nicht raten - messen ! Nicht auf Verdacht optimieren Sampling meist ausreichend A fool with a tool is still a fool Snapshot Verwaltung umständlich
  6. @kthoms @ #javaland #performance #yourkit Fazit Bottlenecks zeigen sich oft

    nur bei großen Datenmengen Performance Probleme bei „schnellen“ Methoden oft ein Indiz für algorithmisches Problem oder fehlendes Caching Nicht von vornherein optimieren YourKit ist ein sehr nützliches Werkzeug … aber es kann die Daten nicht für dich interpretieren ! Kostet Geld, spart Geld!