Memory usage comparison of Java Application Servers and Applications

How much memory related resources you will need to run a Java application server or a Java application within Java Virtual Machine? To give you an estimate we tested some popular ones and are publishing results below. The survey will be updated as needed.

As you start to access your application the memory usage will grow as dynamically created objects will be allocating memory from heap, classes previously unloaded can be loaded again and native code compilation may be taking place.

The application servers are in pristine and idle state – installed and started within a JVM with JMX support. The same approach has been applied to applications.

You can see high non-heap PermGen memory usage when you have number of classes loaded for example with a comprehensive framework like Grails. In such cases PermGen JVM limit tuning may be necessary (for example -XX:MaxPermSize=96m added to $JAVA_OPTS environment variable). At JVM Host we can change MaxPermSize on request.

JVM Heap memory [MB] JVM Non-Heap memory [MB] Loaded Clases Live Threads
Eden Survivor Old Total CodeCache PermGen Total
Tomcat 6.0.33
JDK 1.6.0_29 64bit
4 1 6 11 1 15 16 2183 20-23
Tomcat 6 memory usage graph
Tomcat 7 (7.0.22)
JDK 1.6.0_29 64bit
5 1 7 13 2 19 21 2253 18-21
Tomcat 7 memory usage graph
TomEE Webprofile 1.0.0
JDK 1.6.0_31 64bit
5 1 10 16 3 35 38 4810 37-45
TomEE Webprofile 1.0.0 memory usage graph
Tomcat 7 (7.0.22)
with Grails 1.3.7 application
JDK 1.6.0_26 64bit
9 1 62 72 7 75 82 6609 21-23
Tomcat 7 with Grails 1.3.7 memory usage graph
Tomcat 7 (7.0.22)
with Grails 1.3.7 another application
JDK 1.6.0_26 64bit
2 2 50 54 6 62 68 7374 25-30
Tomcat 7 with Grails memory usage graph
Tomcat 7 (7.0.22)
with Grails 1.3.7 yet another application
JDK 1.6.0_29 64bit
6 7 66 79 7 68 75 8660 30-36
Tomcat 7 with Grails memory usage graph
Tomcat 7.0.23
Cyclos 3.6
JDK 1.6.0_27 64bit
28 1 91 120 6 73 79 10860 48
Tomcat 7 with Cyclos 3.6 memory usage graph
Jetty Hightide 8.0.1
JDK 1.6.0_25 64bit
5 1 17 23 3 22 25 2871 49-52
Jetty Hightide 8.0.1 memory usage graph
JBoss AS Web 7.0.2
JDK 1.6.0_29 64bit
6 1 12 19 2 39 41 5640 45-48
JBoss AS Web 7.0.2 memory usage graph
GlassFish 3.1.1 Web
JDK 1.6.0_27 64bit
29 1 24 54 3 42 45 4942 45-47
GlassFish 3.1.1 Web memory usage graph

More graphs and data to come.

This entry was posted in Java, JBoss, Tomcat. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


nine × = forty five

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>