SlideShare a Scribd company logo
1 of 50
Java Performance
Chapter 5
Saurav Basu
6/3/2020
1
Organization
1. Strategies, Approaches, and Methodologies
2. Operating System Performance Monitoring
3. JVM Overview
4. JVM Performance Monitoring
5. Java Application Profiling
6. Java Application Profiling - Tips & Tricks
7. Tuning the JVM - Step by Step
8. Benchmarking Java Applications
9. Benchmarking Multitiered Applications
10. Web Application Performance
11. Web Services Performance
12. Java Persistence & Enterprise Java Beans Performance
2
JAVA Application Profiling
3
● Intrusive collection of performance data
● Test, Development Environment
● Reactive or Planned
JAVA Application Profiling
4
Sno Name Platform
1 Performance Analyzer Solaris/Linux
2 NetBeans Profiler Windows/Linux/Solaris
3 Code Analyst Linux/Windows
4 VTune Windows
JAVA Application Profiling
5
SNo Capability
1 Native Level
2 Running/Paused/Blocked Thread
3 Wait vs Read Time differentiation
4 Monitor or Lock Information
Performance Analyser Features
JAVA Application Profiling
6
SNo Type Description
1 Method Execution time of method
2 Memory Number, size and method of object allocation
Profile Types
JAVA Application Profiling
7
SNo Type Description
1 Profiler Tool that shows behavior of jvm java & native code
2 Profile File that contains information collected by Profiler
3 Overhead Time spent by the profiler collecting the profile information
4 Call Tree Listing of methods in a call stack
5 Filter Artifact that narrows scope of collected profile information
Terminology
JAVA Application Profiling
8
SNo Type Description
1 Experiment Artifact produced by collecting a profile of an application
2 collect Command line tool used to collect an experiment or profile by profiling and tracing function usage
3 Analyser GUI used to view collected experiment
4 er_print Command line tool used to view collected experiment
5 Inclusive time Time taken to execute a method and submethods
6 Exclusive time Time taken to execute a method excluding submethods
7 Attributed time Time attributed to a method
8 Caller Calee A relationship of a method either being called by some
method (a caller), or a method being called by some other method (a callee)
9 System CPU Elapsed execution time within operating system kernel
10 User CPU Elapsed execution time outside operating system kernel
Oracle Performance Analyser Terminology
JAVA Application Profiling
9
SNo Type Description
1 Instrumentation insertion of counters, timers into java byte code to be profiled
2 Heap The memory pool used by JVM for objects allocated with new keyword
3 Garbage
collection
Operation responsible for cleanup of unused java objects from Heap
4 Memory leak Unused object that cannot be collected due to one or more objects holding references
5 Self time The amount of time needed to execute the instructions in a method excluding submethods
6 Hot spot Method with large Self Time
7 Root method Method selected for performance profiling
NetBeans Profiler Terms
JAVA Application Profiling
10
Solaris Studio Performance Analyer
● Both Java & native code (Java,C,C++,Fortran)
● Method Profiling
● Monitor/Lock Profiling
JAVA Application Profiling
11
Solaris Studio Performance Analyer
1. Category - User CPU, System CPU, Lock contention
2. Within each Category - Inclusive Time & Exclusive Time
JAVA Application Profiling
12
Solaris Studio Performance Analyzer
Collect Analyze
.er file
Phase 1 Phase 2 analyzer
er_print
JAVA Application Profiling
13
Solaris Studio Performance Analyer
Collect Command
collect -j on java -jar Java2Demo.jar
JAVA Application Profiling
14
Solaris Studio Performance Analyer
Collect Options
-o <experimentFile> Create experiment file name with specified name
-d <experimentDirectoryPath> Put Experiment file in specified directory
-p <option> (on| lo| hi) Frquency of sample collection (default 10ms)
-A <option> (on|off|copy) Application artifact archived or copied
-y <signal> Toggle data collection based on specifeid signal
-h <cpu counter> (Solaris) Specify cpu counter (ex cache miss,TLB miss etc.
JAVA Application Profiling
15
Solaris Studio Performance Analyer
Collect Options
collect -j on -y SIGUSR1 java -jar Java2Demo.jar
JAVA Application Profiling
16
Solaris Studio Performance Analyer
View Collected Experiment
1. Analyzer GUI
2. Er_print (CommandLine)
JAVA Application Profiling
17
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
JAVA Application Profiling
18
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
JAVA Application Profiling
19
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI Toolbar
JAVA Application Profiling
20
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
SNo Icon Description
1 Open experiment File
2 Combine an experiment’s data to an existing experiment
3 Drop an experiment’s results from the experiments already
loaded
4 Collect an experiment
5 Print the listing of data currently displayed in the Analyzer
JAVA Application Profiling
21
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
SNo Icon Description
6 Create a new Analyzer window with the same experiment file loaded in both windows
7 Close and exit the Analyzer GUI program
8 Modify the category of information to display
9 Filter the data presented
10 Show and/or hide APIs or methods
11 Switches to alternative viewing modes: User, Expert, Machine
JAVA Application Profiling
22
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
SNo TabName Description
1 Summary Shows all the recorded metrics for the selected object, both as values and
percentages, and information on the selected object
2 Event Shows the available data for the selected Java method, source code line, or program
counter, including the event type, method name, LWP Id, threadId, and CPU Id
JAVA Application Profiling
23
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
JAVA Application Profiling
24
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
JAVA Application Profiling
25
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
Cumulative
execution time
JAVA Application Profiling
26
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
Highest Exec Time
JAVA Application Profiling
27
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
JAVA Application Profiling
28
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
JAVA Application Profiling
29
Solaris Studio Performance Analyer
View Collected Experiment
Analyzer GUI
Create Call Stack
Fragment
JAVA Application Profiling
30
Solaris Studio Performance Analyzer
View Collected Experiment
Analyzer GUI
Call Stack Fragment
Fragment Specific Metric
JAVA Application Profiling
31
Solaris Studio Performance Analyzer
View Collected Experiment
Analyzer GUI
Hot Method
JAVA Application Profiling
35
Solaris Studio Performance Analyer
View Collected Experiment
Filter
Filter Expression
JAVA Application Profiling
36
Solaris Studio Performance Analyer
View Collected Experiment
er_print
JAVA Application Profiling
37
Solaris Studio Performance Analyer
View Collected Experiment
er_print
JAVA Application Profiling
38
Solaris Studio Performance Analyer
View Collected Experiment
er_print
JAVA Application Profiling
39
Solaris Studio Performance Analyer
View Collected Experiment (er_print)
SNo MetricName
1 totalcpu
2 heapallocbytes
3 heapalloccnt
4 heapleakbytes
5 heapleakcnt
6 ioreadtime
7 ioreadbytes
8 ioreadcnt
9 iowritetime
10 iowritebytes
11 iowritecnt
12 ioothertime
13 ioothercnt
14 ioerrortime
15 ioerrorcnt
JAVA Application Profiling
40
NetBeans IDE Profiler (8.0.2)
Low Overhead
CPU performance
Memory Profile
Leak Detection
JAVA Application Profiling
41
NetBeans IDE Profiler (8.0.2)
Thread &
Lock Profile
JAVA Application Profiling
42
NetBeans IDE Profiler (8.0.2)
JAVA Application Profiling
43
NetBeans IDE Profiler (8.0.2)
Option choice
JAVA Application Profiling
44
NetBeans IDE Profiler (8.0.2)
JAVA Application Profiling
45
NetBeans IDE Profiler (8.0.2)
JAVA Application Profiling
46
NetBeans IDE Profiler (8.0.2)
JAVA Application Profiling
47
NetBeans IDE Profiler (8.0.2)
JAVA Application Profiling
48
NetBeans IDE Profiler (8.0.2)
JAVA Application Profiling
49
NetBeans IDE Profiler (8.0.2)
JAVA Application Profiling
50
NetBeans IDE Profiler (8.0.2)
JAVA Application Profiling
51
NetBeans IDE Profiler (8.0.2)
JAVA Application Profiling
52
NetBeans IDE Profiler (8.0.2)
Allocation Stack Trace
JAVA Application Profiling
53
NetBeans IDE Profiler (8.0.2)
Heap Dump:Offline Memory Profile

More Related Content

What's hot

Automation Framework 042009 V2
Automation Framework   042009  V2Automation Framework   042009  V2
Automation Framework 042009 V2guestb66d91
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Gopi Raghavendra
 
Profiler Guided Java Performance Tuning
Profiler Guided Java Performance TuningProfiler Guided Java Performance Tuning
Profiler Guided Java Performance Tuningosa_ora
 
OrientDB - The 2nd generation of (multi-model) NoSQL
OrientDB - The 2nd generation of  (multi-model) NoSQLOrientDB - The 2nd generation of  (multi-model) NoSQL
OrientDB - The 2nd generation of (multi-model) NoSQLRoberto Franchini
 

What's hot (6)

JVM
JVMJVM
JVM
 
ssssssssss
ssssssssssssssssssss
ssssssssss
 
Automation Framework 042009 V2
Automation Framework   042009  V2Automation Framework   042009  V2
Automation Framework 042009 V2
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)
 
