stores.conf
This file defines the locations of stores where the EMS server will store messages or metadata (if the default
$sys.meta
definition is overridden). You can configure one or many stores in the
stores.conf
file.
Store parameters specific to file-based stores are described here. Grid store parameters are described in Configuring and Deploying Grid Stores and FTL store parameters are described in Configuring and Deploying FTL Stores.
The format of the file is:
[store_name] # mandatory -- square brackets included type=file file=name file_destination_defrag=size [file_minimum=value] [file_truncate=value] [mode=async|sync] [processor_id=processor id]
Parameter Name | Description |
---|---|
[ store_name ]
|
[store_name] is the name that identifies this store file configuration.
Note that the square brackets [ ] DO NOT indicate that the store_name is an option; they must be included around the name. |
type
|
Identifies the store type. This parameter is required for all store types. The type can be:
|
file
|
The filename that will be used when creating this store file. This parameter is required for file stores. For example,
mystore.db .
The location for this file can be specified using absolute or relative path names. If no path separators are present, the file will be saved in the location specified by the
|
mode
|
The mode determines whether messages will be written to the store synchronously or asynchronously. Mode is either:
|
processor_id
|
When specified, the EMS Server binds the storage thread of this store to the specified processor.
Do not use this parameter if the default behavior provides sufficient throughput. If no processor ID is specified for a store, the store is not bound to a specific processor. Specify the processor-id as an integer. This parameter has similar requirements, limitations, and benefits as the
For use guidelines, see Performance Tuning. |
file_destination_defrag
|
This parameter specifies a maximum batch size used by the destination defrag feature.
Destination defrag improves store file performance by maintaining contiguous space for new messages, while improving server read performance. When persistent pending messages begin to accumulate in a queue, messages are grouped into a batch that is re-written to disk. Messages are written close together, allowing the server to read them more efficiently when later delivering the messages to consumers. Specify
size in
The size should be set to a size that is known to be acceptable for the disk where the store points to. For instance, if it is set to 2MB, your disk must be able to write a 2MB batch efficiently. If
|
file_minimum
|
This parameter preallocates disk space for the store file. Preallocation occurs when the server first creates the store file.
You can specify units of
For example: file_minimum = 32MB If
When this parameter is absent, there is no default minimum preallocation. |
file_truncate
|
Determines whether the EMS server will occasionally attempt to truncate the store file, relinquishing unused disk space.
When
When this parameter is absent, the default is
|
Example
[my_sync] type = file file = /var/local/tibems/my_sync.db file_destination_defrag=2MB file_minimum = 10MB file_truncate = true mode = sync