Система хранения

Конфигурация системы хранения данных, за исключением системы онлайн-резервирования, полностью управляется из отдельного конфигурационного файла. После установки системы этот файл автоматически не создается и все значения берутся по умолчанию. При необходимости корректировки параметров работы системы хранения рекомендуется в файле прописывать только те переменные, значения которых необходимо изменить.

Путь к файлу: custom/storage.cfg

Пример содержимого конфигурационного файла с описанием параметров и их значением по умолчанию:

########### storage service

##### one-time initialization variables

# number of initialization threads
service.initthreads = 4

##### life-time updatable variables

# number of days to keep objects in trash (min = 1, max = 120)
service.trash.period = 30
# set value to -1 to disable automatic trash deleting
service.trash.period = -1

########### props/objects db

##### one-time initialization variables

# cache size in MB, must be power of two
props.cache.size = 16
# number of cache chunks
props.cache.chunks = 1
# max number of locks and locks objects allowed
props.cache.maxlocks = 10000
# log buffer size, in MB
props.cache.logbsize = 2

##### life-time updatable variables

# maximum number of logs to force checkpoint/backup
props.checkpoint.maxlogs = 20
# checkpoint interval in minutes
props.checkpoint.interval = 60

# minimum number of total pages to start properties environment trickle
props.trickle.mintotalpages = 100
# minimum number of dirty pages to start properties environment  trickle
props.trickle.mindirtypages = 12500
# minimum rate of clean pages (percentage) to start properties environment  trickle
props.trickle.mincleanrate = 70
# default interval in minutes between properties environment  trickle
props.trickle.interval = 10
# percentage of pages to trickle during properties environment trickle, should be between mincleanrate and 100
props.trickle.rate = 100


########### messages db

##### one-time initialization variables

# cache size in MB, must be power of two
msgs.cache.size = 64
# number of cache chunks
msgs.cache.chunks = 1
# max number of locks and locks objects allowed, min 15000
msgs.cache.maxlocks = 20000
# max number of lockers
msgs.cache.maxlockers = 2000
# log buffer size, in MB
msgs.cache.logbsize = 2

##### life-time updatable variables

# defragmentation interval, in days
msgs.defrag.interval = 1
# defragmentation hour, -1 if not important
msgs.defrag.hour = -1
# force messages defragmentation immediately
msgs.defrag.force = 0

# maximum number of messages in one part (v1), in millions
msgs.part.maxmsgs = 20
# minimum number of messages in one part (v1), in millions
msgs.part.minmsgs = 1
# max fragmentation level of part to skip its defragmentation
msgs.part.maxfragrate = 20
# maximum number of messages in one part (v2), in millions
msgs.part.maxmsgs2 = 20

# maximum number of logs to force checkpoint/backup
msgs.checkpoint.maxlogs = 30
# checkpoint interval in minutes
msgs.checkpoint.interval = 10
# do we need to sync environment after checkpoint: 0 - none, 1 - trickle, 2 - full-sync
msgs.checkpoint.sync = 0
# if msgs.checkpoint.sync = 1, then this defines trickle percentage
msgs.checkpoint.tricklerate = 100

# do we need to sync environment during application termination: 0 - none, 1 - trickle, 2 - full-sync
msgs.terminate.sync = 1

# minimum number of total pages to start messages environment trickle
msgs.trickle.mintotalpages = 100
# minimum number of dirty pages to start messages environment  trickle
msgs.trickle.mindirtypages = 1500
# minimum rate of clean pages (percentage) to start messages environment  trickle
msgs.trickle.mincleanrate = 70
# default interval in minutes between messages environment  trickle
msgs.trickle.interval = 10
# percentage of pages to trickle during messages environment trickle, should be between mincleanrate and 100
msgs.trickle.rate = 100

# sync server URI, in format: IP:PORT
msgs.sync.uri = 

Изменять эти параметы на значения, отличные от значений по умолчанию, не рекомендуется.

Значения в разделах «life-time updatable variables» можно менять во время работы сервиса, причем Wialon автоматически перезагрузит конфигурационный файл и будет использовать новые значения.

Was this helpful?
Thank you!