Profiler Guided Java Performance Tuning
Profiler Guided Java Performance TuningProfiler Guided Java Performance Tuning
Profiler Guided Java Performance Tuning
 
OrientDB - The 2nd generation of (multi-model) NoSQL
OrientDB - The 2nd generation of  (multi-model) NoSQLOrientDB - The 2nd generation of  (multi-model) NoSQL
OrientDB - The 2nd generation of (multi-model) NoSQL
 

Similar to JavaPerformanceChapter_5

Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profilerIhor Bobak
 
Web Sphere Problem Determination Ext
Web Sphere Problem Determination ExtWeb Sphere Problem Determination Ext
Web Sphere Problem Determination ExtRohit Kelapure
 
JavaPerformanceChapter_4
JavaPerformanceChapter_4JavaPerformanceChapter_4
JavaPerformanceChapter_4Saurav Basu
 
The_Little_Jenkinsfile_That_Could
The_Little_Jenkinsfile_That_CouldThe_Little_Jenkinsfile_That_Could
The_Little_Jenkinsfile_That_CouldShelley Lambert
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Alexandre (Shura) Iline
 
Performance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle CoherencePerformance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle Coherencearagozin
 
JDK Tools For Performance Diagnostics
JDK Tools For Performance DiagnosticsJDK Tools For Performance Diagnostics
JDK Tools For Performance DiagnosticsBaruch Sadogursky
 
Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Ryan Cuprak
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeterlethibichhoa
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderIsuru Perera
 
