SlideShare a Scribd company logo
Zing Vision
Answering your toughest production
Java performance questions
Outline
• What is Zing Vision?
• Where does Zing Vision fit in your Java environment?
• Key features

• How it works
• Using ZVRobot
• Q&A

©2014 Azul Systems Inc.

2
What is Zing Vision?
• Zing Vision is a browser-based, visual window into the Zing VM
– Hyperlinked display provides drill-down to root cause
– Both JVM internal and Java program information
– No additional performance overhead
– Nothing special to install or configure
– Easy to get started as a user

– ZVRobot collects and stores monitoring data
• Collected data is same as ZVision!

©2014 Azul Systems Inc.

3
Example Zing Vision deployment

HTTP

Linux host
Zing Vision
(Web browser)

zvision server
HTTP

Zing VM

©2014 Azul Systems Inc.

4
Fitting in: Production focus
• Most tools suitable for developers, but too ‘heavy’ for production
•
•
•
•

Use JVMTI (JVM Tools Interface) and BCI (Byte Code Instrumentation)
High overhead, so must be used carefully in production
May require configuration to lower the overhead
Not practical for Operations teams

• Zing Vision is designed for safe use on production systems
• Ideal diagnostic tool to use when you know you have a problem in
production (“a flashlight in a dark place”)
• Integrated with the JVM, so it won’t add overhead or perturb the running
Java program
• It’s meant to be used - click on items in the web UI to explore!

©2014 Azul Systems Inc.

5
Key features
• Tick profiler
• Thread-level views
• Lock contention view

• Garbage collection views
• Java heap object views
– Live objects
– Object types that increase in number as application runs

©2014 Azul Systems Inc.

6
Tick Profiler: Find “hot” code
• Goal: Determine what code is hot (consuming most CPU time)
• Approach used by other profiling tools:
– Method tracing
– Byte code instrumentation – heavy weight
– Solution: Profile only a user-selected portion of the application
– Drawback: You need to know the location in the code where the
performance bottleneck occurs to select the area of the code to profile!

©2014 Azul Systems Inc.

7
Tick Profiler: Find “hot” code
Zing Vision uses runtime thread sampling:
• Fast snapshots of the code running in executing Java threads
• Identifies where the work is done in the application
• Lightweight, low overhead
– Always on
– Even when you’re not looking at the generated metrics

• Instruction-level granularity
– JVM internal threads, too!
• Detailed information about the entire process
– Interpretation sometimes requires understanding of the JVM runtime

©2014 Azul Systems Inc.

8
Tick Profiler: How it works
1. Thread registers SIG61 signal handler with kernel at
intervals 1 ms (1000 times per second, configurable)
2. Thread runs
3. Kernel delivers SIG61
4. Thread is interrupted on its normal stack
5. Signal handler runs, creates a new (youngest) profile

Youngest profile added

6. Zing Vision aggregates all of
the profiles on the belt in the
Timer Tick Profile view

Oldest profile drops off… (into the trash)

Tick profile conveyor belt has a fixed number of positions for profiles.
Note that the conveyor belt only moves when a new profile is added!
This means Zing Vision always shows the most recent data.
©2014 Azul Systems Inc.

9
Tick Profiler: Where is work done?

©2014 Azul Systems Inc.

10
Tick Profiler: Where is work done?

Collection controllers
Filters

Select link to see details

©2014 Azul Systems Inc.

11
Tick Profiler: Work at instruction level

Callee | Caller
Ticks for each instruction

©2014 Azul Systems Inc.

C2 compiled JDK and
application code

12
Tick Profiler: How did I get here?

©2014 Azul Systems Inc.

13
Tick Profiler: How did I get here?
Sorted based on highest CPU consumers
0 com.sun.tools.javac.util.Name.fromUtf

Top of stack

Top of stack

©2014 Azul Systems Inc.

14
Thread-level questions
• What threads are executing my application?
• What are the housekeeping threads for the JVM?
• Can I examine a thread object?

• What are the threads doing?
– Profiling information
– Stack traces

• Where is my application stalled?

©2014 Azul Systems Inc.

15
Thread-level views: Standard method
Thread number: 1 2 3

4 5

Request thread stacks (kill -3)
Some threads blocked – NO work done
Thread 3 continues to run!

Time

Last thread stopped
O(numThreads) delay  application visible work stoppage
Resume threads

