From f869ae11998395a5b68cd728cf4f1fb4778fa25d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 30 Oct 2024 11:41:54 +0100 Subject: [PATCH] node-db: fix shared memory calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were casting `0.3` to `int` which results in `0`. Resolves: https://github.com/status-im/infra-waku/issues/28 Signed-off-by: Jakub SokoĊ‚owski --- ansible/group_vars/store-db.yml | 4 ++-- ansible/requirements.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/group_vars/store-db.yml b/ansible/group_vars/store-db.yml index 9f9c455..2f7924c 100644 --- a/ansible/group_vars/store-db.yml +++ b/ansible/group_vars/store-db.yml @@ -55,8 +55,8 @@ postgres_system_setting_stage: ## Autovacuum autovacuum: 'off' -# For each 16GB of ram, 1 GB is set to share memory -postgres_share_memory: '{{ ansible_memtotal_mb / 16 | int }}m' +# Use the 10% of RAM for shared memory +postgres_ha_share_memory: '{{ (ansible_memtotal_mb * 0.1) | int }}m' # Consul postgres_ha_consul_check_interval: '60s' diff --git a/ansible/requirements.yml b/ansible/requirements.yml index 5d03c5d..7e0c170 100644 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -26,7 +26,7 @@ - name: infra-role-postgres-ha src: git@github.com:status-im/infra-role-postgres-ha.git - version: fbc3376e790c526bb401edb1a6a1ffdc4a4d1ae1 + version: 0e166b76b4875f2413f093c264470bee3361b3f4 - name: infra-role-nim-waku-sonda src: git@github.com:status-im/infra-role-nim-waku-sonda.git