|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Very poor performance on connect to MQ v7 |
« View previous topic :: View next topic » |
Author |
Message
|
trystan2k |
Posted: Mon Oct 22, 2012 11:13 am Post subject: Very poor performance on connect to MQ v7 |
|
|
Novice
Joined: 22 Oct 2012 Posts: 22
|
Hi,
We had 4 machines (all of them linux, RHat 5) where we installed on two of them MQ v7.0.1.6 (I will call them A and B) and other two MQ v7.1.0.0 (call them C and D).
I´ve wrote a small Java client, using the MQSample.java code provided in MQ installation, and changed it to be able to execute 32 threads at same time, putting messages on MQ queue.
But I notice that on machine A and on machine C, to publish 500 msgs, it takes less than 10 seconds, while in machine B it take 22 secs and in D it takes 1 minute !
I then notice that it is not the put action or even the accessQueue call that takes time, but the line:
MQQueueManager qMgr = new MQQueueManager("MYQUEUEMANAGER");
I have delete all accessQueue and put lines, leaving only MQQueueManager, and got the exactly same times (well 1 or 2 secs slower, but excpected).
I then found the following code:
MQPoolToken token=MQEnvironment.addConnectionPoolToken(); that when used, make all connections be executed at same time, A, B, C, and D near 10 secs.
So I´m pretty sure the problem is when connecting to the QueueManager, but I don´t know more where to look. All machines has almost same capacity (actually A and C are better than B and D) memory, disk, cpu, etc, and all same OS.
I executed all tests from my local machine, but even when I run it on the same machine where MQ is installed, got same time.
Does anyone know which setting or what could be changed on C and D, so I can get same performance on A and B ? (I know I can use the connection pool, but I have other applications with same issue, and I cannot add those lines on them).
I really appreciate any help !
THank you !
Regards,
-Thiago |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 22, 2012 12:19 pm Post subject: Re: Very poor performance on connect to MQ v7 |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
trystan2k wrote: |
Does anyone know which setting or what could be changed on C and D, so I can get same performance on A and B ? (I know I can use the connection pool, but I have other applications with same issue, and I cannot add those lines on them). |
Are you aware that there's a considerable difference between v7.0 & v7.1? Noteably in the areas of connection security? Why are you using both?
How are the machines configured? Are you using the connection pool under WAS? Why is your connection pool shared between 4 queue managers?
How many times are you connecting to the queue manager that your app finds it a problem? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
trystan2k |
Posted: Mon Oct 22, 2012 12:41 pm Post subject: Re: Very poor performance on connect to MQ v7 |
|
|
Novice
Joined: 22 Oct 2012 Posts: 22
|
Vitor wrote: |
Are you aware that there's a considerable difference between v7.0 & v7.1? Noteably in the areas of connection security? Why are you using both?
How are the machines configured? Are you using the connection pool under WAS? Why is your connection pool shared between 4 queue managers?
How many times are you connecting to the queue manager that your app finds it a problem? |
Hi, yes I know. Actually we will upgrade all to 7.1, but what seems strange for me is that I got good performance and bad on both versions.
I´m not sharing the queue managers. We have 3 main machines: DEV (7.1), STAGE (7.0) and PROD (7.0) and another PROD that are not live yet and I´m using for my tests and it is 7.1
Huum, not sure about connection pool under WAS. Where I can check that ?
I´m testing putting 500 msgs on queue, so it connects 500 msgs on all app that I run, exactly same for all QMs.... |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 22, 2012 1:17 pm Post subject: Re: Very poor performance on connect to MQ v7 |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
trystan2k wrote: |
Hi, yes I know. Actually we will upgrade all to 7.1, but what seems strange for me is that I got good performance and bad on both versions. |
It is strange, and gives question to the assertion they're idnetical installs on identical hardware.
trystan2k wrote: |
Huum, not sure about connection pool under WAS. Where I can check that ? |
Don't ask me - you're the one that mentioned connection pools. Where are you keeping it if not WAS?
trystan2k wrote: |
I´m testing putting 500 msgs on queue, so it connects 500 msgs on all app that I run, exactly same for all QMs.... |
You should be putting 500 messages through the connection you establish before you put the 1st message, and that you close after the 500th. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
trystan2k |
Posted: Mon Oct 22, 2012 2:00 pm Post subject: Re: Very poor performance on connect to MQ v7 |
|
|
Novice
Joined: 22 Oct 2012 Posts: 22
|
Vitor wrote: |
trystan2k wrote: |
Hi, yes I know. Actually we will upgrade all to 7.1, but what seems strange for me is that I got good performance and bad on both versions. |
It is strange, and gives question to the assertion they're idnetical installs on identical hardware.
trystan2k wrote: |
Huum, not sure about connection pool under WAS. Where I can check that ? |
Don't ask me - you're the one that mentioned connection pools. Where are you keeping it if not WAS?
trystan2k wrote: |
I´m testing putting 500 msgs on queue, so it connects 500 msgs on all app that I run, exactly same for all QMs.... |
You should be putting 500 messages through the connection you establish before you put the 1st message, and that you close after the 500th. |
The hardware is not 100% the same, but one of the bad performance one has more power than one of good... This is strange...
The connection pool I had configure in my Java app, I did not changed anything in the servers.
I could open the connection in first and close on last, but as O said there are others app that I do not have the source that are implemented that way: one connection to each message. And I can see this working in 2 serves and fail in other 2. It seems to me that there is one setting in MQ server that I am missing, but I cannot find it. I was hoping someone already faced something familiar and could put some light on me... |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 22, 2012 5:30 pm Post subject: Re: Very poor performance on connect to MQ v7 |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
trystan2k wrote: |
The connection pool I had configure in my Java app, I did not changed anything in the servers. |
Using code you've written or commercial pooling software?
trystan2k wrote: |
I could open the connection in first and close on last, but as O said there are others app that I do not have the source that are implemented that way: one connection to each message. |
And these are doing it wrong, even if they don't happen to be displaying poor times.
trystan2k wrote: |
It seems to me that there is one setting in MQ server that I am missing, but I cannot find it. |
It seems to me that you have bad code, and some server configurations are managing to deal.
Others may have differing views _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
trystan2k |
Posted: Mon Oct 22, 2012 5:37 pm Post subject: Re: Very poor performance on connect to MQ v7 |
|
|
Novice
Joined: 22 Oct 2012 Posts: 22
|
Vitor wrote: |
trystan2k wrote: |
The connection pool I had configure in my Java app, I did not changed anything in the servers. |
Using code you've written or commercial pooling software?
trystan2k wrote: |
I could open the connection in first and close on last, but as O said there are others app that I do not have the source that are implemented that way: one connection to each message. |
And these are doing it wrong, even if they don't happen to be displaying poor times.
trystan2k wrote: |
It seems to me that there is one setting in MQ server that I am missing, but I cannot find it. |
It seems to me that you have bad code, and some server configurations are managing to deal.
Others may have differing views |
I use Oracle Java CAPS that seems to use pool (it has a place to configure it, but seems to not being working then. I already opened a case with Oracle) but I have write a java client that I can disable or enable connection pools. With fast server it does not matter if I enable pool or not, I got same performance, which does not happen on bad server (bad performance without pool).
I agree with you, that best is open once, put all msgs and close, but I want to understand why same code, works good in one server and bad in another. If I could change anything in the server to behave same way on all servers without changing my code. |
|
Back to top |
|
 |
