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

Eclipse Jifa - Tools for Troubleshooting Java A...

Avatar for Sanhong Li Sanhong Li
February 27, 2022
96

Eclipse Jifa - Tools for Troubleshooting Java Application in the Cloud

Avatar for Sanhong Li

Sanhong Li

February 27, 2022
Tweet

Transcript

  1. Sanhong Li, Java Champion, co-leader of the GreenTea JUG Denghui

    Dong, OpenJDK Committer Eclipse Jifa Tools for Troubleshooting Java Application in the Cloud
  2. Garbage Collector Bytecode Interpreter Just-in-time Compiler JVM(Java Virtual Machine) Java

    HEAP Stack VM data Code Cache Metaspace jmap jstack jcmd pid CodeCache.dump Thread jcmd pid Metaspace.dump Java Diagnostic Tools Overview Internal Use(Alibaba Dragonwell only) Existing Tools verbose gc log
  3. Analysis in Eclipse MAT APP ‘Local’ ‘Cloud’ heap dump transferred

    over network • Requiring heap dump file transfer from cloud to local • Requiring large memory for large heap analysis Challenge#1 Heap Dump Analysis in the Cloud
  4. Challenge#2 GC log is hard to read/understand • GC performance

    is one of the crucial JVM metrics • Deciphering the GC log files is simply daunting
  5. Java Issue Finder Assistant Goal: It is designed as a

    web platform and aims for troubleshooting Java Application in the Cloud
  6. Key Feature Roadmap 2020/3 2022/2 2021/12 Initial implementation (Heap Analysis)

    K8S Scheduling Open-sourced by Alibaba under Eclipse Foundation Master/Worker Pattern • GC Log Analysis • Thread Dump Analysis 2020/8 and other individuals…  Community Involvement Elastic deployment support  Incubation phase, next is to discuss for graduating to Mature phase
  7. Solution • Web Application, frontend and backend separation • Backend

    is backed by Vert.x(https://vertx.io/) • Frontend is relying on Vue(https://vuejs.org/) • Analytic Engine • HeapDump service is implemented based on Eclipse MAT • GC Log Analyzer
  8. Solution (cont.) • Master & Worker Pattern • Master •

    Route the user requests from the browser to the worker • Schedule new worker on demand(according to the resource usage) for serving the requests • Worker • Do the real analysis work
  9. Worker Scheduling • K8S-based: open-source system for automating deployment, scaling,

    and management of containerized applications. • Kubernetes Java Client: Java library to operate the Kubernetes cluster • https://github.com/kubernetes-client/java/ https://github.com/eclipse/jifa/pull/98/files Implementation details: Master/Scheduler Worker Pod1 Worker Pod2 Worker Podn K8S Cluster Dynamic Pod(worker) creation as needed
  10. Different Ways to Upload • Local: Uploaded from your local

    file • SCP: Copied from a remote host • URL: Pointed to one specified location in the internet • OSS: Transferred from Alibaba OSS • S3: Transferred from Amazon S3 Analytic Engine SCP Storage
  11. Different Ways to Deploy • Worker only model • simplest

    way to get started with Jifa, only one worker for the analysis • Master and Worker model • Consists of only one master and several workers • K8S Model • Rely on the K8S cluster management capacity, and create worker resource as needed https://github.com/eclipse/jifa/tree/master/deploy Guide:
  12. Report Example(Heap Analysis) http://jifa.dragonwell-jdk.io/heapDump?file=1617170189191-demo.hprof Report Details per View Different GC

    Roots Different Views The chain of objects which keep live and traced from GC Root(Thread) Follow the same guide from Eclipse MAT https://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.mat.ui.help/welcome.html
  13. GC Log Analyzer Introduction https://github.com/eclipse/jifa/issues/107 • Open sourced as a

    part of Eclipse Jifa • GC algorithm support • Serial GC / Parallel GC / CMS / G1 / ZGC • Java version support : 8/11(17 is under development) • Feature list • Diagnostic recommendation • Interactive graphs • Key performance indicators • GC pause statistics Implementation Details:
  14. Eclipse Jifa at Alibaba  Alibaba uses Java at massive

    scale  Internal diagnostics platform is based on Eclipse Jifa, used by   Productized as part of Application Real-Time Monitoring Service(ARMS) for Alibaba Cloud users Usage in Alibaba (approx.) 10,000 developers 100,000 applications 1,000,000 JVM instances https://www.alibabacloud.com/product/arms
  15. #1 How to Build • Prerequisites • JDK 11 •

    Gradle • Build Artifacts • Backend • Master • Worker • Frontend
  16. #2 How to Deploy • Worker only model • Master

    and Worker model(Default) • K8S Model
  17. #3 How to Analyze • Step 1: Prepare a dump

    file • Step 2: Upload it to Jifa • Step 3: Analyze it via the browser
  18. Wrap up • Key Takeaways • Eclipse Jifa is a

    web application, designed for troubleshooting Java application in the cloud • Eclipse Jifa currently supports Heap Dump analysis, GC Log and Thread Dump analysis coming soon • Eclipse Jifa is still in incubation phase(Welcome contribution) • GitHub: https://github.com/eclipse/jifa • Slack: https://app.slack.com/client/T018ZRS4ZC1/C018TCUNE12 Have a try: http://jifa.dragonwell-jdk.io/