[#859] config: rename mem_size to memcache_capacity

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-10-18 17:17:14 +03:00 committed by Alex Vanin
parent a180f09523
commit 684e3e0ae0
4 changed files with 7 additions and 7 deletions

View file

@ -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 {

View file

@ -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

View file

@ -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,

View file

@ -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