MQ

 View Only
  • 1.  Amqrmppa memory

    IBM Champion
    Posted Fri April 02, 2021 08:33 AM
    Could someone explain to me why some of these use more memory than others please? We have a badly behaved app which opens lots of connections and doesn't close them. I know this but can't fix it yet.

    However, I realised that I don't understand why some of the amqrmppa processes use more memory than others - what causes them to use more memory? It's the same app but it sends different numbers of messages down the connection before leaving them lying around. I'd like to know if the amqrmppa process stops growing at some point or whether its a sign of a leak or it's normal? We do have multiple instances of amqrmppa up at the 230k mark. And many more with much less - would like to understand what makes them different pls.

    Many thanks !
    John.

    ------------------------------
    John Hawkins
    Integration Consultant
    ------------------------------


  • 2.  RE: Amqrmppa memory

    IBM Champion
    Posted Sun April 04, 2021 07:48 PM

    The memory used by amqrmppa (channel pool) processes will be entirely dependant on the channels running in those pool processes. If a sender-receiver channel is moving large messages it will use more memory because it will have to create staging areas to reconstruct the messages from the 32K chunks that are used to send it across the network. If the channel becomes idle (heartbeats flow) then it will free those off, but if it remains busy it may hold onto those areas for longer. It may also reduce the size of memory retained if it doesn't see any big messages for a while. So it's very dependant on your pattern of messages and what size they are.

    You also mention a badly behaved application, so it sounds like you have SVRCONN channels in your pool processes as well. These will have a memory usage much more dependant on the client application behaviour which is harder to quantify.

    How many channels do you have running in each pool process? Are the ones "up at the 230k mark" the ones with the most channels in them? Use DISPLAY CHSTATUS(*) JOBNAME to see the PID and TID of the pool process used for each running channel.

    Cheers,
    Morag



    ------------------------------
    Morag Hughson
    MQ Technical Education Specialist
    MQGem Software Limited
    Website: https://www.mqgem.com
    ------------------------------



  • 3.  RE: Amqrmppa memory

    IBM Champion
    Posted Tue April 06, 2021 05:13 AM
    Hi Morag,
    I don't get the PID and TID from the chstatus - I just get the JOBNAME - which I don't see as much use to me? However, I do get the process Id from the windows (yes, windoze), process manager. This shows me that we have 13 amqrmppa processes for this QM handling over 170 connections. 165 of them from this specific SVRCONN which is not closing them correctly.
    Since Thursday the processes have all increased but not hugely. they all seem to max out around 265k then the other processes catch up. From what you say I would expect the older un-closed channels to have reduced their memory footprint. So, I think I'm just seeing the old channels simply clogging up the process memory with the smallest amount of memory they utilise? Seems about right to me - approx 11kb per connection of which 41 are actually active now. So, let's call that approx 44kb for the active connections and a few kb for the inactive. Seems fine to me! 

    I've suggested that they a) fix the bad application b) increase the memory on the machine c) reduce the connection timeout to get rid of the old connections (which would save them from altering their client app). Anything else seem sensible to you ?

    cheers !

    ------------------------------
    John Hawkins
    Integration Consultant
    ------------------------------



  • 4.  RE: Amqrmppa memory

    IBM Champion
    Posted Tue April 06, 2021 07:31 AM

    I don't understand why you are not getting the PID and TID from the JOBNAME. Can you post an example of the JOBNAME field you see in your DISPLAY CHSTATUS output?

    You could look into the SVRCONN attribute DISCINT to tidy up idle connections from the queue manager end.

    Cheers,
    Morag



    ------------------------------
    Morag Hughson
    MQ Technical Education Specialist
    MQGem Software Limited
    Website: https://www.mqgem.com
    ------------------------------



  • 5.  RE: Amqrmppa memory

    IBM Champion
    Posted Tue April 06, 2021 01:26 PM

    Your problem may be due to applications such as web servers or "harnesses" doing connection pooling and not freeing the sessions afterwards.   The harness may hide MQ from the applications.  The application has finished with the connection but the "pooling code" has not given it back.   There could be a tuning parameters along the lines of keep minimum pool size active. 
    Monitoring threads and see if thread ever get given back. 

    You could try an activity trace (overnight) and see if the theads are doing anything, when the system is idle.



    ------------------------------
    Colin Paice
    ------------------------------