An old wise man once said "Understanding where the problem resides is the first step to solving it" This short talk will show how finding the nature of performance problem can be easily identified by simple JMX exposed by the JVM. And yes quoting my own sentences as old wisdom make them sound more reliable.
5. CPU Bound Code
• Number crunching code usually due to wrong data
structure and algorithms
• High CPU consumption
• No GC activity
• MBean : java.lang.Threading::getThreadCpuTime
7. Lock Contention
• High latency on high load
• Cannot max out CPU with increasing load on system
• Thread stacks have locked threads
• java.lang.Threading :: getThreadInfo
8. Excessive Memory Allocation
• High CPU consumption
• High rate of memory allocation
• MBean : java.lang.Threading::GetThreadAllocatedBytes
9. Heap Exhaustion
• High CPU consumption
• Frequent GC triggering
• Heap usage after GC is higher than old generation
• MBean: java.lang.GarbageCollector
• CollectionTime
10. Java Thread Top
• Open source project
• https://github.com/lifey/Java-threadTop
• connects to a process via JMX
• Collects data over an interval of 5 seconds
12. Java Thread Top - Contention
• Open source project
• https://github.com/lifey/Java-threadTop
• connects to a process via JMX
• Collects data over an interval of 5 seconds