Author |
Message
|
wese345 |
Posted: Thu Apr 24, 2014 10:16 pm Post subject: Additional instances not working as expect |
|
|
Novice
Joined: 05 Aug 2013 Posts: 21
|
Hi everyone,
We have a question that want to konw. 'Is additional instances in message flow can improve the performance?'
The topology is three nodes. eg: A-->B-->C.
Each node has a QM and a broker which runs messageflow.
Then we test it by LoadRunner.
The Vuser is 40 and every test runs 30 minutes.
Here is the result:
0 additional instance: about 18s per transaction
19 additional instance: 18s per transaction more or less
So we doubt that the additional instances are working? Or are we lost of setting other things?
Please HELP us . Will be more appreciate.
BTW, MQ version is 7.5 . MB is 8.0.0.1 |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Apr 24, 2014 11:37 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
The possible improvement in performance with additional instances depends very much on what is in your flow.
for example,
If there is a 'throttle' point such as a complicated DB Update/select then yes there might be no improvement.
If there are calls to an external service that is only capable of running a single request at a time then there may be no improvement.
the answer is then 'It Depends'. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Esa |
Posted: Thu Apr 24, 2014 11:48 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Could it be that your LoadRunner is running in one single thread and sending requests in sequence instead of in parallel? |
|
Back to top |
|
 |
McueMart |
Posted: Fri Apr 25, 2014 2:40 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
You can enable message flow statistics to see which instances (Threads) are processing the work.
This should give you a good indication what the problem is. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 25, 2014 4:34 am Post subject: Re: Additional instances not working as expect |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wese345 wrote: |
Here is the result:
0 additional instance: about 18s per transaction
19 additional instance: 18s per transaction more or less
So we doubt that the additional instances are working? Or are we lost of setting other things?
Please HELP us . Will be more appreciate.
BTW, MQ version is 7.5 . MB is 8.0.0.1 |
Assuming that all the other caveats mentioned by my esteemed colleagues have been taken care of, why oh why would you expect a single transaction to take less time.
The difference with additional instances is not to have the transaction take less time but to allow you greater throughput for the same average transaction time.
so assume average transaction time = 18 seconds
1 instance => 1 transaction every 18 seconds at best
2 instances => 2 transactions every 18 seconds at best
n instances => n transactions every 18 seconds at best
18 instances gives you at best a throughput rate of 1 transaction per second. Note that the average transaction time has not changed and is still 18 seconds...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Esa |
Posted: Fri Apr 25, 2014 5:15 am Post subject: Re: Additional instances not working as expect |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
fjb_saper wrote: |
so assume average transaction time = 18 seconds
1 instance => 1 transaction every 18 seconds at best
2 instances => 2 transactions every 18 seconds at best
n instances => n transactions every 18 seconds at best
|
That's what I thought first, too. But it depends on what you mean by transaction time. Is it the time that Message Broker uses for processing a message, or is it the response time experienced by the client (Loadrunner)?
If it's the latter, then if the client sent three requests simultauneously and the flow was running with no additional instances, shouldn' it be like this:
First message: 18 seconds,
Second message: 18 + 18 = 36 seconds,
Third message 36 + 18 = 52 seconds
The average being also 36 seconds?
In other words, with no additional instances the average transaction time (response time experienced by the client) would depend on the number of requests.
Obviously the OP measured average transaction times with broker statistics? Then what fjb_saper says is very true. Adding instances doesn't make the message flow logic any faster, it just increases throughput by letting more messages to be processed simultaneously.
The way the question was written kind of implied that it was LoadRunner that measured the average transaction times. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 25, 2014 5:32 am Post subject: Re: Additional instances not working as expect |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Esa wrote: |
If it's the latter, then if the client sent three requests simultauneously and the flow was running with no additional instances, shouldn' it be like this:
First message: 18 seconds,
Second message: 18 + 18 = 36 seconds,
Third message 36 + 18 = 54 seconds
The average being also 36 seconds?
In other words, with no additional instances the average transaction time (response time experienced by the client) would depend on the number of simultaneous client threads.
|
Sorry but your math is not on the mark. You average transaction time is still 18 seconds. Your transaction rate with a single instance is just 1 every 18 seconds, regardless of the number of parallel client threads.
Now if you have a single request thread and n instances, your throughput rate at the requester is still just 1 every 18 seconds or more because you wait for the reply before sending the next request... so no 36 seconds average transaction time....
Total time used up for 3 transactions 54 seconds if single threaded
Total time used up for 3 transactions 18 seconds if multi-threaded at 3 threads for both client and server.
average throughput single threaded 1 every 18 s
average throughput multi-threaded 3 every 18 s ==> 1 every 6 seconds (staggered model) !
Please don't confuse average transaction time / elapsed time with throughput rates....
Hope it helps  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Esa |
Posted: Fri Apr 25, 2014 5:47 am Post subject: Re: Additional instances not working as expect |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
fjb_saper wrote: |
Please don't confuse average transaction time / elapsed time with throughput rates....
|
I'm not, I'm just trying to make it clear that transaction times from broker statistics can be very different from response times experienced by the client.
If you are running the flow with no additional instances, the response time experienced by the client is processing time + the time the messages are queued waiting to be processed.
But I think the OP has already got the right answer. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 25, 2014 5:57 am Post subject: Re: Additional instances not working as expect |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Esa wrote: |
fjb_saper wrote: |
Please don't confuse average transaction time / elapsed time with throughput rates....
|
I'm not, I'm just trying to make it clear that transaction times from broker statistics can be very different from response times experienced by the client.
If you are running the flow with no additional instances, the response time experienced by the client is processing time + the time the messages are queued waiting to be processed.
But I think the OP has already got the right answer. |
Thanks for the clarification. Now I get where you're going...
response rate degradation when the request rate is > throughput rate  _________________ MQ & Broker admin |
|
Back to top |
|
 |
wese345 |
Posted: Sun Apr 27, 2014 7:53 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2013 Posts: 21
|
Thanks guys.
For your discussion, I realize that the addtional instances apparenttly can increase the throughtput by message flow.
What I understand is:if 2 applications(maybe more) put messages into the same queue, the messages in queue could be growing quickly. So one instance message flow deal with these messages can be have delay while more addition instances can reduce the time for the other waiting messages.
Now I know if I want to reduce the time for one transaction, I must refactor my message flow for it exactly has some DB operation such as 'select' or 'update'. |
|
Back to top |
|
 |
|