Hallo,
My name is Denny and I have a problem with performance in J2EE. Ok, here is the description.
I am using IBM WebSphere 5.0 as the application server and Oracle 8.17 as the database. Both are in different box. My LAN is 10 MBps.
The Application Server computer is Pentium III 1 GHz, 1 GB memory. The Database server is Pentium III 800 MHz, 512 MB memory.
Application Architecture:
1. Front end: using Struts framework for web and a Swing client.
2. Middle layer: CMP Entity Bean and Stateless Session. Stateless Sessions are warped with Access Bean. I also use DAO Pattern
3. Data: Oracle Thin client for the DataSource – non XA. Some tables have about 80,000 rows.
I tested for single client access using web. The test was querying for a table in database and renders the result into web screen. The data for the table is about 80,000 rows and I only showed 100 rows for each pages (paging). The time required to do this is around 20 – 30 seconds.
The flow: Web->AccessBean->SessionBean(using JDBC)->Database->And back to Web accordingly.
But, when I tested it for multiple concurrent users (let’s say 50 users), the performance degraded very badly. I think it was approximately 15 minutes average. With some time out exceptions (after 120 sec), SQLException: protocol violation (?) and CORBA Out of memory exception.
I use JMeter to do the test.
Here’s some of the configuration in the App Server.
1.JVM: JIT disable, Heap Size Min 256 MB, Heap Max 512 MB. Garbage collection verbose mode=off.
2.Web Container: Servlet caching enables. Min Servet Serving = 20, Max = 50.
3.EJB Container: EJB Buckets = 4016 buckets
4.DataSouce: Min Connection=20, Max=50. Transaction timeout=120sec.
5.ORB: pass by reference=off. I didn’t do modification in ORB setting, leave it as default
The CPU utilization was near 100 % during the requests processing. Memory resources were around 512 to 1,000 MB. I found it strange to see the Memory resource indicator still pointing high memory usage after the test. I mean that the Garbage collector seemed unable to reclaim/freeing the memory.
The query method looks like this:
-Get DataSource
-Get connection – CONCUR READ ONLY, TYPE SCROLL INSENSITIVE
-Construct SQL Query based on user’s criteria (the ‘where’ clause); in this test lets assume we don’t use criteria
-Get ResultSet
-Set ResultSet’s fetch size to 10,000
-Construct a collection of Model (Value Object)
-Point ResultSet to last row and get the last row position to get total rows. (easier than querying for select count(*) … )
-Return Result to caller.
What do I miss here? Please help…… Sorry for writing such a long question
~desperateMan