Appendix D: CMX Replication Server memory tuning
- Last UpdatedApr 24, 2025
- 3 minute read
The CMX Replication Server (cmxrepsvr) is a multi-threaded process that uses more memory than most AVEVA Enterprise SCADA processes. Cmxrepsvr requires memory for external shared memory queues, its own internal queues, fulfill queues, multi-destination processing queues, and to store routes and other pertinent information.
External Shared Memory Queues
Additional external shared memory queues are defined in the %DNAInstallRoot%\RealTime\config\Settings\RealTime_SMQueues.json file. You can change the size of these queues by overriding the RealTime_SMQueues.json file in the %DNADataRoot%\RealTime\config\Settings directory (refer to Modify configuration settings).
You can also create a new external shared memory queue by creating or overriding the RealTime_SMQueues.json file.
Cmxrepsvr’s Internal Queues
The internal transfer service queue has a default size of 25 Megabytes (MB). The queue can grow and shrink as required, and is managed by the cmxrepsvr process.
The internal transfer monitor queue is the same size as the external shared memory queue. As the amount of external shared memory queues increases, the allocated memory for the internal transfer monitor queues likewise increases.
Fulfill Queues
The integrity, demand, time, and dematerial queues all have a default size of 1MB, and can grow and shrink as required.
The transfer queue has a default size of 5MB, and can likewise grow and shrink as required. There is no maximum size for this queue.
Multi-Destination Processing Queues
Multi-destination processing queues require the most memory compared to other queues. By default, the system creates the following queues for each route:
|
Queue |
Size (MB) |
|---|---|
|
analog |
20 * 10 (number of tables by default) = 100 |
|
status |
200 |
|
rate |
200 |
|
collect |
200 |
|
remote |
200 |
|
connection |
200 |
|
multistate |
200 |
|
tank |
200 |
|
almsum |
200 |
|
default |
200 |
Total: 200MB * 10 (number of queues) = 2000MB = 2 Gigabytes (GB) per route
Depending on the number of routes you have in your system topology, you would multiply 2GB by the number of routes. For example, if you have system A,B,C,D then 2GB * 3 routes = 6GB.
Notes: The actual memory will be larger to account for additional memory from other queues
and various caches used by cmxrepsvr.
These are the default values. With the additional table configured in RealTime_SMQueues.json file, the memory footprint should be higher.
Important: The size of the destination queue is determined by the number of tables in the RealTime_SMQueues.json file. If your environment or system has a smaller database, or if Store and Forward
can be configured for a large scale system, you can reduce the cmxrepsvr memory footprint
by removing some of the table queues specified in the RealTime_SMQueues.json file. All tables not listed in the file use the default queues, except for analog,
status, rate, and collect.
DESTINATION_QUEUE_MAX_SIZE
You can override the default queue size by overriding the DESTINATION_QUEUE_MAX_SIZE key in the %DNAInstallRoot%\RealTime\config\Settings\RealTime_CmxrepPerformance.json file. The calculation is the same. The memory usage depends on the value given to the DESTINATION_QUEUE_MAX_SIZE key.
Note: If DESTINATION_QUEUE_MAX_SIZE is smaller than the computed size, the system uses the larger value.
MAX_NUM_QUEUES_PER_TABLE
You can override the default maximum number of queues per table by overriding the MAX_NUM_QUEUES_PER_TABLE key in the %DNAInstallRoot%\RealTime\config\Settings\RealTime_CmxrepPerformance.json file. If memory is not an issue, and performance is desired, configure this setting to allow for more than the default value. The default value is 30.