ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Slow MQPUT when multithreading...

Post new topic  Reply to topic
 Slow MQPUT when multithreading... « View previous topic :: View next topic » 
Author Message
Maximus
PostPosted: Tue Feb 17, 2009 7:33 am    Post subject: Slow MQPUT when multithreading... Reply with quote

Acolyte

Joined: 14 Jun 2004
Posts: 57

Hi,

Using:
-JDK 1.5
-MQ JAVA Base API
-MQ Client 5.3
-Server is WMQ 6.0 on z/OS
-Non-persistent messages
-Use only one MQ connection for all the threads
-Open both Queue (request and response) at the beginning of each thread.
-Close both Queue at the end of each thread

If I do MQPUT a 1000 time in a single thread into a queue in a loop it will be very fast.
If I start, say 10 threads and each of them do MQPUT 100 times and after every MQPUT wait for the response. The time for only the MQPUT is fast for the first few put and then slow down for the other MQPUT. I don't take into account the time to wait for the response, only the time for the MQPUT operation. Why is the MQPUT slow in this context?

Any suggestion or help would be appreciated.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Feb 17, 2009 2:43 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Because using a single connection you are singlethreading both MQPuts and MQgets through that connection. You'll feel a lot more pain with huge messages where the put might take some time. This is why you should have multiple connections as needed. On top of this it is recommended to use syncpoint when using multiple threads to the same queue.
Have fun :innocentc:
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Maximus
PostPosted: Wed Feb 18, 2009 4:34 am    Post subject: Reply with quote

Acolyte

Joined: 14 Jun 2004
Posts: 57

fjb_saper wrote:
Because using a single connection you are singlethreading both MQPuts and MQgets through that connection. You'll feel a lot more pain with huge messages where the put might take some time. This is why you should have multiple connections as needed. On top of this it is recommended to use syncpoint when using multiple threads to the same queue.
Have fun :innocentc:


This is exactly my problem, since I am using one connection for all the threads, the MQI calls where serialized, as explained here:

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzal.doc/fg12070_.htm
"MQI calls using a single shared Hconn are serialized across threads."

When I use one connection per thread I get the result I was expecting.

Best regards.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Slow MQPUT when multithreading...
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.