DataFS Setup Parameters

This section describes in detail the parameters you can use when creating a database.

stcStorageDiskSettings

Syntax

    struct stcStorageDiskSettings
    {
        UINT32 ulSize;

        // DiskCache
        UINT64 ullCacheSizeMin;
        UINT64 ullCacheSizeMax;
        UINT64 ullCacheSizeDelta;
        UINT32 ulCacheHalfLife;

        // Allocation
        UINT16 usFragmentingStep;
        UINT16 usFragmentingMaxSteps;
        UINT16 usFragmentingLength;
    };

Members

ulSize

Type: UINT32

The size (sizeof(stcStorageDiskSettings)) of the structure.

ullCacheSizeMin

Type: UINT64

Minimum size (in bytes) of the cache that should be used for read- write operations.

ullCacheSizeMax

Type: UINT64

Maximum size (in bytes) of the cache that should be used for read- write operations.

ullCacheSizeDelta

Type: UINT64

Delta size (in bytes) by which the cache is reduced after not being used for more than ulCacheHalfLife time.

ulCacheHalfLife

Type: UINT32

Timeout (in milliseconds) after which the cache is reduced temporarily by ullCacheSizeDelta.

usFragmentingStep

Type: UINT16

Values used to find the minimum fragment size used by the system during the allocation of data. See Remarks for more information.
If this value is set to 1, the system does not allocate fragments smaller than usFragmentingLength << usFragmentingMaxSteps.
Recommended value: 2

usFragmentingMaxSteps

Type: UINT16

The minimum fragment size used by the system during the allocation of data can be larger than usFragmentingLenght, but is never larger than usFragmentingLength << usFragmentingMaxSteps.
Recommended value: 9

usFragmentingLength

Type: UINT16

Absolute minimum fragment size used during allocation of data (except for allocations smaller this size).
Recommended value: 8

Remarks

The system calculates the minimum fragment size used during an allocation using this formula.
    int x = 0;

    while((x < usFragmentingMaxSteps)
       && (AllocationLength > (usFragmentingLength << (x * usFragmentingStep))))
        ++x;

    MinFragmentLength = usFragmentingLength << x;



stcStorageDiskOpen

Syntax

    struct stcStorageDiskOpen
    {
        UINT32                 ulSize;

        GUID                   guidId;
        wchar_t*               strPath;

        UINT16                 usDiskType;

        // Disk
        UINT32                 ulMaxActiveIo;
        UINT64                 ullIdleBlockSize;

        stcStorageDiskSettings Settings;
    };

Members

ulSize

Type: UINT32

The size (sizeof(stcStorageDiskOpen)) of the structure.

guidId

Type: GUID

Globally unique id of the disk.

strPath

Type: wchar_t*

Path to the disk (which can be a file).

usDiskType

Type: UINT16

Type of the disk. 0x0 for HDD, 0x10 for SSD. This parameter is used to optimize algorithms for the type of disk used.

ulMaxActiveIo

Type: UINT32

Maximum count of parallel active reading or writing actions on the disk. If the limit is reached, the system first waits for the completion of an action before it starts a new one.

ullIdleBlockSize

Type: UINT64

Maximum size of a block that is written in idle mode. If larger blocks are written in idle mode, they are split up into multiple blocks and disk actions. This is done to prevent a too long blocking of higher priority jobs.




stcStorageDiskCreate

Syntax

    struct stcStorageDiskCreate
    {
        UINT32             ulSize;

        UINT16             usClusterShift;

        stcStorageDiskOpen Open;
    };

Members

ulSize

Type: UINT32

The size (sizeof(stcStorageDiskCreate)) of the structure.

usClusterShift

Type: UINT16

Defines the size of a cluster (the smallest allocation unit). The size of a cluster is 1 << usClusterShift. usClusterShift is increased automatically on creation to assure that the resulting cluster size is at least as large as a memory page size of the system. Make sure that that you don't use values smaller than the block size of the storage device you are creating the database on.




