![[V9.1.5 Apr 2020]](ng915.gif)
![[UNIX, Linux, Windows, IBM i]](ngmulti.gif)
Calculating how much data an IBM MQ queue file can store
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.
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)
Checking 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 might not decrease immediately.
Typically, unused space in a queue file is only released in the following circumstances:
- When no applications have the queue open
- After 1000 writes to the queue manager log, or
- At queue manager shutdown