LssSettings

Various settings that are used to initialise an LSS when it is created or opened with a call to CreateOrOpenLSS().


struct LssSettings
{
    int flushTimeMilliSec;
    double cleanerUtilisationPercent;
    bool enableFileBuffering;
    bool enableWriteThrough;
    int maxNumSegmentsInCache;
    int numSegmentsPerCheckPoint;
    int segmentSize;
    bool forceIncrementMSSN;
    bool validateSUTDuringCheckPoint;
};


int flushTimeMilliSec

Maximum time to flush the log after committing a transaction

Default value : 1000


double cleanerUtilisationPercent

If utilisation falls below this threshold then segment is cleaned

Default value : 85.0


bool enableFileBuffering

If set then the Win32 file cache will be used. Typically not required because the LSS performs its own buffering, with its segment cache. If enableFileBuffering is false then CreateFile() is called with FILE_FLAG_NO_BUFFERING

Default value : false


bool enableWriteThrough

If enableWriteThrough is true then CreateFile() is called with FILE_FLAG_WRITE_THROUGH

Default value : false


int maxNumSegmentsInCache

Maximum number of segments in the segment cache. With default values segment cache is 32 x 512kB = 16 MB.

Default value : 32


int numSegmentsPerCheckPoint

Sets the "rate" at which the store is check pointed. With the default values a check point is performed after writing 128 x 512kB = 64 MB to the log. This controls the maximum time taken to perform a recovery scan. For a modern hard-disk, it only takes about one second to read 64MB. Performing check points rarely has the advantage of writing less "meta data" to the log, and ensuring that the meta data is well clustered. It also means the root block is written less often.

Default value : 128


int segmentSize

Size of each segment - the unit of reading from disk. If too small, then performance becomes dominated by the head seek and rotational delay times of the hard-disk. If too large then performance becomes overly dependent on the clustering of related data. As a very rough guide, should equal the product of the maximum transfer rate of the hard-disk in bytes per second, times the seek time in seconds. Eg for transfer rate = 50 MB/sec, seek = 10 msec then product = 500k

Default value : 524288 (512kB)


bool forceIncrementMSSN

Force increment of the MSSN during start up

Default value : false


bool validateSUTDuringCheckPoint

For debugging purposes only

Default value : false