ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How to determine the maximum number of messages in *USRQ

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to determine the maximum number of messages in *USRQ

    Hi,

    It is required to create *USRQ of the largest possible size.
    According to the documentation, the maximum size for *USRQ is 2Gb.
    Creating a queue requires specifying the maximum message size, the initial number of messages in the queue, the size (in messages) of the queue expansion, and the maximum number of expansion operations.
    Let's the message size is 1024 bytes. The initial number is 128 messages. The queue will expand by 128 messages.
    Estimate the maximum possible number of messages - 2Gb / 128 bytes. Then we subtract the initial number of messages (128) and divide by the size of the extension - 128. As a result, we get the maximum number of extensions - 16,383.
    We pass these parameters to QUSCRTUQ, after which we look at what we got (call matqat).
    We see that the maximum number of extensions (mat_template.Max_Extend) is set less than the requested one - 15 306, and the maximum number of messages in the queue is therefore is 1 959 296
    Then start filling the queue and at some point get the error "Tried to go larger than storage limit" At the same time, the number of messages in the queue is 1,957,504, the number of extensions used is 15,282.
    Why does this happen and how to correctly estimate the maximum number of increments when creating a queue?

    //Cheers, Victor

  • #2
    The problem solved. Thanks for StackOverflow

    Comment

    Working...
    X