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 }}