From b6eaa1086780035045e6c4324b1c7e0c072dbd01 Mon Sep 17 00:00:00 2001 From: Leo Dias Date: Thu, 24 Aug 2023 16:12:33 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20client=20gc=5Fmax=5Fallocs=20?= =?UTF-8?q?param?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ defaults/main.yml | 1 + templates/client.hcl.j2 | 1 + 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index e126db29..461c1f24 100644 --- a/README.md +++ b/README.md @@ -277,6 +277,11 @@ The role defines most of its variables in `defaults/main.yml`: - Client garbage collection interval - Default value: **1m** +### `nomad_gc_max_allocs` + +- Maximum number of allocations which a client will track before triggering a garbage collection +- Default value: **50** + ### `nomad_gc_disk_usage_threshold` - Disk usage threshold percentage for garbage collection diff --git a/defaults/main.yml b/defaults/main.yml index 5e052c0c..99b1404d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -109,6 +109,7 @@ nomad_max_kill_timeout: "30s" nomad_network_speed: 0 nomad_cpu_total_compute: 0 nomad_gc_interval: "1m" +nomad_gc_max_allocs: 50 nomad_gc_disk_usage_threshold: 80 nomad_gc_inode_usage_threshold: 70 nomad_gc_parallel_destroys: 2 diff --git a/templates/client.hcl.j2 b/templates/client.hcl.j2 index d5c9e71e..6239969b 100644 --- a/templates/client.hcl.j2 +++ b/templates/client.hcl.j2 @@ -21,6 +21,7 @@ client { cpu_total_compute = {{ nomad_cpu_total_compute }} gc_interval = "{{ nomad_gc_interval }}" + gc_max_allocs = "{{ nomad_gc_max_allocs }}" gc_disk_usage_threshold = {{ nomad_gc_disk_usage_threshold }} gc_inode_usage_threshold = {{ nomad_gc_inode_usage_threshold }} gc_parallel_destroys = {{ nomad_gc_parallel_destroys }}