OFF_RECVRY_THREADS and ON_RECVRY_THREADS and their effect on fast recovery
The OFF_RECVRY_THREADS configuration parameter specifies the number of recovery threads that operate when the database server performs a cold restore or fast recovery. The setting of ON_RECVRY_THREADS specifies the number of recovery threads that operate when the database server performs a warm restore.
To improve the performance of fast recovery, increase the number of recovery threads with the OFF_RECVRY_THREADS configuration parameter. When fast recovery begins, the database server creates an LGR memory pool and allocates approximately 100 KB from this pool for each recovery thread. The LGR pool and its memory are freed when fast recovery completes. Because secondary servers in a high-availability cluster are almost always in fast recovery mode, the LGR memory pool is almost always present on secondary servers.
Follow these guidelines when you set the OFF_RECVRY_THREADS configuration parameter:
- If you have enough shared memory, set the number of threads to the number of tables or fragments that are frequently updated. Balance the number of threads with the amount of shared memory.
- On a single-CPU computer, set the number of threads to 10 - 30 or 40. The cost of too many threads can outweigh the advantages of parallel operations.
A warm restore takes place concurrently with other database operations. To reduce the impact of the warm restore on other users, you can allocate fewer threads to it than you might allocate to a cold restore. However, to replay logical-log transactions in parallel during a warm restore, specify more threads with the ON_RECVRY_THREADS configuration parameter.