How to improve Java Performance with SpyGlass Tools
Java Performance Optimization is a very difficult task because it requires a lot of different competences: Java language, Application Server and OS configuration, DBMS and so on...
Here, we don't want to present an exhaustive solution to performance optimization management, but we'd like to offer a simple guide about how to approach the optimization process.
1. Define what you're expecting as slow and what you're expecting as performant activity: i.e. a web page is slow when user has to wait more than x seconds, a task is slow if it needs more than x seconds. This is a mandatory step, because you have to define your goal and what are possible point that do not respect you threshold.
For example you can use SpyGlass Tracer Trace tab to create a list of transactions that require optimization:
2. Analyze you code with your IDE, debugger, profiler to find out why a specific transaction identified as slow is slow. Most of the time you are able to address the problem, but sometime not because it is related to data, conditions or other factor that are available only in a production environment. So you have to operate there, probably in real time. So you need a tool that supports you in drill down analysis.
Profilers usually create to much overhead to operate in production. Debug is possible, but usually is not a good approach for security and privacy reasons.
The best solution is application metrics and execution trace analysis. Both of which can be easily performed with SpyGlass Tracer.
Below you can see how SpyGlass Tracer can drill down in your application code execution and can help you to identify slow code:
SpyGlass Tracer is designed to simplify application bottleneck identification presenting only useful data and avoiding noise related problem typical of a high transaction systems.
3. Discuss your result with Operations, Q/A and Development team to identify the best solution and implement it.
4. Repeat with the next problematic transaction.
In in our experience you can identify most of your problems monitoring in real time you application for less than a week.