Adam Bien's Weblog

Thursday Aug 21, 2008

Remote (IIOP) EJB 3 / JPA 1.0, No Think Time, 100 Virtual Users, 4-Way Machine, Glassfish v2u2 Clustered - ...and What is The Performance?

I just completed some load tests with Glassfish v2ur2 on Linux, Clustered, a 4 way, Intel based machine and JDK 1.5 (JDK 1.6 would be better, but was not available in this case). I used a simple CRUD application as load generator, without think-time, and almost empty database, just to stress the appserver as much as possible.

The two load-generators ran remotely (via IIOP, standard EJB 3 client), each with 50 virtual users. Glassfish passed all tests without any problems, the response times and transaction / seconds were very stable. We just increased the number of connnections in the JDBC-pool, and set the -Xmx to 512m: no further tuning was performed.

The performance was impressive: 250 - 500 Transactions / second (we weren't alone on the machine :-(). We performed the tests with another, commercial, application server as well. The results were similar.

I actually performed similar, but not comparable, test several years ago (around 2003) with EJB 2. / CMP 2.0. We had more load generators (250 - 300 virtual users) available and were able to execute 800 transactions / seconds.

Conclusion: The performance of even remote (IIOP!) EJB 3 rocks :-), and Glassfish performs well, even without any further tuning.

In real world, however, most of the performance gets lost in contention / locks and synchronization issues... But you should not blame your server / framework / platform for it :-).


NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Comments:

Hi,

I am developing a RCP as a JEE6client, the server is Glassfish v3.

I am transferring JPA entities through remote EJB session beans but the performance is very slow.

I'm not using DTOs, but the same JPA entities are the ones that I bind their properties in the client.

Almost every OneToMany relations are Lazy so the aren't serialized. I do serialize for example the items of a Purchase Order entity but he performance is very slow, a simple Purchase Order with its items entities weights more than 1mb in the connection. Imagine this when the client is through the Internet.

I do not use DTO because they will result exactly as the JPA entities.

What I am doing wrong?

Thanks and regards.
Xavier.

Posted by Xavier on October 10, 2010 at 07:54 AM CEST #

Hello Xavier, to improve performance in your case you need to use externalizable java serialization to avoid serialization of EclipseLink weaving features. EclipseLink use weaving to be able provide you lazy loading and others features. So try to use externalizable serialization.

Posted by Vitaliy Kalayda on July 07, 2013 at 11:33 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
realworldpatterns.com
...the last 150 posts
...the last 10 comments
Links
License