diff options
author | Alex Auvolat <alex@adnab.me> | 2024-03-28 15:01:05 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-28 15:01:05 +0100 |
commit | 8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860 (patch) | |
tree | 49d6c32376708147e90ba64ea32cea7835e751c1 /doc/book/reference-manual/configuration.md | |
parent | 25c196f34d958f4f61d50c89a1c5d40b96d7cd24 (diff) | |
parent | ecf641d88c264f7278d13a6d988288feb24a5dfe (diff) | |
download | garage-8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860.tar.gz garage-8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860.zip |
Merge branch 'main' into next-0.10
Diffstat (limited to 'doc/book/reference-manual/configuration.md')
-rw-r--r-- | doc/book/reference-manual/configuration.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/book/reference-manual/configuration.md b/doc/book/reference-manual/configuration.md index 6fbe829f..3202daf6 100644 --- a/doc/book/reference-manual/configuration.md +++ b/doc/book/reference-manual/configuration.md @@ -21,6 +21,7 @@ metadata_auto_snapshot_interval = "6h" db_engine = "lmdb" block_size = "1M" +block_ram_buffer_max = "256MiB" lmdb_map_size = "1T" @@ -87,6 +88,7 @@ The following gives details about each available configuration option. Top-level configuration options: [`allow_world_readable_secrets`](#allow_world_readable_secrets), +[`block_ram_buffer_max`](#block_ram_buffer_max), [`block_size`](#block_size), [`bootstrap_peers`](#bootstrap_peers), [`compression_level`](#compression_level), @@ -434,6 +436,37 @@ files will remain available. This however means that chunks from existing files will not be deduplicated with chunks from newly uploaded files, meaning you might use more storage space that is optimally possible. +#### `block_ram_buffer_max` (since v0.9.4) {#block_ram_buffer_max} + +A limit on the total size of data blocks kept in RAM by S3 API nodes awaiting +to be sent to storage nodes asynchronously. + +Explanation: since Garage wants to tolerate node failures, it uses quorum +writes to send data blocks to storage nodes: try to write the block to three +nodes, and return ok as soon as two writes complete. So even if all three nodes +are online, the third write always completes asynchronously. In general, there +are not many writes to a cluster, and the third asynchronous write can +terminate early enough so as to not cause unbounded RAM growth. However, if +the S3 API node is continuously receiving large quantities of data and the +third node is never able to catch up, many data blocks will be kept buffered in +RAM as they are awaiting transfer to the third node. + +The `block_ram_buffer_max` sets a limit to the size of buffers that can be kept +in RAM in this process. When the limit is reached, backpressure is applied +back to the S3 client. + +Note that this only counts buffers that have arrived to a certain stage of +processing (received from the client + encrypted and/or compressed as +necessary) and are ready to send to the storage nodes. Many other buffers will +not be counted and this is not a hard limit on RAM consumption. In particular, +if many clients send requests simultaneously with large objects, the RAM +consumption will always grow linearly with the number of concurrent requests, +as each request will use a few buffers of size `block_size` for receiving and +intermediate processing before even trying to send the data to the storage +node. + +The default value is 256MiB. + #### `lmdb_map_size` {#lmdb_map_size} This parameters can be used to set the map size used by LMDB, |