quality@glassfish.java.net

Reducing Memory Footprint

From: Harald Wellmann <harald.wellmann_at_gmx.de>
Date: Fri, 03 Jun 2011 13:37:57 +0200

Glassfish pre-3.1 used to have severe memory issues, mainly due to Weld
which I'm glad to say are gone since integrating Weld 1.1.1.Final.

On the other hand, Glassfish still uses excessive amounts of memory, now
due to its own internal structures.

Deploying the same WAR to two different servers, triggering GC and
taking a heap dump with Eclipse Memory Analyzer, I get the following
measurements:

Glassfish 3.1.1-b06 ~250M
Resin 4.0.pre19 ~ 60M

A slightly different version of the same app running on Tomcat 6 and
Spring 3 has a footprint of ~ 50M.

As long as these figures don't change, it will be next to impossible to
convince people to move from custom Tomcat-based solutions to Glassfish.

The Memory Analyzer clearly identifies the culprit, please see
http://java.net/jira/browse/GLASSFISH-16747 for details.

It seems the root cause is still the same as reported in GLASSFISH-15266
during the 3.1 stabilization phase.

I do hope someone can look into this issue and fix it before the 3.1.1
release.

Best regards,
Harald