stcDomainStorage

Syntax

    struct stcDomainStorage
    {
        UINT32 ulSize;

        GUID   guidDomainId;
        GUID   guidStorageId;

        UINT16 usStorageId;
        UINT8  ubtServerId;
    };

Members

ulSize

Type: UINT32

The size (sizeof(stcStorageDiskSettings)) of the structure.

guidDomainId

Type: GUID

Globally unique id of the domain.

guidStorageId

Type: GUID

Globally unique id of the storage.

usStorageId

Type: UINT16

Id of the storage in relation to the domain.

ubtServerId

Type: UINT8

Id of the server in relation to the storage.

Remarks

In case of activated replication of storages, every replica of the storage has the same usStorageId but a unique ubtServerId.
If a server hosts multiple storages, the ubtServerId can be different for all those storages.


stcDomainSettings

Syntax

    struct stcDomainSettings
    {
        UINT32       ulSize;

        // Domain
        GUID         guidId;
        wchar_t*     strName;

        UINT32       ulFlags;
    };

Members

ulSize

Type: UINT32

The size (sizeof(stcDomainSettings)) of the structure.

guidId

Type: GUID

Globally unique Id of the domain.

strName

Type: wchar_t*

Name of the domain. This name is only used in GUIs.

ulFlags

Type: UINT32

0x1 Enabled (read only, use "EnableDomain" to set it)




stcStorageSettings

Syntax

    struct stcStorageSettings
    {
        UINT32       ulSize;

        // Storage
        GUID         guidId;
        wchar_t*     strName;

        UINT32       ulFlags;

        UINT16       usStorageId;
        UINT8        ubtServerId;

        UINT8        ubtSecureBlockShift;

        // Logger
        UINT32       ulLogDataPoolLength;
        UINT32       ulLogDataReplicationPoolLength;
        UINT32       ulLogDataBlockSize;

        // ObjectStorage
        UINT32       ulMinStorageElementCount;
        UINT32       ulMaxStorageElementCount;

        UINT32       ulMinStorageDataSize;
        UINT32       ulMaxStorageDataSize;
        UINT32       ulDeltaStorageDataSize;

        // ObjectTable
        UINT32       ulMinPartObjectCount;
        UINT32       ulMaxPartObjectCount;

        // Cache
        UINT32       ulCacheHalfLife;

        UINT32       ulMinStorageCount;
        UINT32       ulMaxStorageCount;
        UINT32       ulDeltaStorageCount;

        UINT32       ulMinPartCount;
        UINT32       ulMaxPartCount;
        UINT32       ulDeltaPartCount;

        UINT32       ulWriteDownThreadCount;
        UINT32       ulMaxIncompleteTransaction;

        UINT32       ulReplicationThreadCount;
        UINT32       ulEventThreadCount;
    };

Members

ulSize

Type: UINT32

The size (sizeof(stcStorageSettings)) of the structure.

guidId

Type: GUID

Globally unique Id of the domain.

strName

Type: wchar_t*

Name of the domain. This name is only used in GUIs.

ulFlags

Type: UINT32

0x1 Enabled (read only, use "EnableStorage" to set it)

usStorageId

Type: UINT16

Id of the storage in relation to the domain.

ubtServerId

Type: UINT8

Id of the server in relation to the storage.

ubtSecureBlockShift

Type: UINT8

Defines the size of a block that is written in a single operation (atomic) by the used storage device. The size of a block is 1 << ubtSecureBlockShift. If the value is less than 9 the value is increased so that a minimum block size of 512 results.

ulLogDataPoolLength

Type: UINT32

Count of log blocks for incomming write requests kept loaded in memory.

ulLogDataReplicationPoolLength

Type: UINT32

Count of log blocks for incomming replication data kept loaded in memory.

ulLogDataBlockSize

Type: UINT32

Size of log blocks.
The minimum value is 1 MB.

ulMinStorageElementCount

Type: UINT32

