Performance Testing: J2EE Cluster

Hello,

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.


el33tAsked:
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.

ramazanyichCommented:
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 workers.properties file to see how robin round is configured.
Also the JkMount lines in your Apache httpd.conf file
0
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
and
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 workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile conf/workers.properties
# 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

--------------
From workers.properties

workers.tomcat_home=/opt/jboss
workers.java_home=/opt/jdk1.5
ps=/
worker.list=loadbalancer

worker.jboss_1.port=8009
worker.jboss_1.host=srv01
worker.jboss_1.type=ajp13
worker.jboss_1.lbfactor=1

worker.jboss_2.port=8009
worker.jboss_2.host=srv02
worker.jboss_2.type=ajp13
worker.jboss_2.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=jboss_2,jboss_1
worker.loadbalancer.sticky_session=True
worker.loadbalancer.sticky_session_force=False

worker.inprocess.type=jni

worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar

worker.inprocess.cmd_line=start

worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(ps)libjvm.so

worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
0
Ajay-SinghCommented:
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
be
2 * 60000/100 = 1200.
0

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
0
Ajay-SinghCommented:
> 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.
0
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...
0
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.