Software Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaSoftware Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaIsuru Perera
 
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at RuntimeOSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at RuntimeNETWAYS
 
Q con shanghai2013-罗婷-performance methodology
Q con shanghai2013-罗婷-performance methodologyQ con shanghai2013-罗婷-performance methodology
Q con shanghai2013-罗婷-performance methodologyMichael Zhang
 
Practical SPARQL Benchmarking Revisited
Practical SPARQL Benchmarking RevisitedPractical SPARQL Benchmarking Revisited
Practical SPARQL Benchmarking RevisitedRob Vesse
 

Similar to JavaPerformanceChapter_5 (20)

Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
 
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion MiddlewareAMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
 
Profiling documentforaltrec
Profiling documentforaltrecProfiling documentforaltrec
Profiling documentforaltrec
 
Web Sphere Problem Determination Ext
Web Sphere Problem Determination ExtWeb Sphere Problem Determination Ext
Web Sphere Problem Determination Ext
 
JavaPerformanceChapter_4
JavaPerformanceChapter_4JavaPerformanceChapter_4
JavaPerformanceChapter_4
 
Visual Studio Profiler
Visual Studio ProfilerVisual Studio Profiler
Visual Studio Profiler
 
The_Little_Jenkinsfile_That_Could
The_Little_Jenkinsfile_That_CouldThe_Little_Jenkinsfile_That_Could
The_Little_Jenkinsfile_That_Could
 
