High Quality JMS Messaging.

Monitoring the Data Store

The usage of the data store "page.db" can be monitored with SwiftMQ 5.2.0 and higher. To this the "Usage" section of the Store Swiftlet contains a "Files" entity list with one entry "page.db". This entry consists of attributes file-size, free-pages and used-pages:

The entity list can also be display as an Entity Table Frame:

By pushing the chart button a usage history of the "page.db" can be displayed:

The attribute values are collected from the data store. The collect interval is defined in attribute "size-collect-interval" of entity "database". The default value is 10000 ms (10 secs). A value of -1 turns it off:

Shrinking the Data Store

When pages are released in the data store "page.db", they are kept in a free page list and will be reused. The file is not automatically shrinked for performance reasons. This could lead to a large data store with many free pages. The only way to reduze the file size was to reboot the router, because the file is shrinked during the startup of the Store Swiftlet to the last used page. SwiftMQ 5.2.0 and higher allows to perform a shrink during operation. The "shrink" command is available in context "sys$store/database". It can be invoked from CLI as well as from the SwiftMQ Explorer.

To invoke it from CLI, switch to context "sys$store/database" and perform the command "shrink":

Example:

    router1> cc sys$store
    router1/sys$store> cc database
    router1/sys$store/database> shrink

    Shrink initiated.

    router1/sys$store/database> _

To router initiates a checkpoint and runs the shrink thereafter.

You can also shrink it from SwiftMQ Explorer. The following shows the file before the shrink:

Performing the command:

Results in:

Schedule a Shrink Job via the Scheduler Swiftlet

The Store Swiftlet registers a job "Shrink" in job group "Store" at the Scheduler Swiftlet:

This job can be used to schedule a shrink at a specific time of a day. The following example schedules the "Shrink" job at 00:00 on each business day: