From 51b9731a086b4e158cbfa2127bcbfd6cb6274578 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 11 Sep 2023 18:03:20 +0200 Subject: make lmdb's map_size configurable (fix #628) --- doc/book/reference-manual/configuration.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/book/reference-manual') diff --git a/doc/book/reference-manual/configuration.md b/doc/book/reference-manual/configuration.md index b916bb61..c3b8ca00 100644 --- a/doc/book/reference-manual/configuration.md +++ b/doc/book/reference-manual/configuration.md @@ -17,6 +17,7 @@ block_size = 1048576 sled_cache_capacity = 134217728 sled_flush_every_ms = 2000 +lmdb_map_size = "10T" replication_mode = "3" @@ -160,6 +161,14 @@ Increase this if sled is thrashing your SSD, at the risk of losing more data in of a power outage (though this should not matter much as data is replicated on other nodes). The default value, 2000ms, should be appropriate for most use cases. +### `lmdb_map_size` + +This parameters can be used to set the map size used by LMDB, +which is the size of the virtual memory region used for mapping the database file. +The value of this parameter is the maximum size the metadata database can take. +This value is not bound by the physical RAM size of the machine running Garage. +If not specified, it defaults to 1GiB on 32-bit machines and 1TiB on 64-bit machines. + ### `replication_mode` Garage supports the following replication modes: -- cgit v1.2.3 From f8b3883611578713ecb8bcacaf24ca8029e7b739 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 11 Sep 2023 18:34:59 +0200 Subject: config: make block_size and sled_cache_capacity expressable as strings --- doc/book/reference-manual/configuration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/book/reference-manual') diff --git a/doc/book/reference-manual/configuration.md b/doc/book/reference-manual/configuration.md index c3b8ca00..08c013f7 100644 --- a/doc/book/reference-manual/configuration.md +++ b/doc/book/reference-manual/configuration.md @@ -15,9 +15,9 @@ db_engine = "lmdb" block_size = 1048576 -sled_cache_capacity = 134217728 +sled_cache_capacity = "128MiB" sled_flush_every_ms = 2000 -lmdb_map_size = "10T" +lmdb_map_size = "1T" replication_mode = "3" @@ -134,8 +134,8 @@ and not just the path to the metadata directory. ### `block_size` Garage splits stored objects in consecutive chunks of size `block_size` -(except the last one which might be smaller). The default size is 1MB and -should work in most cases. We recommend increasing it to e.g. 10MB if +(except the last one which might be smaller). The default size is 1MiB and +should work in most cases. We recommend increasing it to e.g. 10MiB if you are using Garage to store large files and have fast network connections between all nodes (e.g. 1gbps). -- cgit v1.2.3