Minimum count of objects that can be stored inside an object storage.
The minimum value is 32.

ulMaxStorageElementCount

Type: UINT32

Maximum count of objects that can be stored inside an object storage.
The minimum value is 8192.

ulMinStorageDataSize

Type: UINT32

Minimum size of object data that can be stored inside an object storage.
The minimum value is 4 KB.

ulMaxStorageDataSize

Type: UINT32

Maximum size of object data that can be stored inside an object storage.
The minimum value is 8 MB.

ulDeltaStorageDataSize

Type: UINT32

Size by which the object data size is increased or decreased when more or less space is needed.
The minimum value is 128 KB.

ulMinPartObjectCount

Type: UINT32

Minimum count of objects inside a part of the caching table for open objects.

ulMaxPartObjectCount

Type: UINT32

Maximum count of objects inside a part of the caching table for open objects.
The minimum value is 64.

ulCacheHalfLife

Type: UINT32

Time in milliseconds after which the system tries to reduce the size of the data inside the cache, if the data has not been used.

ulMinStorageCount

Type: UINT32

Minimum count of object storages kept loaded in memory for caching.

ulMaxStorageCount

Type: UINT32

Maximum count of object storages kept loaded in memory for caching.

ulDeltaStorageCount

Type: UINT32

Delta count by which the storage count is reduced after not being used for more than ulCacheHalfLife time.

ulMinPartCount

Type: UINT32

Minimum count of caching tables for caching of objects.

ulMaxPartCount

Type: UINT32

Maximum count of caching tables for caching of objects.

ulDeltaPartCount

Type: UINT32

Delta count by which the part count is reduced after not being used for more than ulCacheHalfLife time.

ulWriteDownThreadCount

Type: UINT32

Count of threads to be used to perform changes of logged transactions to the data of the database.

ulMaxIncompleteTransaction

Type: UINT32

Maximum incomplete transactions. A transaction is complete when it is fully processed. This is when it has been logged and all changes have been made to the data of the database.
The system does delay the execution of client write requests until the count of incomplete transactions falls below this limit.

ulReplicationThreadCount

Type: UINT32

Count of threads to be used for replication.

ulEventThreadCount

Type: UINT32

Count of threads to be used for event handling. Events are sent to clients to inform them about changes in the database.




stcDomainReplicationSettings

Syntax

    struct stcDomainReplicationSettings
    {
        UINT32       ulSize;

        GUID         guidId;
        wchar_t*     strName;

        UINT32       ulFlags;

        UINT16       usPort;
        wchar_t*     strAddress;
    };

Members

ulSize

Type: UINT32

The size (sizeof(stcDomainReplicationSettings)) of the structure.

guidId

Type: GUID

Globally unique id of the connection.

strName

Type: wchar_t*

Name of the connection.

ulFlags

Type: UINT32

Flags of the connection. 0x100 = in, 0x200 = out.

usPort

Type: UINT16

Port used to connect to the other server. (only used for outgoing connections)

strAddress

Type: wchar_t*

Address used to connect to the other server. (only used for outgoing connections)




stcStorageReplicationSettings

Syntax

    struct stcStorageReplicationSettings
    {
        UINT32       ulSize;

        GUID         guidId;
        wchar_t*     strName;

        UINT32       ulFlags;

        UINT8        ubtServerId;

        UINT16       usPort;
        wchar_t*     strAddress;
    };

Members

ulSize

Type: UINT32

The size (sizeof(stcStorageReplicationSettings)) of the structure.

guidId

Type: GUID

Globally unique id of the connection.

strName

Type: wchar_t*

Name of the connection.

ulFlags

Type: UINT32

Flags of the connection. 0x100 = in, 0x200 = out.

ubtServerId

Type: UINT8

ServerId of the other server.

usPort

Type: UINT16

Port used to connect to the other server. (only used for outgoing connections)

strAddress

Type: wchar_t*

Address used to connect to the other server. (only used for outgoing connections)

© 2021 Mobiland AG