onstat -g laq command: Print secondary server queues
Use the onstat -g laq command to print information about queues on the secondary server that apply log information received from the primary server.
In a high-availability cluster, the primary server sends log records to one or more secondary servers over the network. Each secondary server continuously replays the transaction logs from the primary server to ensure that data is replicated on the secondary server. Each tblspace on the primary server is assigned a queue on the secondary server in which to receive log records. A thread, called an apply thread, applies the logs stored in the queue to the secondary server. The logs are applied in the order in which they were received.
You use the onstat -g laq command to monitor the performance of the queues on the secondary server. Use this command if you suspect that the primary server performance is slowed because logs are not replaying quickly enough on the secondary server. The Avg Depth (average depth) column indicates the average number of logs in the queue at the time that the last queue insert operation occurred.
The onstat -g laq command is valid only on secondary servers. Running the command on the primary server returns only the onstat header output.
Example output
Output description
- Thread
- The name of the apply thread assigned to receive the log record.
- Queue Size
- The number of log records queued for the apply thread.
- Total Queued
- The total number of queued log records for a given apply thread.
- Avg Depth
- The average number of logs in the queue at the time that the last queue insert operation occurred.
- Secondary Apply Queue
- The secondary apply queue receives log buffers from the primary server. The values displayed represent the total number of buffers allocated to receiving log buffer records, the size of the queue, and the number of unused buffers.
- Log Recovery Queue
- The log recovery queue receives output from the secondary apply queue. The log buffers are converted to a format compatible with the ontape utility. The values displayed represent the total number of stream buffers in the recovery queue, the size of the stream buffers, and the number of unused buffers.
- Log Page Queue
- The log page queue receives output from the log recovery queue. The ontape formatting is removed and the data is divided into individual log pages. The values displayed represent the total number of log pages in the queue, the size of the queue, and the number of unused buffers.
- Log Record Queue
- The log record queue receives output from the log page queue. The log pages are divided into individual log records. The values displayed represent the total number of log records in the recovery queue, the size of the queue, and the number of unused buffers.
- Transaction Latency
-
Time difference between last replayed transaction commit time at primary server and local server. For this to be accurate, operating system time must match between primary and secondary servers.
- Apply rate
-
Number of log records replayed per second. Apply rate is only shown with -r option.