MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

  • 1.  A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Fri October 02, 2020 10:05 AM

    You might find this blog post interesting. It came out of a discussion on the MQ listserver. By @Richard Nikula

    https://www.nastel.com/a-philosophical-possibly-even-a-theological-discussion-of-ibm-mqs-maximum-queue-depth/



    ------------------------------
    Sam Garforth
    Managing Director, EMEA
    Nastel Technologies
    Southampton
    ------------------------------


  • 2.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Mon October 05, 2020 06:14 AM
    I think if we wanted, one could make it unlimited, assuming unlimited storage is around.
    My personal thinking is that only an empty queue is a good queue.
    What is the value of a peta byte of messages in a queue that is 5% full?


    ------------------------------
    Matthias Jungbauer
    ------------------------------



  • 3.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Mon October 05, 2020 02:44 PM
    A real killer to a queue manager is when it runs out of disk space.
    To my mind, the purpose of a max queue depth and even the warnings of 80% or what ever your set it at, is a more fine grained metric.  It gives the installation a heads up that something unusual has occurred, that the NFR is breached. This becomes an opportunity for an alert and a manual intervention or whatever is required.
    The key is not to arbitrarily accept the QM defaults for MAXDEPTH and MAXMSGL, but to ask some simple NFR-type questions, and to set the MAXDEPTH and MAXMSGL at some reasonably higher value.

    ------------------------------
    hirschel wasserman
    ------------------------------



  • 4.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Tue October 06, 2020 04:39 AM
    It's certainly true that it's important to stop the queue manager running out of space. A more straight forward way to do this would be to set limits and monitors on disk space usage rather than counting messages and message sizes and trying to work it out. In the article, @Richard Nikula, you say "you can now set a maximum disk size that a queue can consume."​ I'm trying to find this option in the manual but I don't see it.

    ------------------------------
    Sam Garforth
    Managing Director, EMEA
    Nastel Technologies
    Southampton
    ------------------------------



  • 5.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Tue October 06, 2020 05:04 AM
    Hi Sam,

    From MQ 9.2.0 queues have a MAXFSIZE attribute that enables you to configure the maximum file size for the queue on disk.

    See https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.2.0/com.ibm.mq.adm.doc/q134310_.htm

    Kind regards,
    Jamie

    ------------------------------
    Jamie Squibb
    ------------------------------



  • 6.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Tue October 06, 2020 05:29 AM
    Ah, thanks Jamie. For some reason Google was taking me to the V7.5 documentation!

    ------------------------------
    Sam Garforth
    Managing Director, EMEA
    Nastel Technologies
    Southampton
    ------------------------------



  • 7.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Tue October 06, 2020 02:33 PM

    A few thoughts.  

    First, I was assuming the the traditional role of a queue as a buffer of messages and wasn't going into models where the queue was acting like persistent storage so your point is valid.  It "should" be empty most of the time.  Except when it is isn't. 


    Next point, when describing MQ, I often compare it to email between applications.   Is your email inbox empty right now?  Probably not, but it wasn't that long ago that a daily ritual would be cleaning and archiving mail to avoid people seeing "mailbox is full" messages when sending you mail.  There are still mail limits but the IT has to increase capacity to be able to support the flow required.  MQ is "plumbing" providing a service.  And it needs to be able to provide enough of that service to be valuable.  


    So back to my point one and your comment.   Suppose you had an application with a valid reason to store data?  Maybe there is a processing window but orders can arrive before that?  Does the application tell the buyer, the queue is full, try later or do we provide the capacity to avoid it. Of course, the application could have a preorder limit.  But it shouldn't be based on an MQ max queue depth because an MQ admin thought 50,000 was a lot.  But as several people have commented to me directly, it does mean that your petabyte of data could arrive and the plumbing has to work.



    ------------------------------
    Richard Nikula
    VP, Product development and support
    Nastel Technologies
    Plainview NY
    1 (516) 801-2100
    ------------------------------



  • 8.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Tue October 06, 2020 04:38 PM

    Yes, the application tells the client - queue full - MQRC_Q_FULL
    https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.2.0/com.ibm.mq.tro.doc/q041240_.htm

    Well, the details can be more complicated:
    When a message cannot be delivered, the MCA can process it in several ways. It can try again, it can return-to-sender, or it can put it on the dead-letter queue.
    https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.2.0/com.ibm.mq.con.doc/q015720_.htm

    When you send an email to a person whose mailbox is full you also get the error message that your email could not be delivered.
    Again it depends on the email server if you get an undelivered error message or not.

    There is something that does not happen autonomous yet.
    If queue_service_interval_high then increase maxdepth from 50,000 to 100,000
    Workaround: Tell a shell script to increase maxdepth when a queue gets full




    ------------------------------
    Matthias Jungbauer
    ------------------------------



  • 9.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Wed October 07, 2020 08:30 AM
    Rather than automatically increasing queue depth from 50,000 to 100,000 maybe it's better to have it at 100,000 all the time but have a queue high event at 40,000 and then automatically raise the queue high alert to 80,000?



    ------------------------------
    Sam Garforth
    Managing Director, EMEA
    Nastel Technologies
    Southampton
    ------------------------------



  • 10.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Wed October 07, 2020 02:23 PM

    I wasn't suggesting that increasing the limits meant there were unlimited resources to apply.    i wanted to make the point that the concept of a max depth or even size as a means of controlling the limit was not the most optimal.   There are ways to deal with it. We have had customers automate increasing the limits, but even that seems too "reactive" to me.  A surge of messages can come almost instantly.  Do we really want to explain to the shareholders that we only sold half our pre-order stock because 5000 messages ended up in a queue at one point and that was the max depth.   Or that the order from our top customer happened to be the one that MQ put to the DLQ.  

    But i am in more in agreement, that it does require an active management policy to look at usage, more than thresholds but analytics to back it up. 

    Thanks for all the great conversation...



    ------------------------------
    Richard Nikula
    VP, Product development and support
    Nastel Technologies
    Plainview NY
    1 (516) 801-2100
    ------------------------------



  • 11.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Wed October 07, 2020 05:42 PM
    Hi Richard
    I completely agree with you that a number is not the best way to find out if something works or not.
    The 50,000 is just one out of many default values that we find inside MQ objects.
    Maybe it is in ITIL where a term labelled Baseline is defined.
    When there are more message in the queue then in the defined Baseline, someone from MQ support should get alerted to look at it.
    In my experience the receiver is sometimes the first application that finds out that something upstream is failing.
    You expect to consume 5 messages per second, and suddenly you consume only 2 messages per second or nothing at all.





  • 12.  RE: A Philosophical (Possibly Even A Theological) Discussion Of IBM MQ's Maximum Queue Depth

    Posted Thu October 08, 2020 08:34 AM
    Hi  @Sam Garforth

    "Today, the distributed systems are more powerful than the mainframes from 25 years ago"​​
    This statement in the above article caught my eye.
    How powerful are today's mainframes compared with current distributed systems?
    What metrics would we use to compare distributed with central.

    ------------------------------
    Matthias Jungbauer
    ------------------------------