Memory Reserve for Persistence Servers
Memory reserve is pre-allocated memory with which a persistence server could continue limited operations after exhausting available memory.
For best results, avoid exhausting available memory. Techniques include pre-production resource allocation testing and appropriate configuration of the persistence store’s byte limit parameter.
Memory reserve does not guarantee continued operation, merely a best effort attempt. For example, other processes could interfere with memory reserve operation.
Stored messages occupy process memory within a persistence server process. As a server accumulates message data from publishers, it allocates memory. As clients consume stored messages, the persistence server reclaims their memory.
If the operating system denies a request to allocate memory, the persistence server must discontinue normal operation. However, the server can continue partial service using its memory reserve.
- Message data growth exhausts available memory on the persistence server host computer.
Such growth could indicate that subscribing clients are operating slowly, or not operating at all. Alternatively, the issue could result from high demand for memory by another process on the persistence server host computer.
- The persistence server rejects all new inbound data messages from publishing clients.
- Meanwhile, the persistence server attempts to use memory from the reserve for limited operation, for example, to continue replication, and to service data requests and acknowledgements from subscribing clients.
- The demand for memory subsides.
- When the server can reallocate its full memory reserve, it resumes accepting and storing new messages from publishing clients.
Administrators can specify the memory reserve using the command line parameter --mem-reserve. (See tibstore Command Line Reference.)
As a rule of thumb, reserve an additional 10% of the maximum expected volume of stored message data. For best results, test persistence server behavior in a pre-production environment, and adjust the size of the memory reserve accordingly.