©2014 Azul Systems Inc.

16
Thread-level views: Zing Vision method
Thread number: 1 2 3

4 5

Request thread stacks (ZVision)
Each thread:
1. Stopped individually
2. Delay order is O(1)

Time

No thread waits for any other thread to stop!
The application never perceives a work
stoppage because N-1 threads continue to
run at all times
Resume each thread seamlessly

Pro: Safe to use in production (guilt-free clicking)
Con: Not 100% consistent (especially for lock data)
©2014 Azul Systems Inc.

17
Thread-level view: Application threads

Filters and control
Select link to
see stack
Individual
thread stack
trace and
tick profile
access
©2014 Azul Systems Inc.

18
Thread-level view: Thread stack trace

Thread CPU time consumed
Stack frames
Select link to see details

©2014 Azul Systems Inc.

19
Thread-level view: Thread object details

Values of the object’s fields

©2014 Azul Systems Inc.

20
Thread-level view: Application threads

Filters and control
Select link to
see profile
Individual
thread stack
trace and
tick profile
access
©2014 Azul Systems Inc.

21
Thread-level: Where is the work done?

Thread 8120

©2014 Azul Systems Inc.

22
Lock contention: Where is my app stalled?

Lock acquisition
Total and Max times Blocking count
Select link to
see details

©2014 Azul Systems Inc.

23
Lock contention: Where is my app stalled?

How did I get to the contended lock in my code?

Summary metrics

©2014 Azul Systems Inc.

24
Memory: Answering your questions
• What’s the collector doing?
• How much memory is the application using?
• What type of objects are in the heap?
– What’s keeping those objects live?

• What object types are increasing in number?

©2014 Azul Systems Inc.

25
Memory: Resource use summary

Java heap overview

Process Zing memory use

Linux memory
©2014 Azul Systems Inc.

26
Memory: Collection details

Collection details
©2014 Azul Systems Inc.

27
Memory: Collection details summary

Detailed
summary
calculating
metric
averages

©2014 Azul Systems Inc.

28
Memory: What objects are in the heap?

Objects in Old Generation

Default sorting:
Sum of size of each
object of that type

Expand to see
types with
references to
objects of that type
©2014 Azul Systems Inc.

29
Memory: Which object type is growing?

Object types with increasing memory
consumption in the Old Generation
Selectable time interval

Growth
rate

©2014 Azul Systems Inc.

30
Example ZVRobot deployment

Linux host

Linux host
Write a file for each Zing Vision web page at
each sample period (for example, every 1
minute) into a directory

ZVRobot

HTTP

Zing VM

Use a web browser to look at the saved snapshot files anytime after
program has run or even during collection
©2014 Azul Systems Inc.

31
How to Try Zing Vision - Free
• Request a trial copy of Zing http://www.azulsystems.com/trial
• Download and run Azul Inspector to check your system
• Download and install Zing
– Zing Vision and ZVRobot are included

• Run your application
• Observe your application and the JVM’s activity using Zing Vision

©2014 Azul Systems Inc.

32
Questions?
Zing Vision – providing answers to your Java performance questions
• Tick profiler

• Thread-level views
• Lock contention view
• Garbage collection views
• Java heap object views
• Live objects
• Object types that increase in number as application runs

©2014 Azul Systems Inc.

33

More Related Content

What's hot (20)

PDF
Erlang factory SF 2011 "Erlang and the big switch in social games"
Paolo Negri
 
PDF
Q con shanghai2013-[黄舒泉]-[intel it openstack practice]
Michael Zhang
 
PPTX
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
Tibo Beijen
 
PDF
Scaling software with akka
scalaconfjp
 
PDF
Tech io nodejs_20130531_v0.6
Ganesh Kondal
 
PDF
Combining the strength of erlang and Ruby
Martin Rehfeld
 
PPTX
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 
PDF
Liberty: The Right Fit for Micro Profile?
Dev_Events
 
PDF
Java Application Servers Are Dead!
Eberhard Wolff
 
PPTX
Migrating to Java 11
Arto Santala
 
PDF
DevNexus 2019: Migrating to Java 11
DaliaAboSheasha
 
PPTX
An Introduction to PowerShell for Security Assessments
EnclaveSecurity
 
PPTX
Real world Scala hAkking NLJUG JFall 2011
Raymond Roestenburg
 
