Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Performance Concurrent Access Statelss Session Bean 2.1 JBoss 5.1  RSS feed

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a fairly simple problem.

I have a third-party developed EJB application deployed on JBoss 5.1 server. I am trying to load test the application by accessing a single EJB from multiple threads from my local client.


below is the output :

logged in 1395842350839
object looked up 1395842353718
Company/ECA/ConfigHome 1395842353720
created the session1395842355107
thread number : 1 : calling the EjbMethod at 1395842355109
thread number : 2 : calling the EjbMethod at 1395842355109
thread number : 3 : calling the EjbMethod at 1395842355109
thread number : 6 : calling the EjbMethod at 1395842355110
thread number : 5 : calling the EjbMethod at 1395842355110
thread number : 7 : calling the EjbMethod at 1395842355111
thread number : 9 : calling the EjbMethod at 1395842355111
All threads started at : 1395842355111
thread number : 10 : calling the EjbMethod at 1395842355111
thread number : 4 : calling the EjbMethod at 1395842355113
thread number : 8 : calling the EjbMethod at 1395842355113
thread number : 1 : called the EjbMethod at 1395842355499
thread number : 2 : called the EjbMethod at 1395842356255
thread number : 5 : called the EjbMethod at 1395842356264
thread number : 6 : called the EjbMethod at 1395842356274
thread number : 7 : called the EjbMethod at 1395842357268
thread number : 4 : called the EjbMethod at 1395842357277
thread number : 10 : called the EjbMethod at 1395842357287
thread number : 8 : called the EjbMethod at 1395842357297
thread number : 9 : called the EjbMethod at 1395842357307
thread number : 3 : called the EjbMethod at 1395842357318
All threads finished at : 1395842357318


Below are the output times when I sequentially invoked the EJB 10 times (directly invoking 'currencydata = session.queryAllCurrencyData_6(null);' 10 times in main(). No parallel threads involved. Also only a single JNDI lookup and a single call to EjbCreate() as I used the same remoteObject for each invocation):

logged in 1395842765210
object looked up 1395842767187
Company/ECA/ConfigHome 1395842767188
created the session1395842768205
got response at : 1395842768546
got response at : 1395842768871
got response at : 1395842769192
got response at : 1395842769512
got response at : 1395842769834
got response at : 1395842770158
got response at : 1395842770479
got response at : 1395842770802
got response at : 1395842771125
got response at : 1395842771449



So as I observe the two, in sequential calls to the EJB, the response time is around 320ms every time.
So theoritically, If we invoked the same EJB 10 times in 10 parallel threads, it should take 320ms to finish all the threads, or maybe 500ms at the max.
But it is taking 1395842357318-1395842355111 = 2207ms = 2.2 seconds.

The AIX server on which the EJBs are deployed has 16 CPU cores available, 14 GB RAM.
I have checked the standardjboss.xml to have :
<container-pool-conf>
<MinimumSize>25</MinimumSize> <!-- I added this which improved the performance to this level-->
<MaximumSize>100</MaximumSize>
</container-pool-conf>
for Stateless Session Bean

What am I missing here? Any insights would be great.

Thanks.
Aayush





 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly is the bean doing? More specifically what is the implementation of:

 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Jaikiran.
The bean is retrieving all the data from a database table.
The bean is developed by a third party team and we do not have the source-code for it.

Aayush
 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could it be that the bean's code is taking some lock on some object before reading the table? but I don't think that they'll need to synchronize for reading a table? synchronizing for writing to a table makes more sense I guess.....
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The client code is timing the time taken for the bean call and unless you known what the bean implementation code looks like it will only be a guess as to what's causing the unexpected delay.
 
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!