ramires |
Posted: Tue Oct 23, 2012 1:23 am Post subject: |
|
|
Knight
Joined: 24 Jun 2001 Posts: 523 Location: Portugal - Lisboa
|
Are you the only one doing tests? Are those results consistent along the time? Are queue managers configured the same way (log data and queue data) Have those machines the same kind of I/O? Is the queue used for test defined with the same attributes (persistence)?
You need to be sure the environments are "identical" to compare results. _________________ Obrigado / Thanks you |
|
Back to top |
|
 |
trystan2k |
Posted: Tue Oct 23, 2012 4:23 am Post subject: |
|
|
Novice
Joined: 22 Oct 2012 Posts: 22
|
ramires wrote: |
Are you the only one doing tests? Are those results consistent along the time? Are queue managers configured the same way (log data and queue data) Have those machines the same kind of I/O? Is the queue used for test defined with the same attributes (persistence)?
You need to be sure the environments are "identical" to compare results. |
Hi,
Yes, the results are consistent. Since I start testing, they got exactly same behaviour.
I´m not an expert on MQ, so not sure where I could find log and queue data. I already compared all settings I could see using MQ Explorer and all of them are the same.
All queues I´m using are set to Non-Persistent, so I guess the I/O doesn´t affect too much ?
Thanks ! |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 23, 2012 5:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
trystan2k wrote: |
All queues I´m using are set to Non-Persistent, so I guess the I/O doesn´t affect too much ? |
As has been said many times, persistence is a message property not a queue property. You can put a persistent message on a queue which has default persistence set to no and it will be persistent with all the logging I/O that involves. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ramires |
Posted: Tue Oct 23, 2012 6:53 am Post subject: |
|
|
Knight
Joined: 24 Jun 2001 Posts: 523 Location: Portugal - Lisboa
|
Can you do the same test with another putting application ? |
|
Back to top |
|
 |