PPTX
Threading model in windows store apps
Mirco Vanini
 
PPTX
Splunk Java Agent
Damien Dallimore
 
PDF
DCSF19 Container Security: Theory & Practice at Netflix
Docker, Inc.
 
PPTX
Why Play Framework is fast
Legacy Typesafe (now Lightbend)
 
PPTX
Testability for developers – Fighting a mess by making it testable
Alexander Tarlinder
 
PDF
Automated Exploratory Testing
Justin Ison
 
PDF
Attack-driven defense
Zane Lackey
 
Erlang factory SF 2011 "Erlang and the big switch in social games"
Paolo Negri
 
Q con shanghai2013-[黄舒泉]-[intel it openstack practice]
Michael Zhang
 
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
Tibo Beijen
 
Scaling software with akka
scalaconfjp
 
Tech io nodejs_20130531_v0.6
Ganesh Kondal
 
Combining the strength of erlang and Ruby
Martin Rehfeld
 
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 
Liberty: The Right Fit for Micro Profile?
Dev_Events
 
Java Application Servers Are Dead!
Eberhard Wolff
 
Migrating to Java 11
Arto Santala
 
DevNexus 2019: Migrating to Java 11
DaliaAboSheasha
 
An Introduction to PowerShell for Security Assessments
EnclaveSecurity
 
Real world Scala hAkking NLJUG JFall 2011
Raymond Roestenburg
 
Threading model in windows store apps
Mirco Vanini
 
Splunk Java Agent
Damien Dallimore
 
DCSF19 Container Security: Theory & Practice at Netflix
Docker, Inc.
 
Why Play Framework is fast
Legacy Typesafe (now Lightbend)
 
Testability for developers – Fighting a mess by making it testable
Alexander Tarlinder
 
Automated Exploratory Testing
Justin Ison
 
Attack-driven defense
Zane Lackey
 

Viewers also liked (15)

PDF
Experiences with Debugging Data Races
Azul Systems Inc.
 
PDF
How NOT to Write a Microbenchmark
Azul Systems Inc.
 
PDF
Towards a Scalable Non-Blocking Coding Style
Azul Systems Inc.
 
PDF
ObjectLayout: Closing the (last?) inherent C vs. Java speed gap
Azul Systems Inc.
 
PDF
What's New in the JVM in Java 8?
Azul Systems Inc.
 
PDF
Priming Java for Speed at Market Open
Azul Systems Inc.
 
PPT
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Azul Systems Inc.
 
PDF
The Java Evolution Mismatch - Why You Need a Better JVM
Azul Systems Inc.
 
PPTX
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Azul Systems Inc.
 
PDF
Lock-Free, Wait-Free Hash Table
Azul Systems Inc.
 
PDF
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
Azul Systems Inc.
 
PDF
What's Inside a JVM?
Azul Systems Inc.
 
PPTX
Zulu Embedded Java Introduction
Azul Systems Inc.
 
PDF
Java vs. C/C++
Azul Systems Inc.
 
PPTX
C++vs java
Pradeep wolf king
 
Experiences with Debugging Data Races
Azul Systems Inc.
 
How NOT to Write a Microbenchmark
Azul Systems Inc.
 
Towards a Scalable Non-Blocking Coding Style
Azul Systems Inc.
 
ObjectLayout: Closing the (last?) inherent C vs. Java speed gap
Azul Systems Inc.
 
What's New in the JVM in Java 8?
Azul Systems Inc.
 
Priming Java for Speed at Market Open
Azul Systems Inc.
 
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Azul Systems Inc.
 
The Java Evolution Mismatch - Why You Need a Better JVM
Azul Systems Inc.
 
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Azul Systems Inc.
 
Lock-Free, Wait-Free Hash Table
Azul Systems Inc.
 
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
Azul Systems Inc.
 
What's Inside a JVM?
Azul Systems Inc.
 
Zulu Embedded Java Introduction
Azul Systems Inc.
 
Java vs. C/C++
Azul Systems Inc.
 
C++vs java
Pradeep wolf king
 
Ad

Similar to Webinar: Zing Vision: Answering your toughest production Java performance questions (20)

PDF
TechGIG_Memory leaks in_java_webnair_26th_july_2012
Ashish Bhasin
 
PPTX
Mobile Application Development- Configuration and Android Installation
Dr. Chandrakant Divate
 
