From cb33bcbeb80f293a34332a26623cf6a829bc6879 Mon Sep 17 00:00:00 2001 From: Brian Shumate Date: Mon, 5 Dec 2016 12:28:49 -0500 Subject: [PATCH] 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.