The amount of data that can be stored on a queue is limited by the size of the individual
blocks the queue is divided into. Use MQSC commands to confirm block size and granularity, and check
the size of a queue file.
Before you begin
Note: The steps in this task require you to run MQSC commands:
Procedure
-
Confirm block size and granularity.
The default block size is 512 bytes. To support queue files greater than two terabytes, the queue
manager will need to increase the block size.
The block size is automatically calculated when you configure the MAXFSIZE for a queue, but
the revised block size cannot be applied to the queue if the queue already has messages on it. Once
a queue is empty, the queue manager automatically modifies the block size to support the configured
MAXFSIZE.
The DISPLAY QSTATUS command has a new attribute, CURMAXFS, that allows you to
confirm that a queue has been modified to use a new block size.
In the following example, the
CURMAXFS value of 4177920 confirms that the
queue file is currently able to grow to approximately four terabytes in size. If the value of
MAXFSIZE configured on the queue is greater than the value of
CURMAXFS, then the queue manager is still waiting for the queue to be emptied
before it reconfigures the block size of the queue file.
DISPLAY QSTATUS(LARGEQUEUE) CURMAXFS
2 : DISPLAY QSTATUS(LARGEQUEUE) CURMAXFS
AMQ8450I: Display queue status details
QUEUE(LARGEQUEUE) TYPE(QUEUE)
CURMAXFS(4177920) CURDEPTH(100000)
-
Check the size of a queue file.
You can display the current size of a queue file on disk, in megabytes, using the
CURFSIZE attribute in the
DISPLAY QSTATUS command. This can be useful on platforms such as the
IBM MQ Appliance, where it is not possible to access the file system
directly.
DISPLAY QSTATUS(SMALLQUEUE) CURFSIZE
1 : DISPLAY QSTATUS(SMALLQUEUE) CURFSIZE
AMQ8450I: Display queue status details
QUEUE(SMALLQUEUE) TYPE(QUEUE)
CURDEPTH(4024) CURFSIZE(10)
Note: When a queue has messages
removed from it, the
CURFSIZE attribute does not decrease immediately.
Typically, space in a queue file is only released when no applications have the queue open and
there are no in-doubt messages stored on the queue. Any necessary truncation or compaction of a
queue file that is loaded by the queue manager occurs during
checkpoint,
queue manager shutdown or whilst recording a media image of the queue.