trystan2k |
Posted: Tue Oct 23, 2012 6:58 am Post subject: |
|
|
Novice
Joined: 22 Oct 2012 Posts: 22
|
Vitor wrote: |
trystan2k wrote: |
All queues I´m using are set to Non-Persistent, so I guess the I/O doesn´t affect too much ? |
As has been said many times, persistence is a message property not a queue property. You can put a persistent message on a queue which has default persistence set to no and it will be persistent with all the logging I/O that involves. |
Ok, but in both cases (message and queue) it is setting to Non-persistent...
I´m using this code:
Code: |
MQMessage msg = new MQMessage();
msg.persistence = MQConstants.MQPER_NOT_PERSISTENT; |
|
|
Back to top |
|
 |
trystan2k |
Posted: Tue Oct 23, 2012 7:00 am Post subject: |
|
|
Novice
Joined: 22 Oct 2012 Posts: 22
|
ramires wrote: |
Can you do the same test with another putting application ? |
Yes, I can do that. Do you recommend any application that I could use for test? I already tested with my own java client and with Oracle JAVA CAPS 5.1.3, getting same performance.
If you could suggest another tool, I can do the test with it and compare results..
Thank you ! |
|
Back to top |
|
 |
ramires |
Posted: Tue Oct 23, 2012 7:13 am Post subject: |
|
|
Knight
Joined: 24 Jun 2001 Posts: 523 Location: Portugal - Lisboa
|
|
Back to top |
|
 |
trystan2k |
Posted: Tue Oct 23, 2012 10:26 am Post subject: |
|
|
Novice
Joined: 22 Oct 2012 Posts: 22
|
Hi,
I wrote a small shell scrpit to put 500 msgs (as all my other tests) and found that same performance slowness happen.
Here is my script:
Code: |
#!/bin/bash
#
echo " "
echo "----------------------------------------------------------------"
echo " "
PATH=$PATH:/opt/mqm/samp/bin;
export MQSERVER=EAI.CLIENT.SVRCONN/TCP/'localhost(1414)'
date1=$(date +"%s")
LIMITE=500
for ((a=1; a <= $LIMITE ; a++))
do
echo "Test for MQ Performance"|amqsput TESTQ QMANAGER
done;
date2=$(date +"%s")
diff=$(($date2-$date1))
echo "$(($diff / 60)) minutes and $(($diff % 60)) seconds elapsed."
echo "END"; |
All tests I executed in the same machine as QueueManager is running (as you can see by the 'localhost')
In my DEV server, it took 6 seconds, while in my PROD box it took 55 seconds. Both are in same MQ version (7.1).
I then changed to amqsputc in the same script and DEV took 22 seconds, while PROD give in all iterations the error:
MQCONN ended with reason code 2538
I then changed the 'localhost' to the MQ server IP and it worked, and took 2 min 13 seconds.
Don´t know if this 'localhost' don´t work in PROD server could give us any clue ? Because even with this sample app from MQ, I see the exactly same behaviour (when using amqsput at least... with amqsputc both got a little slower than my java app).
Do you have any idea what could be after these tests?
Thanks ! |
|
Back to top |
|
 |
|
|
 |
Goto page 1, 2, 3 Next |
Page 1 of 3 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|