From 04fd3a574c9fc5bd582b231c2079188f2c9d5824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 21 Oct 2020 15:29:44 +0200 Subject: [PATCH] use multiples of 1024 for --cache flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 9a71db0..2ecd862 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -96,7 +96,7 @@ geth_consul_tags: '{{ geth_consul_default_tags + geth_consul_extra_tags }}' # resources limits to avoid killing the host # Geth cache usage limit geth_cache_ratio: 0.4 -geth_cache_size: '{{ (ansible_memtotal_mb * geth_cache_ratio|float) | int }}' +geth_cache_size: '{{ (((ansible_memtotal_mb * geth_cache_ratio|float) / 1204) | round | int) * 1024 | int }}' # Container memory limits geth_cont_mem_ratio: 0.6 geth_cont_mem_limit: '{{ (ansible_memtotal_mb * geth_cont_mem_ratio|float) | int }}'