Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |
Tools: | GC log analysers| Multi-tenancy tools| Books| SizeOf| Thread analysers| Heap dump analysers|

Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks! 

Training online: Concurrency, Threading, GC, Advanced Java and more ... 

News January 2020

Get rid of your performance problems and memory leaks!

Modern Garbage Collection Tuning
Shows tuning flow chart for GC tuning

Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:

Training online
Threading Essentials course

Get rid of your performance problems and memory leaks!

Back to newsletter 230 contents

I have a piece of advice for you, and a request from you. The piece of advice is to track the lifetime of your connections. The request is: please tell me if you know of any generic connection tracking tool. Read on to know why ...

Abstraction is essential for good programming, but the more you abstract, the deeper you hide what is actually happening. I'm seeing connections that have now been abstracted so much that in many cases it's not obvious how to most efficiently use the abstraction, leading to non-optimal levels of connection churn, and sometimes connection leaks.

For example, many connection pool implementations do not make it clear that you should be reusing the connection pool rather than creating a new one. I've seen code implementations that simply throw away the pool and create a new one - because the abstraction looks like that's the way it should be done, and not really because of programmer carelessness. Tests will not show any problems, even load tests will be fine ... up to a point when suddenly the system can't keep up with the connection churn and IO will start lagging dramatically. Chances are you'll only see it in production.

Sure if you started the service in your debugger and watched the threads, you'd see thread churn like mad, but it's actually unusual to be looking at that. Typically when debugging you'll be stepping through some problem, and in that state you are unlikely to see any connection churn.

So watch your connections (and the threads that manage them), and do tell me if you know of useful tools here. Now on to this month's tips, tools, news, articles and talks. And of course the tips from this month's articles and talks, as ever are extracted into this month's tips page.

A note from this newsletter's sponsor

Get rid of your performance problems and memory leaks!


Java performance tuning related news.


Java performance tuning related tools.


Jack Shirazi

Back to newsletter 230 contents

Last Updated: 2023-01-29
Copyright © 2000-2023 All Rights Reserved.
All trademarks and registered trademarks appearing on are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
RSS Feed:
Trouble with this page? Please contact us