From cb33bcbeb80f293a34332a26623cf6a829bc6879 Mon Sep 17 00:00:00 2001 From: Brian Shumate Date: Mon, 5 Dec 2016 12:28:49 -0500 Subject: [PATCH 1/2] Notes about memory usage (helps with #2535) --- .../docs/guides/performance.html.markdown | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/website/source/docs/guides/performance.html.markdown b/website/source/docs/guides/performance.html.markdown index c33c3bebca..d6c62a67eb 100644 --- a/website/source/docs/guides/performance.html.markdown +++ b/website/source/docs/guides/performance.html.markdown @@ -87,3 +87,20 @@ respect them. * In other applications that perform high volumes of reads against Consul, consider using the [stale consistency mode](/docs/agent/http.html#consistency) available to allow reads to scale across all the servers and not just be forwarded to the leader. + + +## Memory Requirements + +Consul server agents operate on a working set of data comprised of key/value +entries, the service catalog, prepared queries, access control lists, and +sessions in memory. These data are persisted through Raft to disk in the form +of a snapshot and log of changes since the previous snapshot for durability. + +When planning for memory requirements, you should typically allocate +enough RAM for your server agents to contain between 2 to 4 times the working +set size. You can determine the working set size by noting the value of +`consul.runtime.alloc_bytes` in the [Telemetry data](https://www.consul.io/docs/agent/telemetry.html). + +> NOTE: Consul is not designed to serve as a general purpose database, and you +> should keep this in mind when choosing what data are populated to the +> key/value store. From 957012074927b22b1eacf46195b831a485b825a0 Mon Sep 17 00:00:00 2001 From: Brian Shumate Date: Tue, 6 Dec 2016 14:12:05 -0500 Subject: [PATCH 2/2] Address feedback --- website/source/docs/guides/performance.html.markdown | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/source/docs/guides/performance.html.markdown b/website/source/docs/guides/performance.html.markdown index d6c62a67eb..35de7030ce 100644 --- a/website/source/docs/guides/performance.html.markdown +++ b/website/source/docs/guides/performance.html.markdown @@ -88,7 +88,6 @@ respect them. [stale consistency mode](/docs/agent/http.html#consistency) available to allow reads to scale across all the servers and not just be forwarded to the leader. - ## Memory Requirements Consul server agents operate on a working set of data comprised of key/value @@ -99,7 +98,7 @@ of a snapshot and log of changes since the previous snapshot for durability. When planning for memory requirements, you should typically allocate enough RAM for your server agents to contain between 2 to 4 times the working set size. You can determine the working set size by noting the value of -`consul.runtime.alloc_bytes` in the [Telemetry data](https://www.consul.io/docs/agent/telemetry.html). +`consul.runtime.alloc_bytes` in the [Telemetry data](/docs/agent/telemetry.html). > NOTE: Consul is not designed to serve as a general purpose database, and you > should keep this in mind when choosing what data are populated to the