Page sets 01 to 99

For page sets 01 to 99, the storage required for each page set is determined by the number and size of the messages stored on that page set. (Messages on shared queues are not stored on page sets.)

Divide this value by 4096 to determine the number of records to specify in the cluster for the page set data set.

 

Calculating the storage requirement for messages

This section describes how messages are stored on pages. Understanding this will help you calculate how much page set storage we need to define for your messages. To calculate the approximate space required for all messages on a page set consider maximum queue depth of all the queues that map to the page set and the average size of messages on those queues.

You must allow for the possibility that message "gets" might be delayed for reasons outside the control of WebSphere MQ (for example, because of a problem with your communications protocol). In this case, the "put" rate of messages might far exceed the "get" rate. This could lead to a large increase in the number of messages stored in the page sets and a consequent increase in the storage size demanded.

Each page in the page set is 4096 bytes long. Allowing for fixed header information, each page has 4057 bytes of space available for storing messages.

When calculating the space required for each message, the first thing you need to consider is whether the message fits on one page (a short message) or whether it needs to be split over two or more pages (a long message). When messages are split in this way, we need to allow for additional control information in your space calculations.

For the purposes of space calculation, a message can be represented like this:

The message header section contains the message descriptor (352 bytes) and other control information, the size of which varies depending on the size of the message. The message data section contains all the actual message data, and any other headers (for example, the transmission header or the IMS bridge header).

A minimum of two pages are required for page set control information. This is typically less than 1% of the total space required for messages.

Short messages

A short message is defined as a message that fits on one page.

For a short message the control information is 20 bytes long. When this is added to the length of the message header, the usable space remaining on the page is 3685 bytes. If the size of the message data is 3685 bytes or less, WebSphere MQ stores the messages in the next available space on the page, or if there is not enough space available, on the next page, as shown in Figure 19:

Figure 19. How WebSphere MQ stores short messages on page sets

If there is sufficient space remaining on the page, the next message is also stored on this page, if not, the remaining space on the page is left unused.

Long messages

If the size of the message data is greater than 3685 bytes, but not greater than 4 MB, the message is classed as a long message. When presented with a long message, WebSphere MQ stores the message on a series of pages, and stores control information that points to these pages in the same way that it would store a short message. This is shown in Figure 20:

Figure 20. How WebSphere MQ stores long messages on page sets

Each segment of the long message is preceded by 8 bytes of control information, and the first segment also includes the message header portion of 352 bytes. This means that the first page contains 3697 bytes of the message data. The remaining message data is placed on subsequent pages, in 4049-byte segments. If this does not fill an exact number of pages, the remaining space in the last page is left unused.

The number of pages (

n) used for a long message is calculated as follows:

     message data length + 352
n = -------------------------
               4049
 
rounded up to the nearest page

In addition to this, we need to allow space for the control information that points to the pages. The length of this (

c) depends on the length of the message, and is calculated as follows:

c = 20 + (3n) bytes
 
(where n is the number of pages calculated above)

This means that the total page set space required for a long message is:

(n * 4096) + c bytes
Very long messages

Very long messages are messages with a size greater than 4 MB. These are stored so that each 4 MB uses 1037 pages. Any remainder is stored in the same way as a long message, as described above.