adjust geth cache based on host memory

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-06-28 15:56:39 -04:00
parent 4b70c11e88
commit c6dc49f7ed
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,10 @@ geth_extra_alias: '{{ faucet_geth_cont_alias }}'
geth_sync_mode: '{{ (stage == "goerli") | ternary("full", "light") }}' geth_sync_mode: '{{ (stage == "goerli") | ternary("full", "light") }}'
geth_log_level_name: info geth_log_level_name: info
# adjust cache size to available memory
mem_cache_ratio: 0.75
geth_cache: '{{ (ansible_memtotal_mb * mem_cache_ratio|float) | int }}'
geth_account_pass: '{{lookup("passwordstore", "services/faucet/account-pass")}}' geth_account_pass: '{{lookup("passwordstore", "services/faucet/account-pass")}}'
geth_account_addr: '{{lookup("passwordstore", "services/faucet/account-addr")}}' geth_account_addr: '{{lookup("passwordstore", "services/faucet/account-addr")}}'
geth_account_json: '{{lookup("passwordstore", "services/faucet/account-json")}}' geth_account_json: '{{lookup("passwordstore", "services/faucet/account-json")}}'

View File

@ -7,6 +7,10 @@ geth_extra_alias: 'miner'
geth_sync_mode: full geth_sync_mode: full
geth_log_level_name: info geth_log_level_name: info
# adjust cache size to available memory
mem_cache_ratio: 0.75
geth_cache: '{{ (ansible_memtotal_mb * mem_cache_ratio|float) | int }}'
geth_account_pass: '{{lookup("passwordstore", "services/faucet/account-pass")}}' geth_account_pass: '{{lookup("passwordstore", "services/faucet/account-pass")}}'
geth_account_addr: '{{lookup("passwordstore", "services/faucet/account-addr")}}' geth_account_addr: '{{lookup("passwordstore", "services/faucet/account-addr")}}'
geth_account_json: '{{lookup("passwordstore", "services/faucet/account-json")}}' geth_account_json: '{{lookup("passwordstore", "services/faucet/account-json")}}'