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 » General IBM MQ Support » No. of Connections from Application and Memory consumed ?

Post new topic  Reply to topic Goto page 1, 2  Next
 No. of Connections from Application and Memory consumed ? « View previous topic :: View next topic » 
Author Message
shashivarungupta
PostPosted: Mon Nov 01, 2010 10:38 am    Post subject: No. of Connections from Application and Memory consumed ? Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

Hi..

To know, how many connections client applications/interfaces have on mq queue manager, I have put the command ( on server where the qmgr is running )
netstat -an | grep 1414
and this gives the O/P under following head..
Code:
tcp        0      0  *.1414                 *.*                    LISTEN

Code:

tcp4       0      0  a.b.c.d.1414       b.b.b.b.27160       ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1652        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1653        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1654        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1655        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1661        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1662        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1674        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1675        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1677        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1678        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1682        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1692        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       a.a.a.a.1693        ESTABLISHED
tcp4       0      0  a.b.c.d.1414       c.c.c.c.56401       ESTABLISHED
tcp4       0      0  a.b.c.d.1414       d.d.d.d.39652       ESTABLISHED


where a.b.c.d is the IP.1414 on which qmgr listens. Connection count is 16.
And now they want me to also find out 'how much they are using memory' and for how long they are connected to the qmgr !!
How can I get that details ?
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
shashivarungupta
PostPosted: Mon Nov 01, 2010 11:57 am    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

I got the date/time ! CHSTADA(2010-11-01) , CHSTATI(14.49.11)
Code:

   CHANNEL(ABC)                      CHLTYPE(SVRCONN)
   BUFSRCVD(9)                             BUFSSENT(8)
   BYTSRCVD(2381)                          BYTSSENT(2819)
   CHSTADA(2010-11-01)                     CHSTATI(14.49.11)
   COMPHDR(NONE,NONE)                      COMPMSG(NONE,NONE)
   COMPRATE(0,0)                           COMPTIME(0,0)
   CONNAME(a.a.a.a)                     CURRENT
   EXITTIME(0,0)                           HBINT(300)
   JOBNAME(00008F5600001683)               LOCLADDR(::ffff:a.b.c.d(1414))
   LSTMSGDA(2010-11-01)                    LSTMSGTI(14.49.11)
   MCASTAT(RUNNING)                        MCAUSER(xyz)
   MONCHL(OFF)                             MSGS(6)
   RAPPLTAG(WebSphere MQ Client for Java)
   RQMNAME( )                              SSLCERTI( )
   SSLKEYDA( )                             SSLKEYTI( )
   SSLPEER( )                              SSLRKEYS(0)
   STATUS(RUNNING)                         STOPREQ(NO)
   SUBSTATE(RECEIVE)                       XMITQ( )



and still a question is to be answered 'how much they are using memory'
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
exerk
PostPosted: Tue Nov 02, 2010 6:00 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

shashivarungupta wrote:
...and still a question is to be answered 'how much they are using memory'


What's the issue here? Why does it matter?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Tue Nov 02, 2010 6:16 am    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

exerk wrote:
shashivarungupta wrote:
...and still a question is to be answered 'how much they are using memory'


What's the issue here? Why does it matter?


Good Question, hmm... it starts with Server, CPU and Memory Cost about which Management is concerned., applications say that they are holding the persistent connections ( in terms of network) and they have tcp alive on network.
They wanted to know how many connections an application is holding over a queue manager and for how long !! and in-turn they wanted to know How much they are consuming the Memory & CPU by doing that !!
They were facing issues like 'out of resource' and now they are building a new server so they wanted to bring up this fact too.
so thats why I wanted to know 'Memory Consumption' here.
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
exerk
PostPosted: Tue Nov 02, 2010 6:22 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

1. So how many applications connect?
2. How many threads each do they spawn?
3. How are they limited from overwhelming the queue manager?

And just because when you checked you had 16 does not necessarily mean that it is only ever 16, just that it was that many at the time of checking. Enlist the aid of your Sys Admins because to get the information management seeks, you may have to go down quite deep.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Tue Nov 02, 2010 6:53 am    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

exerk wrote:
]1. So how many applications connect?
= 31
exerk wrote:
2. How many threads each do they spawn?
= They are not up all the times so didn't get the snap of all those appls. ( shown 3 appl. IPs at that time a.a.a.a, b.b.b.b, c.c.c.c)
exerk wrote:
And just because when you checked you had 16 does not necessarily mean that it is only ever 16, just that it was that many at the time of checking.
I understand this.

My concern is, if I can find out the Memory consumed for One thread then I can multiply that amount of memory/Size/Bits/Bytes/Blocks/Pages with 'No. of threads' , which would give me the total consumed memory !!!!

_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
exerk
PostPosted: Tue Nov 02, 2010 7:04 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

shashivarungupta wrote:
My concern is, if I can find out the Memory consumed for One thread then I can multiply that amount of memory/Size/Bits/Bytes/Blocks/Pages with 'No. of threads' , which would give me the total consumed memory !!!!


Which will count for what? So you build a new box, with a bit of extra capacity just-in-case, and then what happens when another n applications are added to the pool? You'd do better to load-balance your clients over a number of servers if resource is an issue.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Tue Nov 02, 2010 7:15 am    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

