[#1579] config: Move storage.default to shard.default

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-07-13 11:52:53 +03:00 committed by fyrchik
parent 0ab168a00a
commit 1119014e53
2 changed files with 32 additions and 31 deletions

View file

@ -24,8 +24,8 @@ const (
func IterateShards(c *config.Config, required bool, f func(*shardconfig.Config)) { func IterateShards(c *config.Config, required bool, f func(*shardconfig.Config)) {
c = c.Sub(subsection) c = c.Sub(subsection)
def := c.Sub("default")
c = c.Sub("shard") c = c.Sub("shard")
def := c.Sub("default")
i := uint64(0) i := uint64(0)
for ; ; i++ { for ; ; i++ {

View file

@ -104,38 +104,39 @@ storage:
# note: shard configuration can be omitted for relay node (see `node.relay`) # note: shard configuration can be omitted for relay node (see `node.relay`)
shard_pool_size: 15 # size of per-shard worker pools used for PUT operations shard_pool_size: 15 # size of per-shard worker pools used for PUT operations
shard_ro_error_threshold: 100 # amount of errors to occur before shard is made read-only (default: 0, ignore errors) shard_ro_error_threshold: 100 # amount of errors to occur before shard is made read-only (default: 0, ignore errors)
default: # section with the default shard parameters
resync_metabase: true # sync metabase with blobstor on start, expensive, leave false until complete understanding
writecache:
enabled: true
memcache_capacity: 2147483648 # approximate RAM usage limit for "small" objects, bytes
small_object_size: 16384 # size threshold for "small" objects which are cached in key-value DB, not in FS, bytes
max_object_size: 134217728 # size threshold for "big" objects which bypass write-cache and go to the storage directly, bytes
workers_number: 30 # number of write-cache flusher threads
metabase:
perm: 0644 # permissions for metabase files(directories: +x for current user and group)
max_batch_size: 200
max_batch_delay: 20ms
blobstor:
compress: false # turn on/off zstd(level 3) compression of stored objects
perm: 0644 # permissions for blobstor files(directories: +x for current user and group)
depth: 5 # max depth of object tree storage in FS
small_object_size: 102400 # size threshold for "small" objects which are cached in key-value DB, not in FS, bytes
blobovnicza:
size: 4194304 # approximate size limit of single blobovnicza instance, total size will be: size*width^(depth+1), bytes
depth: 1 # max depth of object tree storage in key-value DB
width: 4 # max width of object tree storage in key-value DB
opened_cache_capacity: 50 # maximum number of opened database files
gc:
remover_batch_size: 200 # number of objects to be removed by the garbage collector
remover_sleep_interval: 5m # frequency of the garbage collector invocation
shard: shard:
default: # section with the default shard parameters
resync_metabase: true # sync metabase with blobstor on start, expensive, leave false until complete understanding
writecache:
enabled: true
memcache_capacity: 2147483648 # approximate RAM usage limit for "small" objects, bytes
small_object_size: 16384 # size threshold for "small" objects which are cached in key-value DB, not in FS, bytes
max_object_size: 134217728 # size threshold for "big" objects which bypass write-cache and go to the storage directly, bytes
workers_number: 30 # number of write-cache flusher threads
metabase:
perm: 0644 # permissions for metabase files(directories: +x for current user and group)
max_batch_size: 200
max_batch_delay: 20ms
blobstor:
compress: false # turn on/off zstd(level 3) compression of stored objects
perm: 0644 # permissions for blobstor files(directories: +x for current user and group)
depth: 5 # max depth of object tree storage in FS
small_object_size: 102400 # size threshold for "small" objects which are cached in key-value DB, not in FS, bytes
blobovnicza:
size: 4194304 # approximate size limit of single blobovnicza instance, total size will be: size*width^(depth+1), bytes
depth: 1 # max depth of object tree storage in key-value DB
width: 4 # max width of object tree storage in key-value DB
opened_cache_capacity: 50 # maximum number of opened database files
gc:
remover_batch_size: 200 # number of objects to be removed by the garbage collector
remover_sleep_interval: 5m # frequency of the garbage collector invocation
0: 0:
mode: "read-only" # mode of the shard, must be one of the: "read-write" (default), "read-only" mode: "read-only" # mode of the shard, must be one of the: "read-write" (default), "read-only"
resync_metabase: false # sync metabase with blobstor on start, expensive, leave false until complete understanding resync_metabase: false # sync metabase with blobstor on start, expensive, leave false until complete understanding