BufferToDiskMax

BufferToDiskMax is used then, when the protection of data blocks from data loss has top priority.

Using BufferToDiskMax all data which are buffered in RAM are buffered at the same time on HDD, which way the data are saved twice. The directory on the HDD is arbitrary (see also config entry "bufferToDiskDir”).

Buffer behavior depending on the connection status

This section describes the behavior of the buffer process with BufferToDiskMax depending on the actually connection status to the database.

Normal mode

If the connection to the database is established, the data blocks are buffered for a short term and then they are written immediately into the database.

Connection interruption between the RDB manager and the database

The data are buffered in RAM until there is enough memory space in RAM. After reaching the limit of space in RAM, new data are buffered on hard drive disc only.

Until there is enough memory space in RAM, the data are buffered in RAM and on the HDD. After reaching the limit of space in RAM, new data are buffered on hard drive disc only.

Connection establishment between RDB manager and the database

The buffered data blocks are written in the same order into the DB, in which they were buffered. That means, that at first the oldest data from RAM are written into the database and not till then the data from the local HDD.

Breakdown of the RDB manager

If the breakdown was not caused by a HDD defect, all data can be read from the HDD (no data loss).

Re-start of the RDB manager after breakdown

If after re-start of the RDB manager also the connection to the database is re-established, the RDB manager checks whether the data blocks on the HDD are still available. In that case they will be written into the database.

In the event of a crash of a redundant RDB, the data is buffered on both systems. Thus the data are not written twice into the database, the passive RDB checks the first and the last entry in a block. If both are already present in the database, they are not written again to the database. If one of the entries is misssing, the block is written into the database. This procedure is precessed only if the RDB is passive and blocks were present on the hard disc at the start of the RDB. This mode is executed until all - available at the start of the RDB - disc buffers have been processed.

If the RDB is re-started without a connection to the database, the data blocks are buffered the same principle like in case of a breakdown, till the connection can be re-established.

Indicator of the buffer behavior

The following figure shows you the interplay between RAM and the local HDD during a data transmission. In the internal data point bufferToDiskIndicator you can see which buffer behavior is actually used.

Figure 1. Different buffer behaviors BufferToDiskMax

bufferToDiskIndicator = 0

Data blocks are buffered in RAM and on HDD. As soon as there are free blocks in the memory, the indicator is set to 0. If there are more free data blocks in the memory as on the HDD, the indicator will be also set to 0.

Causal: stable connection, no necessity for saving data onto HDD

bufferToDiskIndicator = 1

Data blocks which cannot be saved in RAM are buffered only on the HDD.

Causal: data flow, DB disconnection

bufferToDiskIndicator = 2

Buffered data blocks are written into the database in chronological order.

Causal: re-established DB connection