aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-03-28 15:01:05 +0100
committerAlex Auvolat <alex@adnab.me>2024-03-28 15:01:05 +0100
commit8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860 (patch)
tree49d6c32376708147e90ba64ea32cea7835e751c1 /doc
parent25c196f34d958f4f61d50c89a1c5d40b96d7cd24 (diff)
parentecf641d88c264f7278d13a6d988288feb24a5dfe (diff)
downloadgarage-8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860.tar.gz
garage-8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860.zip
Merge branch 'main' into next-0.10
Diffstat (limited to 'doc')
-rw-r--r--doc/book/reference-manual/configuration.md33
-rw-r--r--doc/book/reference-manual/monitoring.md11
2 files changed, 44 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,
diff --git a/doc/book/reference-manual/monitoring.md b/doc/book/reference-manual/monitoring.md
index f392c133..53608d95 100644
--- a/doc/book/reference-manual/monitoring.md
+++ b/doc/book/reference-manual/monitoring.md
@@ -225,6 +225,17 @@ block_bytes_read 120586322022
block_bytes_written 3386618077
```
+#### `block_ram_buffer_free_kb` (gauge)
+
+Kibibytes available for buffering blocks that have to be sent to remote nodes.
+When clients send too much data to this node and a storage node is not receiving
+data fast enough due to slower network conditions, this will decrease down to
+zero and backpressure will be applied.
+
+```
+block_ram_buffer_free_kb 219829
+```
+
#### `block_compression_level` (counter)
Exposes the block compression level configured for the Garage node.