Struts2 - 101
Struts2 - 101Struts2 - 101
Struts2 - 101
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.
 
Performance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle CoherencePerformance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle Coherence
 
JDK Tools For Performance Diagnostics
JDK Tools For Performance DiagnosticsJDK Tools For Performance Diagnostics
JDK Tools For Performance Diagnostics
 
Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeter
 
Selenium With Spices
Selenium With SpicesSelenium With Spices
Selenium With Spices
 
Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight Recorder
 
Software Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaSoftware Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in Java
 
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at RuntimeOSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
 
Q con shanghai2013-罗婷-performance methodology
Q con shanghai2013-罗婷-performance methodologyQ con shanghai2013-罗婷-performance methodology
Q con shanghai2013-罗婷-performance methodology
 
Practical SPARQL Benchmarking Revisited
Practical SPARQL Benchmarking RevisitedPractical SPARQL Benchmarking Revisited
Practical SPARQL Benchmarking Revisited
 

More from Saurav Basu

JavaPerformanceChapter_12
JavaPerformanceChapter_12JavaPerformanceChapter_12
JavaPerformanceChapter_12Saurav Basu
 
JavaPerformanceChapter_9
JavaPerformanceChapter_9JavaPerformanceChapter_9
JavaPerformanceChapter_9Saurav Basu
 
JavaPerformanceChapter_11
JavaPerformanceChapter_11JavaPerformanceChapter_11
JavaPerformanceChapter_11Saurav Basu
 
JavaPerformanceChapter_10
JavaPerformanceChapter_10JavaPerformanceChapter_10
JavaPerformanceChapter_10Saurav Basu
 
JavaPerformanceChapter_8
JavaPerformanceChapter_8JavaPerformanceChapter_8
JavaPerformanceChapter_8Saurav Basu
 
Java PerformanceChapter_7
Java PerformanceChapter_7Java PerformanceChapter_7
Java PerformanceChapter_7Saurav Basu
 
JavaPerformanceChapter_6
JavaPerformanceChapter_6JavaPerformanceChapter_6
JavaPerformanceChapter_6Saurav Basu
 
JavaPerformanceChapter_3
JavaPerformanceChapter_3JavaPerformanceChapter_3
JavaPerformanceChapter_3Saurav Basu
 
JavaPerformanceChapter_2
JavaPerformanceChapter_2JavaPerformanceChapter_2
JavaPerformanceChapter_2Saurav Basu
 
JavaPerformanceChapter_1
JavaPerformanceChapter_1JavaPerformanceChapter_1
JavaPerformanceChapter_1Saurav Basu
 
Application Deployment Architecture
Application Deployment ArchitectureApplication Deployment Architecture
Application Deployment ArchitectureSaurav Basu
 

More from Saurav Basu (11)

JavaPerformanceChapter_12
JavaPerformanceChapter_12JavaPerformanceChapter_12
JavaPerformanceChapter_12
 
JavaPerformanceChapter_9
JavaPerformanceChapter_9JavaPerformanceChapter_9
JavaPerformanceChapter_9
 
JavaPerformanceChapter_11
JavaPerformanceChapter_11JavaPerformanceChapter_11
JavaPerformanceChapter_11
 
JavaPerformanceChapter_10
JavaPerformanceChapter_10JavaPerformanceChapter_10
JavaPerformanceChapter_10
 