PDF
Explore Android Internals
National Cheng Kung University
 
PDF
Visual Studio Profiler
Betclic Everest Group Tech Team
 
PDF
The Diabolical Developers Guide to Performance Tuning
jClarity
 
PDF
Introduction to-automated-testing
BestBrains
 
PDF
Introduction to Automated Testing
Lars Thorup
 
PPT
Android OS
Nitin Ramchandani
 
PPTX
Diagnosing issues in your ASP.NET applications in production with Visual Stud...
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
PPTX
mobile development with androiddfdgdfhdgfdhf.pptx
NgLQun
 
PDF
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
ConSol Consulting & Solutions Software GmbH
 
PDF
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
ConSol Consulting & Solutions Software GmbH
 
PDF
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
Tech in Asia ID
 
PDF
we45 DEFCON Workshop - Building AppSec Automation with Python
Abhay Bhargav
 
PPTX
Time Series Anomaly Detection with Azure and .NETT
Marco Parenzan
 
PPTX
Manage your devices with Azure IoT...and more
Marco Parenzan
 
PPTX
Aspect j introduction for non-programmers
Tamas Rev
 
PDF
"Automated Malware Analysis" de Gabriel Negreira Barbosa, Malware Research an...
SegInfo
 
PDF
Introduction to the IBM Java Tools
Chris Bailey
 
PPTX
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug Java
idrsolutions
 
TechGIG_Memory leaks in_java_webnair_26th_july_2012
Ashish Bhasin
 
Mobile Application Development- Configuration and Android Installation
Dr. Chandrakant Divate
 
Explore Android Internals
National Cheng Kung University
 
Visual Studio Profiler
Betclic Everest Group Tech Team
 
The Diabolical Developers Guide to Performance Tuning
jClarity
 
Introduction to-automated-testing
BestBrains
 
Introduction to Automated Testing
Lars Thorup
 
Android OS
Nitin Ramchandani
 
Diagnosing issues in your ASP.NET applications in production with Visual Stud...
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
mobile development with androiddfdgdfhdgfdhf.pptx
NgLQun
 
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
ConSol Consulting & Solutions Software GmbH
 
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
ConSol Consulting & Solutions Software GmbH
 
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
Tech in Asia ID
 
we45 DEFCON Workshop - Building AppSec Automation with Python
Abhay Bhargav
 
Time Series Anomaly Detection with Azure and .NETT
Marco Parenzan
 
Manage your devices with Azure IoT...and more
Marco Parenzan
 
Aspect j introduction for non-programmers
Tamas Rev
 
"Automated Malware Analysis" de Gabriel Negreira Barbosa, Malware Research an...
SegInfo
 
Introduction to the IBM Java Tools
Chris Bailey
 
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug Java
idrsolutions
 
Ad

More from Azul Systems Inc. (16)

PDF
Advancements ingc andc4overview_linkedin_oct2017
Azul Systems Inc.
 
PDF
Understanding GC, JavaOne 2017
Azul Systems Inc.
 
PDF
Azul Systems open source guide
Azul Systems Inc.
 
PDF
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Azul Systems Inc.
 
PDF
Understanding Java Garbage Collection
Azul Systems Inc.
 
PDF
The evolution of OpenJDK: From Java's beginnings to 2014
Azul Systems Inc.
 
PDF
Push Technology's latest data distribution benchmark with Solarflare and Zing
Azul Systems Inc.
 
PDF
The Art of Java Benchmarking
Azul Systems Inc.
 
PDF
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Systems Inc.
 
PDF
Understanding Application Hiccups - and What You Can Do About Them
Azul Systems Inc.
 
PDF
JVM Memory Management Details
Azul Systems Inc.
 
PDF
JVM Mechanics: A Peek Under the Hood
Azul Systems Inc.
 
PDF
Enterprise Search Summit - Speeding Up Search
Azul Systems Inc.
 
PDF
Understanding Java Garbage Collection - And What You Can Do About It
Azul Systems Inc.
 
PDF
Enabling Java in Latency-Sensitive Applications
Azul Systems Inc.
 
PDF
Java at Scale, Dallas JUG, October 2013
Azul Systems Inc.
 
Advancements ingc andc4overview_linkedin_oct2017
Azul Systems Inc.
 
Understanding GC, JavaOne 2017
Azul Systems Inc.
 
