Tsunami waves travel at the speed of 500 - 600 miles/hr. Normal waves travel at the speed of 5 - 60 miles/hr. Due to technical limitations, even massive Tsunamis are hard to forecast and detect beforehand. In recent times, hyper sensitive micro-metrics measuring technologies are employed to forecast Tsunamis. Similarly, it’s hard to forecast production performance problems beforehand. In this session you will learn the micro-metrics to be measured in dev/test environments that can forecast production performance problems with a fair level of accuracy.
3. How Tsunamis are detected?
Deep-ocean Assessment and Reporting of Tsunamis DART II
6000m = 20 x Eiffel tower 5 cm = height of credit card
6000m
Even if 5 cm change, alerts triggered
4. What are the micrometrics that you want to monitor?
1: What?
How to source these metrics?
2: How?
Where to use these metrics?
3: Where?
Agenda
5. Macro-metrics
3. Memory
2. CPU Utilization
1. Response Time
Can’t forecast problems
Primary Macro-metrics that are monitored today
6. Micrometrics
Monitor these metrics in addition to Macrometrics
2. GC Latency
1. Object
Creation Rate
4. Thread count
& states
3. GC
Throughput
6. File
Descriptors
5. Memory
wasted
7. 100 mb/sec
300 mb/secPrevious Release
Next Release
1. Object Creation rate
Amount of objects created in a unit of time
8. Previous release
2. Garbage Collection Latency
Amount of time application is paused for doing Garbage Collection
9. 99.675%
3. Garbage Collection Throughput
Productive work vs non-productive work
Percentage of time spent in processing customer transactions vs time
spent in GC activity.
10. 4. Thread Count & Thread States
Number of Threads and their states
12. 1: Duplicate Strings
2: Wrong memory size settings
3: Inefficient Collections
How all memory is wasted?
How all memory is wasted?
4: Duplicate Objects
5: Duplicate arrays
6: Inefficient arrays
7: Objects waiting for finalization
8: Boxed numbers
9: Overhead caused by Object Headers
13. 6. File Descriptors
Number of open File Descriptors
File Descriptors:
• Open File Handles
• Open Network connections
• Pipes
500
File Descriptors
2000
File Descriptors
Previous Release
Next Release
14. What are the micrometrics that you want to monitor?
1: What?
How to source these metrics?
2: How?
Where to use these metrics?
3: Where?
Agenda
15. How to enable Garbage Collection Logs?
Till Java 8:
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<file-path>
From Java 9:
-Xlog:gc*:file=<file-path>
Garbage Collection Logs
Tools
GCeasy.io
IBM Pattern Modeling and Analysis Tool for Java Garbage Collector
HP Jmeter
Google Garbage Cat
API
https://blog.gceasy.io/2016/06/18/garbage-collection-log-analysis-api/
1. Object Creation rate
2. GC Latency
3. GC Throughput
16. How to capture thread dumps?
jstack
jmc
jcmd
https://blog.fastthread.io/2016/06/06/how-to-take-thread-dumps-7-options/
Thread Dumps
Tools
fastThread.io
Custom Scripting
API
https://blog.fastthread.io/2016/10/27/thread-dump-analysis-api/
4. Thread count &
States
2. GC Latency
3. GC Throughput
17. How to capture Heap dumps?
Jstack
JMC
Jcmd
https://blog.fastthread.io/2016/06/06/how-to-take-thread-dumps-7-options/
Heap Dumps
Tools
Eclipse MAT
HeapHero.io
Jhat
API
https://blog.heaphero.io/2018/06/22/heap-dump-analysis-api/
4. Memory Wasted
2. GC Latency
3. GC Throughput
18. What are the micrometrics that you want to monitor?
1: What?
How to source these metrics?
2: How?
Where to use these metrics?
3: Where?
Agenda
19. CI/CD
Performance Tests
Production
CI/CD
Fail the build if any of
the micrometrics
thresholds are breached
Performance Tests
Examine micrometrics in
each release
Production
You can use this
micrometrics for
production monitoring
Where?
Where to use these metrics?