MQ

 View Only
Expand all | Collapse all

IBM MQ Performance

  • 1.  IBM MQ Performance

    Posted Wed December 01, 2021 10:58 AM
    I am working on connecting to IBM MQ server via java JMS client and leveraging Transacted sessions (synchronous send calls) to commit records over a specified batch / interval with application running on "Ubuntu 20.04.1 LTS".
    I am getting a write performance / speed of 3000(3 kfps) messages per second while trying to send msg to ibm mq dev server.
    Our input can give performance numbers of more than 100 kfps but is being limited by the MQ server (9.2). We are expecting a minimum performance of 40 kfps if that is possible in licensed version.
    So I have following questions:
    1. Could you pls let me know if there is any limitation on performance of Dev server which might not be the case with licensed version of IBM MQ.
    2. Is there a way to use Asynchronous send operations with transacted sessions using java jms clients.


    ------------------------------
    Swetank Gupta
    ------------------------------


  • 2.  RE: IBM MQ Performance

    IBM Champion
    Posted Thu December 02, 2021 03:40 AM

    Please see the answer to this question on StackOverflow about your first question.

    What size are your messages? What persistence are your messages? Are you locally bound or network connected? If you are network connected (which will of course be slower), then you could utilise AsyncPut. On your queue, set DEFPRESP(ASYNC) on your queue definition.

    Cheers,
    Morag



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



  • 3.  RE: IBM MQ Performance

    Posted Thu December 02, 2021 06:12 AM
    @Morag Hughson - Thanks for the reply !! 

    A few more details about the case:
    Message Size: 0.06 KB per message
    Connected over localhost (so no / negligible network lag)
    Session Type: Transacted session with commit size of 5000 msgs per commit.
    Performance Numbers : 
    Speed in KFPS (1 kfps = 1000 msgs)
      Synchronous Send Non-Synchronous Send (Async Put)
    Persistent Msg 3 7
    Non-Persistent Msg 8 11

    So is this the maximum performance (in diff scenarios) that we can get from IBM MQ??

    ------------------------------
    Swetank Gupta
    ------------------------------



  • 4.  RE: IBM MQ Performance

    IBM Champion
    Posted Thu December 02, 2021 06:32 PM
    Why are you using a network connected application if you are on the same machine as the queue manager? What do you see for your numbers if you use a locally bound connection instead?

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



  • 5.  RE: IBM MQ Performance

    Posted Thu December 02, 2021 11:24 PM
    @Morag Hughson - The connection is a simple JMS connection over localhost and as we have to deploy the applications in kubernetes containers, this will remain to be the best approach for communication between client and server.

    Pls let me know if your think otherwise.​

    ------------------------------
    Swetank Gupta
    ------------------------------



  • 6.  RE: IBM MQ Performance

    IBM Champion
    Posted Thu December 02, 2021 11:54 PM

    "I have to run it later over a real network" is a perfectly acceptable answer to "why are you using a network connection application with localhost?"

    You have not mentioned anywhere, whether there is something reading the messages at the same time as you are putting them. Are you just loading up a queue with lots of messages, or are you feeding some other application that is getting them as you put them? Having a deep queue will hurt your performance because you will hit real I/O.



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



  • 7.  RE: IBM MQ Performance

    Posted Fri December 03, 2021 12:10 AM
    @Morag Hughson - So, for now I was just putting the messages in a queue which are not being consumed. The depth I have configured for this test is 999999999 (max possible). The maximum messages that I have put in the queue (to get perf numbers) was ~2458178​.

    But my actual use case is to have MQ integrated in our streaming application which enriches the data and finally sends to MQ from where it can be consumed by clients as and when required.

    ------------------------------
    Swetank Gupta
    ------------------------------



  • 8.  RE: IBM MQ Performance

    IBM Champion
    Posted Fri December 03, 2021 12:14 AM

    You are therefore running MQ with the maximum amount of writing to the disk as you can, which will not help your numbers. If you just want to test the putting side of things, have something just sit in a get-wait on your queue and discard the messages it gets. Then test your numbers and see how they look.

    I would use the Q program for this, but there are plenty of applications out there that can just get+discard, including you could quickly write one yourself.

    Cheers,
    Morag



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



  • 9.  RE: IBM MQ Performance

    Posted Fri December 03, 2021 04:29 AM

    Hi,

    Out of interest is your putting application single threaded? You could bottle-necked on client CPU / network bandwidth. Having multiple putting applications will allow you to go faster.

    If you take a look at the 9.2 performance report: https://ibm-messaging.github.io/mqperf/MQ_V9.2_Performance_Report_xLinux.pdf you will see that with JMS connected into MQ on Linux as a client it is possible to do 100,000+ request / response transactions a second. That's 200,000+ non-persistent messages a second. However that required a number of applications to get the necessary concurrency. See section 3.3.

    Regards, Matt.



    ------------------------------
    MATTHEW LEMING
    ------------------------------



  • 10.  RE: IBM MQ Performance

    IBM Champion
    Posted Thu December 02, 2021 03:45 AM
    Hi Swetank,

    One key bit of information is, are the messages persistent or non persistent.
    If they are persistent, then the data will be written to the log at commit time, and so there is log I/O time involved in the overall end to end time, and so a reduction in through put.

    I expect your messages are persistent.

    As a test, make them non persistent, and see what improvement you get.  If it makes little difference, then logging is not a problem.

    If logging is causing a bottleneck, you can try putting multiple messages before you commit - 50 to 100 may be fine ( if the message size is under 100KB).  This is what the mover does.  Put up to Batchsz messages, and then commit.  If there is no more work, then just commit.

    If making them non persistent makes little benefit, it might be a network problem.  Make sure you have set up the TCP parms for buffer sizes etc.  Old systems gave small buffers (256 bytes) these days you can have MB buffers.


    You also might try a different program to check out MQ.  Loop putting 1,000 messages ( and commit) to MQ, and time it.  If this is OK, it maybe the work driving MQ is slow.

    If there is work building up before the MQ application, then having multiple application instances can help performance - unless there is message ordering.

    regards

    Colin


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



  • 11.  RE: IBM MQ Performance

    Posted Thu December 02, 2021 06:17 AM
    @Colin Paice - Thanks for the suggestions, I have tried to get the numbers based on them. 

    A few more details about the case:
    Message Size: 0.06 KB per message
    Connected over localhost (so no / negligible network lag)
    Session Type: Transacted session with commit size of 5000 msgs per commit.
    Running a bare metal machine  with no overhead with 24 cores available & Ubuntu 20.04.1 LTS.

    Performance Numbers : 
    Speed in KFPS (1 kfps = 1000 msgs)
      Synchronous Send Non-Synchronous Send (Async Put)
    Persistent Msg 3 7
    Non-Persistent Msg 8 11

    Is this the maximum performance (in diff scenarios) that we can get from IBM MQ??

    Could you pls share if you have any thoughts / suggestions based on the info provided or if I need to share anything else.


    ------------------------------
    Swetank Gupta
    ------------------------------



  • 12.  RE: IBM MQ Performance

    IBM Champion
    Posted Thu December 02, 2021 08:36 AM
    I would figure that this traffic is not the only traffic impacting the qmgr.
    The default uncommitted message count for the qmgr is 10 000. Have you thought giving it a try at 50 000 or 100 000 uncommitted messages per qmgr?
    see the MAXUMSG field...  Also make sure you have the logsize and logs to follow without having to roll back a transaction because of log size...

    ------------------------------
    Francois Brandelik
    ------------------------------



  • 13.  RE: IBM MQ Performance

    Posted Thu December 02, 2021 08:51 AM
    Yes, have increased the commit size to 100,000 msgs... But the problem arises when i am committing more than 5k msgs per commit .. the performance decreases if commit batch size increases from ~5k.

    There is nothing else running on my machine so that makes it possible to utilise as many cores as possible. Out of 24 cores, mq is only utilising 1-2 cores at peak load.

    ------------------------------
    Swetank Gupta
    ------------------------------



  • 14.  RE: IBM MQ Performance

    IBM Champion
    Posted Thu December 02, 2021 09:02 AM
    What type of disk does MQ use to write its logs? local? network? performance?

    ------------------------------
    Luc-Michel Demey
    DEMEY CONSULTING
    lmd@demey-consulting.fr
    ------------------------------



  • 15.  RE: IBM MQ Performance

    Posted Thu December 02, 2021 09:23 AM
    Its writing to local file system which is default configuration for mq. I have not changed that.

    ------------------------------
    Swetank Gupta
    ------------------------------



  • 16.  RE: IBM MQ Performance

    Posted Thu December 02, 2021 08:43 AM
    Are you using just JMS, or do you also have Spring (e.g. JMSTemplate) in the mix here?

    ------------------------------
    Tim Zielke
    ------------------------------



  • 17.  RE: IBM MQ Performance

    Posted Thu December 02, 2021 08:46 AM
    Using java jms library to connect to mq. No framework used like spring or anything else.

    ------------------------------
    Swetank Gupta
    ------------------------------



  • 18.  RE: IBM MQ Performance

    Posted Thu December 02, 2021 09:04 AM
    There will be some slight overhead with this approach, but you may want to consider using the Application Activity Trace to track the performance and flow of your MQ API calls. There is a free tool called mqtrcfrmt.jar that comes in the MH06 supportpac that can summarize the performance of the API calls by MQ connection, that could be helpful here. You could at least have a better idea of how much time you are spending within the queue manager for your API calls. I have pasted a link to the latest MH06 zip file below.

    https://community.ibm.com/community/user/integration/viewdocument/mh06zip?CommunityKey=183ec850-4947-49c8-9a2e-8e7c7fc46c64&tab=librarydocuments

    ------------------------------
    Tim Zielke
    ------------------------------