Azul Systems open source guide
Azul Systems Inc.
 
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Azul Systems Inc.
 
Understanding Java Garbage Collection
Azul Systems Inc.
 
The evolution of OpenJDK: From Java's beginnings to 2014
Azul Systems Inc.
 
Push Technology's latest data distribution benchmark with Solarflare and Zing
Azul Systems Inc.
 
The Art of Java Benchmarking
Azul Systems Inc.
 
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Systems Inc.
 
Understanding Application Hiccups - and What You Can Do About Them
Azul Systems Inc.
 
JVM Memory Management Details
Azul Systems Inc.
 
JVM Mechanics: A Peek Under the Hood
Azul Systems Inc.
 
Enterprise Search Summit - Speeding Up Search
Azul Systems Inc.
 
Understanding Java Garbage Collection - And What You Can Do About It
Azul Systems Inc.
 
Enabling Java in Latency-Sensitive Applications
Azul Systems Inc.
 
Java at Scale, Dallas JUG, October 2013
Azul Systems Inc.
 

Recently uploaded (20)

PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 

Webinar: Zing Vision: Answering your toughest production Java performance questions

  • 1. Zing Vision Answering your toughest production Java performance questions
  • 2. Outline • What is Zing Vision? • Where does Zing Vision fit in your Java environment? • Key features • How it works • Using ZVRobot • Q&A ©2014 Azul Systems Inc. 2
  • 3. What is Zing Vision? • Zing Vision is a browser-based, visual window into the Zing VM – Hyperlinked display provides drill-down to root cause – Both JVM internal and Java program information – No additional performance overhead – Nothing special to install or configure – Easy to get started as a user – ZVRobot collects and stores monitoring data • Collected data is same as ZVision! ©2014 Azul Systems Inc. 3
  • 4. Example Zing Vision deployment HTTP Linux host Zing Vision (Web browser) zvision server HTTP Zing VM ©2014 Azul Systems Inc. 4
  • 5. Fitting in: Production focus • Most tools suitable for developers, but too ‘heavy’ for production • • • • Use JVMTI (JVM Tools Interface) and BCI (Byte Code Instrumentation) High overhead, so must be used carefully in production May require configuration to lower the overhead Not practical for Operations teams • Zing Vision is designed for safe use on production systems • Ideal diagnostic tool to use when you know you have a problem in production (“a flashlight in a dark place”) • Integrated with the JVM, so it won’t add overhead or perturb the running Java program • It’s meant to be used - click on items in the web UI to explore! ©2014 Azul Systems Inc. 5
  • 6. Key features • Tick profiler • Thread-level views • Lock contention view • Garbage collection views • Java heap object views – Live objects – Object types that increase in number as application runs ©2014 Azul Systems Inc. 6
  • 7. Tick Profiler: Find “hot” code • Goal: Determine what code is hot (consuming most CPU time) • Approach used by other profiling tools: – Method tracing – Byte code instrumentation – heavy weight – Solution: Profile only a user-selected portion of the application – Drawback: You need to know the location in the code where the performance bottleneck occurs to select the area of the code to profile! ©2014 Azul Systems Inc. 7
  • 8. Tick Profiler: Find “hot” code Zing Vision uses runtime thread sampling: • Fast snapshots of the code running in executing Java threads • Identifies where the work is done in the application • Lightweight, low overhead – Always on – Even when you’re not looking at the generated metrics • Instruction-level granularity – JVM internal threads, too! • Detailed information about the entire process – Interpretation sometimes requires understanding of the JVM runtime ©2014 Azul Systems Inc. 8
  • 9. Tick Profiler: How it works 1. Thread registers SIG61 signal handler with kernel at intervals 1 ms (1000 times per second, configurable) 2. Thread runs 3. Kernel delivers SIG61 4. Thread is interrupted on its normal stack 5. Signal handler runs, creates a new (youngest) profile Youngest profile added 6. Zing Vision aggregates all of the profiles on the belt in the Timer Tick Profile view Oldest profile drops off… (into the trash) Tick profile conveyor belt has a fixed number of positions for profiles. Note that the conveyor belt only moves when a new profile is added! This means Zing Vision always shows the most recent data. ©2014 Azul Systems Inc. 9
  • 10. Tick Profiler: Where is work done? ©2014 Azul Systems Inc. 10
  • 11. Tick Profiler: Where is work done? Collection controllers Filters Select link to see details ©2014 Azul Systems Inc. 11
  • 12. Tick Profiler: Work at instruction level Callee | Caller Ticks for each instruction ©2014 Azul Systems Inc. C2 compiled JDK and application code 12
  • 13. Tick Profiler: How did I get here? ©2014 Azul Systems Inc. 13
  • 14. Tick Profiler: How did I get here? Sorted based on highest CPU consumers 0 com.sun.tools.javac.util.Name.fromUtf Top of stack Top of stack ©2014 Azul Systems Inc. 14
  • 15. Thread-level questions • What threads are executing my application? • What are the housekeeping threads for the JVM? • Can I examine a thread object? • What are the threads doing? – Profiling information – Stack traces • Where is my application stalled? ©2014 Azul Systems Inc. 15
  • 16. Thread-level views: Standard method Thread number: 1 2 3 4 5 Request thread stacks (kill -3) Some threads blocked – NO work done Thread 3 continues to run! Time Last thread stopped O(numThreads) delay  application visible work stoppage Resume threads ©2014 Azul Systems Inc. 16
  • 17. Thread-level views: Zing Vision method Thread number: 1 2 3 4 5 Request thread stacks (ZVision) Each thread: 1. Stopped individually 2. Delay order is O(1) Time No thread waits for any other thread to stop! The application never perceives a work stoppage because N-1 threads continue to run at all times Resume each thread seamlessly Pro: Safe to use in production (guilt-free clicking) Con: Not 100% consistent (especially for lock data) ©2014 Azul Systems Inc. 17
  • 18. Thread-level view: Application threads Filters and control Select link to see stack Individual thread stack trace and tick profile access ©2014 Azul Systems Inc. 18
  • 19. Thread-level view: Thread stack trace Thread CPU time consumed Stack frames Select link to see details ©2014 Azul Systems Inc. 19
  • 20. Thread-level view: Thread object details Values of the object’s fields ©2014 Azul Systems Inc. 20
  • 21. Thread-level view: Application threads Filters and control Select link to see profile Individual thread stack trace and tick profile access ©2014 Azul Systems Inc. 21
  • 22. Thread-level: Where is the work done? Thread 8120 ©2014 Azul Systems Inc. 22
  • 23. Lock contention: Where is my app stalled? Lock acquisition Total and Max times Blocking count Select link to see details ©2014 Azul Systems Inc. 23
  • 24. Lock contention: Where is my app stalled? How did I get to the contended lock in my code? Summary metrics ©2014 Azul Systems Inc. 24
  • 25. Memory: Answering your questions • What’s the collector doing? • How much memory is the application using? • What type of objects are in the heap? – What’s keeping those objects live? • What object types are increasing in number? ©2014 Azul Systems Inc. 25
  • 26. Memory: Resource use summary Java heap overview Process Zing memory use Linux memory ©2014 Azul Systems Inc. 26
  • 27. Memory: Collection details Collection details ©2014 Azul Systems Inc. 27
  • 28. Memory: Collection details summary Detailed summary calculating metric averages ©2014 Azul Systems Inc. 28
  • 29. Memory: What objects are in the heap? Objects in Old Generation Default sorting: Sum of size of each object of that type Expand to see types with references to objects of that type ©2014 Azul Systems Inc. 29
  • 30. Memory: Which object type is growing? Object types with increasing memory consumption in the Old Generation Selectable time interval Growth rate ©2014 Azul Systems Inc. 30
  • 31. Example ZVRobot deployment Linux host Linux host Write a file for each Zing Vision web page at each sample period (for example, every 1 minute) into a directory ZVRobot HTTP Zing VM Use a web browser to look at the saved snapshot files anytime after program has run or even during collection ©2014 Azul Systems Inc. 31
  • 32. How to Try Zing Vision - Free • Request a trial copy of Zing http://www.azulsystems.com/trial • Download and run Azul Inspector to check your system • Download and install Zing – Zing Vision and ZVRobot are included • Run your application • Observe your application and the JVM’s activity using Zing Vision ©2014 Azul Systems Inc. 32
  • 33. Questions? Zing Vision – providing answers to your Java performance questions • Tick profiler • Thread-level views • Lock contention view • Garbage collection views • Java heap object views • Live objects • Object types that increase in number as application runs ©2014 Azul Systems Inc. 33