JavaPerformanceChapter_8
JavaPerformanceChapter_8JavaPerformanceChapter_8
JavaPerformanceChapter_8
 
Java PerformanceChapter_7
Java PerformanceChapter_7Java PerformanceChapter_7
Java PerformanceChapter_7
 
JavaPerformanceChapter_6
JavaPerformanceChapter_6JavaPerformanceChapter_6
JavaPerformanceChapter_6
 
JavaPerformanceChapter_3
JavaPerformanceChapter_3JavaPerformanceChapter_3
JavaPerformanceChapter_3
 
JavaPerformanceChapter_2
JavaPerformanceChapter_2JavaPerformanceChapter_2
JavaPerformanceChapter_2
 
JavaPerformanceChapter_1
JavaPerformanceChapter_1JavaPerformanceChapter_1
JavaPerformanceChapter_1
 
Application Deployment Architecture
Application Deployment ArchitectureApplication Deployment Architecture
Application Deployment Architecture
 

Recently uploaded

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Recently uploaded (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

JavaPerformanceChapter_5

Editor's Notes

  1. Next we will talk about java application profiling
  2. Intrusive to responsiveness & throughput of application Reactive - in response to production issue Planned - specific performance requirements are known
  3. Example of application profilers and the supported platforms
  4. List of Performance Analyser features
  5. Types of Profile
  6. Description of profler terminology
  7. Descrioption of oracle analyser terminology
  8. Description of netbean profiler terminology
  9. can be used to profile C, C++, and Fortran based applications As a java profiler most useful as most useful as a method profiler and Java monitor/lock profiler
  10. Data that is displayed in Performance Analyser
  11. This slide shows the two distinct steps to profiling. The first is collecting an experiment using the Performance Analyzer’s collect command The second step, analysis, is viewing the collected experiment and analyzing its results with either the Performance Analyzer’s Analyzer GUI tool or er_print
  12. Execution of the collect command results in generation of test.1er file in directory where this command is run
  13. List of options to collect comand
  14. This is an example of Delay profile data collection based on specified signal (application warmup)
  15. two ways to view the collected data in the experiment file. One way is using the GUI, called the Analyzer, and the second way is using a command line tool called er_print
  16. The Analyzer can be launched with the name of the experiment to load. Assuming an experiment named test.1.er, the Analyzer loads the test.1.er experiment auto- matically by executing the displayed command
  17. View of the Open experiment dialog box
  18. Default analyzer View
  19. Analyzer Tool bar icon description
  20. Analyzer Tool bar icon description
  21. There are two tabs on the right panel of the default Analyzer GUI view, a Summary tab and Event tab. Information found on the Summary and Event tabs on the right panel are described above
  22. Useful Tabs → Functions, Call Tree, Callers-Callees, Source, and Disassembly
  23. The default view for the Functions tab lists inclusive and exclusive User CPU columns for Java methods in the Java application and orders the list of methods in decreasing order of exclusive User CPU time
  24. The Call Tree tab shows the hierarchy of calls where an application spends its time. This view offers the ability to quickly recognize at a high level and in what use case(s) an application spends most of its time The time and percent shown at each node in the Call Tree is the cumulative time spent both in the method represented by the node and everything it calls
  25. Identify method with highest percentage execution time among all the methods that consitute the total execution time (As shown in this slide the render method has highest contribution to total time to execute of the paint method)
  26. In this slide notice that the sum of attributed metrics for the callees and the selected method add up to the inclusive metric for the center method
  27. In this slide notice that the sum of attributed metrics for the callers add up to the inclusive metric for the center method
  28. In this slide notice that the add method can be used to create custom call stack fragment
  29. In this slide notice that attributed metric for center method is updated once caller is added to the call stac/k fragment
  30. This slide shows the use of the functions tab to identify hot methods Complementary to using the Call Tree, is to analyze the experiment using the Functions tab and identifying the hottest methods in the applica- tion. This approach focuses more on improving the implementation of a specific method. (As shown in this slide Blit.Blit method is identified as a hot method)
  31. This slide shows a description of analyzer tabs. Functions and Call Tree are the most useful are highlighted in green.
  32. Description of analyser tabs continued
  33. This slide shows difference between User Expert and Machine modes of view
  34. Filter timeline to narrow investigation to specific time interval
  35. This slide shows the usage of the er_print command. The er_print command line utility prints an ASCII text version of the various displays found in the Performance Ana- lyzer GUI such as method lists and callers-callees of User CPU, System CPU, and User Lock consumers Er_Print command Syntax --------------------------------------- The text between [ and ] means the arguments are optional. Text demarcated by | means any of the options can be used between the | characters. And text between < and > means a name of a script or file that you have created is required, or an er_print command is required. When the -script option is not used, er_print reads commands from the command line
  36. This slide shows example usage of the er_print command to print the top 10 hottest methods sorted by exclusive user cpu time. The limit command tells er_print to limit the number of methods printed with the functions command to the number of methods given as an argument to the limit command The csingle command prints the callers-callees of the method name passed as an argument to the csingle command
  37. This slide shows example usage of the filter outfile and viewmode commands. Filters command = limit the samples to specific interval, multiple intervals separated by comma Outfile command = specify name of output file Viewmode command = change to user,expert or machine mode
  38. This slide lists the available metrics in analyzer
  39. Next we will talk about the features of the netbeans profiler Low Overhead : You can control the profiler’s performance impact on your application. Based on your selections, the performance impact ranges from extensive to none CPU performance profiling: Time spent in every method of your application or just in selected methods can be reported Memory profiling: You can check for excessive object allocations Memory leak detection:The profiler’s statistical reports make it easy todetect object instances that are leaking
  40. This slide shows the usage of the monitor tab in netbeans Menu -->Attach Profiler-->Open Dialog Option View → Default Monitor allows thread and lock contention monitor with minimal overhead
  41. This slide describes the default monitor view Default monitor view displays live thread state and jvm memory information in telemetry overview panel as shown in this slide
  42. This slide describes the steps to obtain a cpu profile From Menu -->Attach Profiler-->Choose CPU option on the left and ensure default quick sample radio button is selected
  43. This slide shows the location of the the Live Results View of the Profiler
  44. This slide shows the function hotspots ordered in descending order of self time consumed
  45. This slide shoes feature in netbeans profiler to take snapshot stack state
  46. This slide shows the Call Tree View of the Snapshots View
  47. Clicking on the the combined tab on the lower right shows both call tree and hot spot function as shown in this slide
  48. This slide shows that by clicking a method in the Hot Spot list will find that method’s entry in the Call Tree making it easy to see the relationship between a method’s root and the hot spot
  49. Next we look at the memory tab. From Menu -->Attach Profiler-->Choose Memory option on the left and check the record full object lifecycle and record stack trace checkboxes.
  50. This slide describes the avg age and generations tab of net beans profiler. Avg. Age. Average age of the Live Objects. The age of each object is the num- ber of garbage collections that it has survived. The sum of the ages divided by the number of Live Objects is the Avg. Age. Generations. Calculated using the Live Objects. The Generations value is the number of different ages for the Live Objects. An increasing value of generations is a sign of a memory leak
  51. This slide show allocation call tree for an object Click on Take Snapshot and Right Click Object to see the allocation stack trace ( Detailed breakup of the method which allocated object on heap)
  52. This slide shows example of offline heap dump analysis in netbean profiler. A binary heap dump is a snapshot of all the objects in the Java HotSpot VM at the time the heap dump is taken Click Profile -> Load Heap Dump for offline analysis of Memory Dump file useful to troubleshoot OOMemory Error Heap dump can be generated with jmap command In this slide, the highlighted numbers show that 16.4% of total heap allocation is attributed to char[]