From e1ebb486551599a5fc8ab72ae2eec9fe056c1476 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 1 Jun 2021 21:24:01 +0300 Subject: [PATCH] [#493] config/example: Add storage engine's configurations Signed-off-by: Leonard Lyubich --- config/example/node.env | 61 ++++++++++++++++++++++++++++++++++- config/example/node.json | 69 ++++++++++++++++++++++++++++++++++++++++ config/example/node.yaml | 69 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 198 insertions(+), 1 deletion(-) diff --git a/config/example/node.env b/config/example/node.env index d4c9c3711..d7ed1978b 100644 --- a/config/example/node.env +++ b/config/example/node.env @@ -4,4 +4,63 @@ NEOFS_PROFILER_ADDRESS=127.0.0.1:6060 NEOFS_PROFILER_SHUTDOWN_TIMEOUT=15s NEOFS_METRICS_ADDRESS=127.0.0.1:9090 -NEOFS_METRICS_SHUTDOWN_TIMEOUT=15s \ No newline at end of file +NEOFS_METRICS_SHUTDOWN_TIMEOUT=15s + + +# Storage engine section +NEOFS_STORAGE_SHARD_NUM=2 +## 0 shard +### Write cache config +NEOFS_STORAGE_SHARD_0_USE_WRITE_CACHE=false +NEOFS_STORAGE_SHARD_0_WRITECACHE_PATH=tmp/0/cache +NEOFS_STORAGE_SHARD_0_WRITECACHE_MEM_SIZE=111 +NEOFS_STORAGE_SHARD_0_WRITECACHE_DB_SIZE=222 +NEOFS_STORAGE_SHARD_0_WRITECACHE_SMALL_SIZE=333 +NEOFS_STORAGE_SHARD_0_WRITECACHE_MAX_SIZE=444 +NEOFS_STORAGE_SHARD_0_WRITECACHE_WORKERS_NUMBER=555 +### Metabase config +NEOFS_STORAGE_SHARD_0_METABASE_PATH=tmp/0/meta +NEOFS_STORAGE_SHARD_0_METABASE_PERM=0700 +### Blobstor config +NEOFS_STORAGE_SHARD_0_BLOBSTOR_PATH=tmp/0/blob +NEOFS_STORAGE_SHARD_0_BLOBSTOR_PERM=0666 +NEOFS_STORAGE_SHARD_0_BLOBSTOR_SHALLOW_DEPTH=5 +NEOFS_STORAGE_SHARD_0_BLOBSTOR_COMPRESS=true +NEOFS_STORAGE_SHARD_0_BLOBSTOR_SMALL_SIZE_LIMIT=77 +### Blobovnicza config +NEOFS_STORAGE_SHARD_0_BLOBSTOR_BLOBOVNICZA_SIZE=1024 +NEOFS_STORAGE_SHARD_0_BLOBSTOR_BLOBOVNICZA_SHALLOW_DEPTH=10 +NEOFS_STORAGE_SHARD_0_BLOBSTOR_BLOBOVNICZA_SHALLOW_WIDTH=20 +NEOFS_STORAGE_SHARD_0_BLOBSTOR_BLOBOVNICZA_OPENED_CACHE_SIZE=88 +### GC config +#### Limit of the single data remover's batching operation in number of objects +NEOFS_STORAGE_SHARD_0_GC_REMOVER_BATCH_SIZE=123 +#### Sleep interval between data remover tacts +NEOFS_STORAGE_SHARD_0_GC_REMOVER_SLEEP_INTERVAL=3h + +## 1 shard +### Write cache config +NEOFS_STORAGE_SHARD_1_USE_WRITE_CACHE=true +NEOFS_STORAGE_SHARD_1_WRITECACHE_PATH=tmp/1/cache +NEOFS_STORAGE_SHARD_1_WRITECACHE_MEM_SIZE=112 +NEOFS_STORAGE_SHARD_1_WRITECACHE_DB_SIZE=223 +NEOFS_STORAGE_SHARD_1_WRITECACHE_SMALL_SIZE=334 +NEOFS_STORAGE_SHARD_1_WRITECACHE_MAX_SIZE=445 +NEOFS_STORAGE_SHARD_1_WRITECACHE_WORKERS_NUMBER=556 +### Metabase config +NEOFS_STORAGE_SHARD_1_METABASE_PATH=tmp/1/meta +NEOFS_STORAGE_SHARD_1_METABASE_PERM=0701 +### Blobstor config +NEOFS_STORAGE_SHARD_1_BLOBSTOR_PATH=tmp/1/blob +NEOFS_STORAGE_SHARD_1_BLOBSTOR_PERM=0667 +NEOFS_STORAGE_SHARD_1_BLOBSTOR_COMPRESS=false +NEOFS_STORAGE_SHARD_1_BLOBSTOR_SHALLOW_DEPTH=6 +NEOFS_STORAGE_SHARD_1_BLOBSTOR_SMALL_SIZE_LIMIT=78 +### Blobovnicza config +NEOFS_STORAGE_SHARD_1_BLOBSTOR_BLOBOVNICZA_SIZE=1025 +NEOFS_STORAGE_SHARD_1_BLOBSTOR_BLOBOVNICZA_SHALLOW_DEPTH=11 +NEOFS_STORAGE_SHARD_1_BLOBSTOR_BLOBOVNICZA_SHALLOW_WIDTH=21 +NEOFS_STORAGE_SHARD_1_BLOBSTOR_BLOBOVNICZA_OPENED_CACHE_SIZE=89 +### GC config +NEOFS_STORAGE_SHARD_1_GC_REMOVER_BATCH_SIZE=124 +NEOFS_STORAGE_SHARD_1_GC_REMOVER_SLEEP_INTERVAL=3h1s diff --git a/config/example/node.json b/config/example/node.json index 660037a13..4b3e964b3 100644 --- a/config/example/node.json +++ b/config/example/node.json @@ -9,5 +9,74 @@ "metrics": { "address": "127.0.0.1:9090", "shutdown_timeout": "15s" + }, + "storage": { + "shard_num": 2, + "shard": { + "0": { + "use_write_cache": false, + "writecache": { + "path": "tmp/0/cache", + "mem_size": 111, + "db_size": 222, + "small_size": 333, + "max_size": 444, + "workers_number": 555 + }, + "metabase": { + "path": "tmp/0/meta", + "perm": "0700" + }, + "blobstor": { + "path": "tmp/0/blob", + "perm": "0666", + "shallow_depth": 5, + "compress": true, + "small_size_limit": 77, + "blobovnicza": { + "size": 1024, + "shallow_depth": 10, + "shallow_width": 20, + "opened_cache_size": 88 + } + }, + "gc": { + "remover_batch_size": 123, + "remover_sleep_interval": "3h" + } + }, + "1": { + "use_write_cache": true, + "writecache": { + "path": "tmp/1/cache", + "mem_size": 112, + "db_size": 223, + "small_size": 334, + "max_size": 445, + "workers_number": 556 + }, + "metabase": { + "path": "tmp/1/meta", + "perm": "0701" + }, + "blobstor": { + "path": "tmp/1/blob", + "perm": "0667", + "shallow_depth": 6, + "compress": false, + "small_size_limit": 78, + "blobovnicza": { + "size": 1025, + "shallow_depth": 11, + "shallow_width": 21, + "opened_cache_size": 89 + } + }, + "gc": { + "remover_batch_size": 124, + "remover_sleep_interval": "3h1s" + } + } + } } } diff --git a/config/example/node.yaml b/config/example/node.yaml index 15318a4a4..9b37515b7 100644 --- a/config/example/node.yaml +++ b/config/example/node.yaml @@ -1,8 +1,77 @@ logger: level: debug + profiler: address: 127.0.0.1:6060 shutdown_timeout: 15s + metrics: address: 127.0.0.1:9090 shutdown_timeout: 15s + +storage: + shard_num: 2 + shard: + 0: + use_write_cache: false + + writecache: + path: tmp/0/cache + mem_size: 111 + db_size: 222 + small_size: 333 + max_size: 444 + workers_number: 555 + + metabase: + path: tmp/0/meta + perm: 0700 + + blobstor: + path: tmp/0/blob + perm: 0666 + shallow_depth: 5 + compress: true + small_size_limit: 77 + + blobovnicza: + size: 1024 + shallow_depth: 10 + shallow_width: 20 + opened_cache_size: 88 + + gc: + remover_batch_size: 123 + remover_sleep_interval: 3h + + 1: + use_write_cache: true + + writecache: + path: tmp/1/cache + mem_size: 112 + db_size: 223 + small_size: 334 + max_size: 445 + workers_number: 556 + + metabase: + path: tmp/1/meta + perm: 0701 + + blobstor: + path: tmp/1/blob + perm: 0667 + shallow_depth: 6 + compress: false + small_size_limit: 78 + + blobovnicza: + size: 1025 + shallow_depth: 11 + shallow_width: 21 + opened_cache_size: 89 + + gc: + remover_batch_size: 124 + remover_sleep_interval: 3h1s