Java Thread Dump Analysis

Thread dump analysis is a traditional approach followed to analyze the performance bottlenecks in Java-based applications. In the modern era, we have APM tools that provide various metrics and screens to drill down and identify performance issues, even at the code level. But for some of the performance issues or occasions, thread dump analysis still stands as the best way to identify the bottlenecks. 

When To Use a Thread Dump

To analyze any performance issue, it is good to take a series of thread dumps with a 1 to 2-second time gap. Taking 10-15 thread dumps each with 1-2 second intervals helps to analyze the threads that got stuck or execute the same code across thread dumps.

API Performance Tuning

APIs/Services performance plays an important role in providing a better experience to the users. There are many ways available through which we can make our APIs/services perform better. In this article, we are going to see some such tips to improve the performance of the APIs/Services. 

Below are some of the metrics that we need to consider while optimizing the performance of APIs/Services:

Resolving the Memory Saturation Error

In this blog, we are going to look at the resolution to the memory saturation error reported by Dynatrace on a machine that hosts multiple JVMs. 

The memory saturation error is thrown from Dynatrace when the memory usage goes beyond 80% and the page faults go beyond 20-page faults/second on a Linux machine. 

The Importance of Access Logs in Performance Issue Analysis

An access log is generated by the web server to log the details about the request that it has processed. It logs status code, response time, URL, protocol, size, client IP address, etc., about the request.  Load Balancers will have similar log files created to log the request details. While doing any performance analysis, these logs play an important role. It is being neglected most of the time due to lack of awareness and the usage of APM tools abstracts it from the users by allowing them to focus visually on coarse-grained data instead of fine-grained data. Most people are aware of the application server log but many of them are not aware of the web server/load balancer access log. Most of the time, this log will not be striking in the mind of a person who investigates the problem.

Access logs are available for the below servers while the format for each of them varies: