1

We are using Websphere MQ 7.5 with the Javax-JMS-classes and have some performance-problems, which aren't reproducable.

I have isolated the performance-issue to these two method-calls createSession and send.

These two calls sometimes take a large amount of time(> 300ms per message). Often there is a Object.wait call which causes the slowdown. So maybe jms is waiting for resources.

Sometimes I can send 500 messages without any occurence of that issue, but suddenly it's really slow. It isn't possible that the problem is in our code, because every step before doesn't take much time. Only these two JMS method calls.

So my question is, what could be the cause for the sudden performance-drop?

Is it possible to debug it by using the queuemanager-logs?

Any idea is helpful.

Edit:

We are using client-bindings and the SHARECNV-setting is set to 10.

Christian
  • 22,585
  • 9
  • 80
  • 106
  • Durable topics by any chance ? – Nicholas Oct 13 '15 at 22:57
  • Please update your question with the following additional information; are you using client bindings (i.e. connecting to the queue manager over the network) or local bindings; if client, are you running your application in a hosted environment where there could be pooled connections or shared connections (SHARECNV setting on the SVRCONN definition); are there any network problems indicated in the queue manager lots at the same time as your createSession takes a long time? – Morag Hughson Oct 14 '15 at 04:21
  • @MoragHughson I've edited my question. But I can't answer if there are network problems in the qmgr during my calls. Where in the qmgr will I be able to check that? – Christian Oct 14 '15 at 04:45
  • @Nicholas Where can I check that? – Christian Oct 14 '15 at 04:57
  • I mean, are you using pub/sub with topics (that are durable), or queues. Durable topics store and send when the subscriber connects. Let's start with JMS "topics or queues ?" – Nicholas Oct 14 '15 at 10:19
  • To test I'm currently using a queue to send the message to. But normally we are using topics. But the Performance is nearly the same currently. – Christian Oct 14 '15 at 10:23

1 Answers1

2

I have isolated the performance-issue to these two method-calls createSession and send.

I hope you are NOT doing a createSession method call for each message put to the queue because if you are, that is a TERRIBLE design.

Do 1 createConnection method call and 1 createSession method call then send all of your messages. If you have multiple threads then use connection pooling.

Roger
  • 7,062
  • 13
  • 20
  • Thanks for your answer. But you are right. Currently for every message-send there is a createSession. Could that be the cause of the performance issue? – Christian Oct 14 '15 at 15:52
  • Yes - as roger says, that will be very poor performance. It would be like your postman walking up your driveway several times in order to deliver each envelope individually instead of walking up the driveway once and delivering all the envelopes at once. – Morag Hughson Oct 15 '15 at 06:03
  • So How could I keep the Session alive? And is there a disadvantage of doing that? We use a messagelistener and wait for messages to fly in. – Christian Oct 18 '15 at 22:54