From 684e3e0ae0440b88b36c31eb02850f24eb93b6f5 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 18 Oct 2021 17:17:14 +0300 Subject: [PATCH] [#859] config: rename `mem_size` to `memcache_capacity` Signed-off-by: Evgenii Stratonikov --- cmd/neofs-node/config/engine/shard/writecache/config.go | 4 ++-- config/example/node.env | 4 ++-- config/example/node.json | 4 ++-- config/example/node.yaml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/neofs-node/config/engine/shard/writecache/config.go b/cmd/neofs-node/config/engine/shard/writecache/config.go index b782b97043..151d4880a3 100644 --- a/cmd/neofs-node/config/engine/shard/writecache/config.go +++ b/cmd/neofs-node/config/engine/shard/writecache/config.go @@ -47,13 +47,13 @@ func (x *Config) Path() string { return p } -// MemSize returns value of "mem_size" config parameter. +// MemSize returns value of "memcache_capacity" config parameter. // // Returns MemSizeDefault if value is not a positive number. func (x *Config) MemSize() uint64 { s := config.SizeInBytesSafe( (*config.Config)(x), - "mem_size", + "memcache_capacity", ) if s > 0 { diff --git a/config/example/node.env b/config/example/node.env index 98b9594dba..f6cf81c1b2 100644 --- a/config/example/node.env +++ b/config/example/node.env @@ -73,7 +73,7 @@ NEOFS_STORAGE_SHARD_0_RESYNC_METABASE=false ### 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=2147483648 +NEOFS_STORAGE_SHARD_0_WRITECACHE_MEMCACHE_CAPACITY=2147483648 NEOFS_STORAGE_SHARD_0_WRITECACHE_SMALL_OBJECT_SIZE=16384 NEOFS_STORAGE_SHARD_0_WRITECACHE_MAX_OBJECT_SIZE=134217728 NEOFS_STORAGE_SHARD_0_WRITECACHE_WORKERS_NUMBER=30 @@ -104,7 +104,7 @@ NEOFS_STORAGE_SHARD_1_RESYNC_METABASE=true ### 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=2147483648 +NEOFS_STORAGE_SHARD_1_WRITECACHE_MEMCACHE_CAPACITY=2147483648 NEOFS_STORAGE_SHARD_1_WRITECACHE_SMALL_OBJECT_SIZE=16384 NEOFS_STORAGE_SHARD_1_WRITECACHE_MAX_OBJECT_SIZE=134217728 NEOFS_STORAGE_SHARD_1_WRITECACHE_WORKERS_NUMBER=30 diff --git a/config/example/node.json b/config/example/node.json index 86ec7601e8..57739a646c 100644 --- a/config/example/node.json +++ b/config/example/node.json @@ -105,7 +105,7 @@ "use_write_cache": false, "writecache": { "path": "tmp/0/cache", - "mem_size": 2147483648, + "memcache_capacity": 2147483648, "small_object_size": 16384, "max_object_size": 134217728, "workers_number": 30, @@ -138,7 +138,7 @@ "use_write_cache": true, "writecache": { "path": "tmp/1/cache", - "mem_size": 2147483648, + "memcache_capacity": 2147483648, "small_object_size": 16384, "max_object_size": 134217728, "workers_number": 30, diff --git a/config/example/node.yaml b/config/example/node.yaml index 366df83ddb..c980fd5970 100644 --- a/config/example/node.yaml +++ b/config/example/node.yaml @@ -93,7 +93,7 @@ storage: use_write_cache: true # use write-cache writecache: - mem_size: 2147483648 # approximate RAM usage limit for "small" objects, bytes + 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