Performance Testing: J2EE Cluster


I have a J2EE cluster:

1 Apache load balancer : mod_jk and round robin+session stickiness
Two horizontal clustered Jboss.
1 Oracle Database server

We are running load testing scripts with Apache Jmeter. The script criteria is 10 users login simultaneously do some stuff and logout.

First test case:

Bring one node down and run the scripts

Total time taken to complete the script = x secs

Second Test case:

Both node up and run script

Total time taken to complete the script = y secs

As per our assumption the total time in second test case should be considerably less than first test case.

But it is not and x ~ y

How do we find whats happening when there are two dual core machines processing the requests with round robin load balancing.

I understand if i go on increasing the users on one node till it goes under DoS and then start the second node then it will show the difference in total time.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

first check tht JMeter uses different jsession ids per every user test. because load balancing is done on base of jsessionid.

Also could you send your file to see how robin round is configured.
Also the JkMount lines in your Apache httpd.conf file
el33tAuthor Commented:
yes jsession id different...we have a table in our DB schema which lists this information. When I run the script on the clustered nodes The column SESSIONID is like this example...

some hash like string.jboss_1
some hash like string.jboss_2

That jboss_1 and jboss_2 I have configured in each node's Jboss built in tomcat property file server.xml

Node 1: <Engine name="jboss.web" defaultHost="localhost" jvmRoute="jboss_1">

Node 2: <Engine name="jboss.web" defaultHost="localhost" jvmRoute="jboss_2">

FRom httpd.conf

# Where to find
# Update this path to match your conf directory location (put next to httpd.conf)
JkWorkersFile conf/
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
JkLogFile     logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel error
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions     +ForwardKeySize +ForwardURICompat -ForwardDirectories
#JkRequestLogFormat set the request format
JkRequestLogFormat     "%w %V %T"
# Send everything for context /examples to worker named worker1 (ajp13)
JkMount  /sml/* loadbalancer
JkMount  /pubscripts/* loadbalancer
JkMount  /etl/* loadbalancer
JkMount  /Toolkit/* loadbalancer
JkMount  /smlhelp/* loadbalancer










I don't think there would be much significant difference - you are
calculating response time. Let me explain: if the average response time for
a request is 100millis. It will be same even if I run the server standalone
or cluster mode. Now, cluster mode brings difference in concurrency. In
non-cluster mode, the request/sec would be 60000/100 = 600. But in the
cluster'ed mode (of 2 clusters), if the response time remains same, it would
2 * 60000/100 = 1200.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

el33tAuthor Commented:
Hi Ajay,

What i don't understand is when say 10 users login on single node resource(CPU time, memory, network) consumption of that node will be more than say 5 users login on 1 node and other 5 users login on second node the load is split and hence the response time should be less.

or the app servers are too fast to process the request say for example

single node = 120 secs

clustered ~ 60 secs + 60 secs ~ 120 secs
> the load is split and hence the response time should be less.
Sounds really true but it should doesn't sound logical. The response time
degrades after certain system load. So, it remains constant for low load.
el33tAuthor Commented:
> The response time degrades after certain system load.So, it remains constant for low load.

yes exactly as i mentioned earlier..that when single node goes under DoS awith more users..the total time will be more than in clustered...

anyways thanks i think now it's arranged properly in my mind...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.