Replication Server uses a simple caching mechanism to optimize I/O. This mechanism reduces write latency and improves reader speed, since data can usually be read quickly from the cache.
A cache is made up of multiple pages and each page is made up of multiple adjoining blocks. A cache is allocated for each queue at start-up time. Changing the page size changes the size of I/O in the stable queue devices. When a page is full, the entire page is written in one single write operation.
In stable queue caching, the page pointer moves forward and rotates back at the end of the cache. SQM flushes the current page if the writer has filled the message queue and is blocked when waiting for messages. Only blocks with data are written to a disk when flushing a page that is not full.
Set the server-wide caching default value using:
configure replication server set sqm_cache_enable to "on|off"
Enable or disable the caching for a queue and override the server-level setting using:
alter queue q_number, q_type, set sqm_cache_enable to "on|off"
When sqm_cache_enable parameter is disabled, SQM module returns back to the earlier mechanism, which maintains a fixed 16K; one-block buffer.
Set the server-wide page size default value using:
configure replication server set sqm_page_size to "num_of_blocks"
Set the page size for a specified queue using:
alter queue q_number, q_type, set sqm_page_size to "num_of_blocks"
num_of_blocks specifies the number of 16K blocks in a page. Configuring the page size also sets the I/O size of Replication Server. For example, if you set the page size to 4, this instructs the Replication Server to write to stable queue in 64K chunks.
Set the server-wide cache size default value using:
configure replication server set sqm_cache_size to "num_pages"
Set the cache size for a specified queue using:
alter queue q_number, q_type, set sqm_cache_size to "num_pages"
num_pages specifies the number pages in the cache.
All SQM configuration commands are static, thus you must restart the server for these commands to take effect.
See the Replication Server Reference Manual for detailed information about these configuration parameters.