exerk wrote:
shashivarungupta wrote:
My concern is, if I can find out the Memory consumed for One thread then I can multiply that amount of memory/Size/Bits/Bytes/Blocks/Pages with 'No. of threads' , which would give me the total consumed memory !!!!


Which will count for what?

Total memory consumed (at a point of time) = [ No. of Threads of connection X memory consumed in Bytes per connection ]
where 'X' = multiplication

Stats on the old server can help them while building the new server !

exerk wrote:
So you build a new box, with a bit of extra capacity just-in-case, and then what happens when another n applications are added to the pool? You'd do better to load-balance your clients over a number of servers if resource is an issue

True, I have suggested them that too.
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Tue Nov 02, 2010 1:18 pm    Post subject: Reply with quote

Grand High Poobah

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

And just to put my mind at rest...
What is the settings of MaxChannels / MaxActiveChannels on the qmgr in question?

Out of resource may not necessarily mean the box... it might just mean out of configured resources
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
shashivarungupta
PostPosted: Wed Nov 03, 2010 1:11 am    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

fjb_saper wrote:
What is the settings of MaxChannels / MaxActiveChannels on the qmgr in question?

Under Channel stanza , its not mentioned at all.
Even I suggested them that, under ulimit -a 'Data and Stack segments' are not set as unlimited on the old server. They ignored it. Whereas its the prereq of mq before installation. These servers are new to me and do not know who did the setup on it.

fjb_saper wrote:

Out of resource may not necessarily mean the box... it might just mean out of configured resources

Yes, absolutely true. But instead of analyzing the server they heading towards the new server. they are simply stupid.
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
exerk
PostPosted: Wed Nov 03, 2010 2:34 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

shashivarungupta wrote:
...they are simply stupid.


There is nothing simple about stupidity - some people work very hard at it, and make a full career of it!
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 03, 2010 7:12 am    Post subject: Reply with quote

Grand High Poobah

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

shashivarungupta wrote:
fjb_saper wrote:
What is the settings of MaxChannels / MaxActiveChannels on the qmgr in question?

Under Channel stanza , its not mentioned at all.


That would mean that the default limit is 100 concurrent active channels. This may be way too low for your needs. We have some qmgrs that have 2,000 set as a limit...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
shashivarungupta
PostPosted: Wed Nov 03, 2010 11:43 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

fjb_saper wrote:
shashivarungupta wrote:
fjb_saper wrote:
What is the settings of MaxChannels / MaxActiveChannels on the qmgr in question?

Under Channel stanza , its not mentioned at all.


That would mean that the default limit is 100 concurrent active channels. This may be way too low for your needs. We have some qmgrs that have 2,000 set as a limit...


exerk wrote:
There is nothing simple about stupidity - some people work very hard at it, and make a full career of it!


I agree with you both !
The thing is, when I asked the management why you are going to build the new server with new storage capacity then they just said "we had problem in the old server of 'out of resource' " , I don't know ..It could be because of anything not just because of MQ and that I'm proactively working on to search out what could be the cause !!

anyways... do we have answer for this ?
Total memory consumed (at a point of time) = [ No. of Threads of connection X memory consumed in Bytes per connection ]
where 'X' = multiplication


_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
shashivarungupta
PostPosted: Wed Nov 10, 2010 2:25 am    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

AFAIK functions do not occupy space/memory but the variables/arguments do (depending on the nature of that variable, is static/global/local).

as far as I understand..by looking at the following link of MQCONN().

Code:
http://publib.boulder.ibm.com/infocenter/tpfhelp/current/index.jsp?topic=/com.ibm.ztpf-ztpfdf.doc_put.cur/gtpc2/cpp_mqconn.html


"If the completion code is MQCC_OK, the reason code is MQRC_NONE, which indicates a normal return."
AND
"pHconn : A pointer to the location to store the connection handle, which represents the connection to the MQSeries queue manager. You must specify the connection handle on all subsequent message queueing calls issued by the application."

It depends whats the size of those Pointers.

"MQHCONN - Connection handle : The MQHCONN data type represents a connection handle, that is, the connection to a particular queue manager. A connection handle must be aligned on a 4-byte boundary. (I believe its signed integer)"

"MQLONG - Long integer : The MQLONG data type is a 32-bit signed binary integer that can take any value in the range -2 147 483 648 through +2 147 483 647". An MQLONG must be aligned on a 4-byte boundary.


and we got from this, 4Bytes for MQCC, MQRC, HConn each, would give 12 Bytes of memory usage for a Connection. (excluding the name of the 'Qmgr' in a Character Array : 'n' characters = 'n' bytes)
i.e. 12Bytes + 'n' Bytes of CharArray of Qmgr Name


_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
kman
PostPosted: Wed Nov 10, 2010 11:30 pm    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2003
Posts: 309
Location: Kuala Lumpur, Malaysia

how's this

1. stop your queue mgr
2. take stock of you memory now.
3. start your queue mgr
4. repeat step 2
5. start your client apps to get your client conns
6. repeat step 2

diff between step 6 and 4 would be your mem usage divided by the number of conns. This works?
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » No. of Connections from Application and Memory consumed ?
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.