|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Connection pooling and queue open questions |
« View previous topic :: View next topic » |
Author |
Message
|
Ruthie |
Posted: Tue May 21, 2002 10:32 am Post subject: Connection pooling and queue open questions |
|
|
Newbie
Joined: 21 May 2002 Posts: 6
|
Couple of questions from an MQ Admin (not a developer) trying to help resolve some serious and recurring max connections problems on the server connection channel.
1. How does pooling work in JMS? What manages the pool and how does it manage the pool? Is it possible in my company's application that this pool manager is not working properly? This application is opening 10 connections at the start of the app. 9 of these are NEVER used and they never go away unless the application is shutdown. (This tells me that the app knows the connections are there. So why aren't they being used?) Within a couple of hours of starting the application, the connections are being maxed out.
2. I see a lot of references in this forum about the overhead in connecting to a queue manager and opening and closing queues. Does anyone know exactly (or a close approximation) what kind of overhead we are talking about? What does it really cost the java application to issue a connect to queue manager, then a separate open object, and a separate close object? This way, they could leave the connection open, but close the objects they are not using.
Any info is greatly appreciated! I really want the app to work properly!!!
Thanks!
Ruthie |
|
Back to top |
|
 |
mqonnet |
Posted: Tue May 21, 2002 10:53 am Post subject: Re: Connection pooling and queue open questions |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
Shall try to clear a few of your doubts here.
[quote]1. How does pooling work in JMS? What manages the pool and how does it manage the pool? Is it possible in my company's application that this pool manager is not working properly? This application is opening 10 connections at the start of the app. 9 of these are NEVER used and they never go away unless the application is shutdown. (This tells me that the app knows the connections are there. So why aren't they being used?) Within a couple of hours of starting the application, the connections are being maxed out.
[/quote]
---First of all you should figure out why are these 9 connections being made if they are not being used at all at the first place. These are opened by apps and the application developer must close all the connections which are not in use. There are ways and means, being an admin, to kill those which are not in use. But doing it gracefully is the best alternative.
[quote]
2. I see a lot of references in this forum about the overhead in connecting to a queue manager and opening and closing queues. Does anyone know exactly (or a close approximation) what kind of overhead we are talking about? What does it really cost the java application to issue a connect to queue manager, then a separate open object, and a separate close object? This way, they could leave the connection open, but close the objects they are not using.
[/quote]
Lot of questions in here. Overhead of connecting to a QM or opening queues and keeping it open is quite a plenty. But you would not know this until you have many such apps doing the same thing. I am not aware of statistical info on this question, but just explaination. Each and every connection to a QM involves an Agent, and this agent is created by the QM(overhead). Each open of a queue adds to the list that this agent needs to maintain. Because whenever one is requested/referenced the agent needs to find it and process the request. Hence making the maintenance of such information very costly as far as Cpu usage is concerned. Hence conn, open and close need be done only when required. Keeping a connection or queue open for long periods of time unnecessarily should be avoided.
Hope this helps.
Cheers.
Kumar _________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
Ruthie |
Posted: Tue May 21, 2002 11:16 am Post subject: |
|
|
Newbie
Joined: 21 May 2002 Posts: 6
|
Thanks so much for the quick response.
For #1 - you confirmed my own opinion. I've been asking for that info forever. It doesn't make sense to open connections that are never used. However, the developers tell me that they open one connection for each EJB, but since they are never using them, I don't understand. I'll go back to them for more info.
For #2 - Is the overhead you are talking about on the MQ server or the app server? Since the problem I'm running into is max connections, it would make sense to me for the developers to try coding the app to close the connections after they get what they need, rather than trying to keep them open. I think, at this point, that may be the lesser of 2 evils, since the application is dying when the connections max anyway. Sny thoughts on this?
I'm collecting all of this good info to take back to them for review.  |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue May 21, 2002 11:16 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
For what it's worth, here are the #s for a Batch OS/390 test I just did (MQ5.2)
CONNECT
OPEN
DO 25000 TIME
MQPUT (no syncpoint, nonpersistent, 100 bytes)
END-DO
CLOSE
DISCONNECT
This took 80 seconds.
DO 25000 TIME
CONNECT
MQPUT1 (no syncpoint, nonpersistent, 100 bytes)
DISCONNECT
END-DO
This took 65 MINUTES!
Don't Connect/Open Close/Disconnect if you dont have to!!! _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Ruthie |
Posted: Tue May 21, 2002 11:40 am Post subject: |
|
|
Newbie
Joined: 21 May 2002 Posts: 6
|
WOW!!!! I never disagreed, but I didn't think it would be so drastically different!
So if you have an application, such as a web application that I am talking about, one that does not ever end (except when you shut it down), what kind of recommendations would you make to improve the performance and resolve the problem of the maxed connections? Is there some way to write a servlet/applet that checks the open handles, if they're in use, when they were last used, and close the ones that have not been used in X number of minutes? And, of course, run this on the app server maybe every hour or couple of hours? ???  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|