From 34959b26dfdab25d794719757ad2c486acd32787 Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Mon, 13 Jun 2022 00:54:23 -0700 Subject: [PATCH] docs: explain behavior of system gc command (#13342) --- website/content/docs/commands/system/gc.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/website/content/docs/commands/system/gc.mdx b/website/content/docs/commands/system/gc.mdx index 5255414ec..0750d3142 100644 --- a/website/content/docs/commands/system/gc.mdx +++ b/website/content/docs/commands/system/gc.mdx @@ -10,6 +10,20 @@ description: | Initializes a garbage collection of jobs, evaluations, allocations, and nodes. This is an asynchronous operation. +Nomad periodically garbage collects jobs, evaluations, allocations, and nodes. +The exact garbage collection logic varies by object, but in general Nomad only +permanently deletes objects once they are terminal and no longer needed for +future scheduling decisions. See [`gc` related server agent configuration +parameters][gc_params] for details on tuning periodic garbage collection. + +[gc_params]: /docs/configuration/server#node_gc_threshold + +The `system gc` command bypasses these settings and immediately attempts to +garbage collect dead objects regardless of any "threshold" or "interval" server +settings. This is useful to quickly free memory on servers running low, but +users should prefer tuning periodic garbage collection parameters to meet their +needs instead of relying on manually running `system gc`. + ## Usage ```plaintext