Compact SOW Topic
Last updated
Last updated
Copyright 2013-2024 60East Technologies, Inc.
AMPS also provides a module for reducing the unused space in a SOW file. The amps-action-do-compact-sow
module rearranges the messages in the SOW into a smaller amount of space, where possible. Since AMPS uses memory-mapped files to store messages for the SOW topic, this can also potentially reduce the memory footprint of the topic.
This module can compact a specific SOW file or the SOW files for every topic in the instance.
While messages are being added or updated within a topic in the SOW, AMPS reuses free space when possible. It is not necessary to compact the SOW file during most normal operations. This action is most useful after an activity peak that leaves a large amount of unneeded space in the file, or in installations where space is at a premium. Depending on the file size, the number of topics to be compacted, and the amount of free space, the reorganization that this operation performs may require a noticeable amount of I/O bandwidth.
60East recommends that this action run during a maintenance window or in response to a critical lack of disk space. This operation will pause updates to the topic while it is being compacted, reducing overall throughput even if the compaction process runs quickly.
When a Topic
and MessageType
are provided, this module compacts the SOW file for that topic. Otherwise, the module compacts the file for all topics in the SOW.
Parameter | Description |
---|---|
This module does not add any variables to the AMPS context.
Topic
The name of the SOW topic from which to compact.
This option must be specified if the MessageType
is provided.
There is no default for this parameter.
MessageType
The message type of the SOW topic or topics to compact.
This option must be specified if the Topic
is provided.
There is no default for this parameter.