These parameters control properties of the SharePlex queues.
SP_QUE_MAX_QUEUES
This parameter determines the maximum number of queues allowed per instance of sp_cop. By default, each capture and export queue uses 8 MB of shared memory and each post queue uses 32MB. If the system has enough memory, you can increase the value of this parameter. On startup, SharePlex displays the amount of shared memory that is required for the number of queues in the active configuration files.
Default: 25
Range of valid values: 9 - 254
Takes effect: When sp_cop is restarted
SP_QUE_POST_SHMSIZE
This parameter determines the specific shared-memory size for the post queue.
Important: Increasing this parameter might require an increase in the maximum shared memory segment size in your system settings.
Default: 32 megabytes
Range of valid values: integer greater than 0
Takes effect: When sp_cop is restarted
SP_QUE_Q_SHMSIZE
This parameter determines the specific shared-memory size for the capture and export queues.
Default: 8 megabytes
Range of valid values: integer greater than 0, no maximum
Takes effect: When sp_cop is restarted
SP_QUE_SHMDBUF
This parameter controls the shared-memory buffer size, which determines how much information the SharePlex processes read from, or write to, the queues at one time. The buffer is part of the SharePlex checkpoint recovery process that facilitates fast, safe, asynchronous transport of data. The default setting is an optimal value and should not be changed without the guidance of a Technical Support representative or documented SharePlex procedure. However, it is acceptable to change this parameter if the majority of transactions are large. Try an initial setting of 65536. All values set for this parameter must be a power of 2.
Important: Increasing this parameter to a value greater than 64k might require an increase in the maximum shared memory segment size in your system settings.
Default: 32,768 bytes
Range of valid values: any positive integer in powers of 2
Takes effect: when SharePlex is restarted
SP_QUE_SYNC
SP_QUE_SYNC instructs the queue module to verify that the writes of queue data to disk have been written to the disk media before returning. This is not the standard disk write model in Unix and Linux.
In the default OS disk I/O procedure, disk writes are written to an internal OS buffer cache and then are written to disk later. This action distributes the overhead of writing to disk so processes do not have to wait for the data to be written to disk. When the data blocks are written to the buffer cache, the applications accessing the data cannot distinguish the data written to the buffer cache from data written to disk. Unlike the Oracle COMMIT, all processes that have access to the file also have access to the data in the buffer cache. If a system crash should occur between the time the data blocks are written to the buffer cache and to the physical media, any data not written to the media is at risk for being lost upon the system recovery.
The SP_QUE_SYNC parameter is implemented as follows:
SP_QUE_SYNC=0
The OS default case described in the second paragraph is the disk write algorithm used for the SharePlex queue data.
SP_QUE_SYNC=1
Setting SP_QUE_SYNC to 1 causes the O_SYNC flag to be set upon opening each queue data and header file. This flag tells the OS not to return a write call until the data has been successfully written to disk. Without the sync flag ("normal" I/O), space would be allocated for the file data but the file data might not be written due to a system crash, cluster failover, or other critical problem that causes the OS to stop executing.
SP_QUE_SYNC=2 (SharePlex default setting)
Setting the SP_QUE_SYNC parameter to 2 does not turn on the O_SYNC flag. Instead, normal writes are done until a queue write COMMIT is called. As part of the write COMMIT, the queue module executes the system call fsync on each queue data file and then on the queue header files. This eliminates redundant sync operations on data that may be rewritten later by a later write COMMIT.
Impact of setting SP_QUE_SYNC
Setting SP_QUE_SYNC to a value that causes disk writes to complete before returning might have an impact on SharePlex performance and may slightly increase I/O processing for non-SharePlex processes. The amount of overhead is dependent upon the amount of data in the queue, the filesystem types, and the types of disk drive and disk controller in use.
What SP_QUE_SYNC does not do
There are many functions that the SP_QUE_SYNC parameter does not do. Among the most common issues:
- SP_QUE_SYNC does not choose between shared memory and disk. It also does not influence when the decision is made to write to disk. It only tells the OS to guarantee that the disk write is complete to the physical disk before returning.
- It does not prevent an “out of subqueues” error.
- It does not address the “out of disk space” error - the space for file data is allocated before the write or sync to physical media is performed. If an out-of-space error occurs, it would occur before the sync is performed. Data loss is likely, but the queue is expected to be usable once free space becomes available.
-
It does not cause or prevent “out of shared memory” errors or “out of virtual memory” errors. Any message indicating loss of shared memory is most likely a failure in the queue module’s demand paging system. If an “out of virtual memory” error occurs, verify the OS parameters for data segment limits. If the usual or expected limits are not enough, contact Technical Support.
Using SP_QUE_SYNC in a cluster
In a cluster, setSP_QUE_SYNC on the primary node of the cluster (the node to which the shared variable-data directory is mounted) and on each source and target machine outside the cluster that is part of the same replication environment.
Default: 2
Range of valid values: 0 - 2
Takes effect: When SharePlex is restarted
SP_QUE_USE_SUBQUE_INDEX
This parameter improves queue performance. If the source has a high amount of concrrency, the post queue may contain numerous subqueues, each of which represents a transaction session. This may reduce the performance of the Post process. This parameter directs SharePlex to use improved indexing to access the subqueue structures. A message "Subqueue index enabled queuename" is written to the Event Log for every Post queue for which this parameter is enabled.
This parameter does not support VARRAYs. If you are replicating VARRAYs and this parameter is enabled, the parameter is ignored.
Default: 0
Range of valid values: 0 (disabled) or 1 (enabled)
Takes effect: When SharePlex is restarted