From 12ea5c41e91f6222e84a7d2e6e5353b4e81f8b2c Mon Sep 17 00:00:00 2001 From: Patrick Skowronek Date: Wed, 9 Oct 2024 12:42:11 +0200 Subject: [PATCH] feat: added blaze cql cache --- bbmri/docker-compose.yml | 3 ++- ccp/docker-compose.yml | 3 ++- lib/functions.sh | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bbmri/docker-compose.yml b/bbmri/docker-compose.yml index ac8df45e..000df01a 100644 --- a/bbmri/docker-compose.yml +++ b/bbmri/docker-compose.yml @@ -10,7 +10,8 @@ services: BASE_URL: "http://bridgehead-bbmri-blaze:8080" JAVA_TOOL_OPTIONS: "-Xmx${BLAZE_MEMORY_CAP:-4096}m" DB_RESOURCE_CACHE_SIZE: ${BLAZE_RESOURCE_CACHE_CAP:-2500000} - DB_BLOCK_CACHE_SIZE: $BLAZE_MEMORY_CAP + DB_BLOCK_CACHE_SIZE: ${BLAZE_MEMORY_CAP} + CQL_EXPR_CACHE_SIZE: ${BLAZE_CQL_CACHE_CAP:-32} ENFORCE_REFERENTIAL_INTEGRITY: "false" volumes: - "blaze-data:/app/data" diff --git a/ccp/docker-compose.yml b/ccp/docker-compose.yml index 2395d8c5..22089260 100644 --- a/ccp/docker-compose.yml +++ b/ccp/docker-compose.yml @@ -8,7 +8,8 @@ services: BASE_URL: "http://bridgehead-ccp-blaze:8080" JAVA_TOOL_OPTIONS: "-Xmx${BLAZE_MEMORY_CAP:-4096}m" DB_RESOURCE_CACHE_SIZE: ${BLAZE_RESOURCE_CACHE_CAP:-2500000} - DB_BLOCK_CACHE_SIZE: $BLAZE_MEMORY_CAP + DB_BLOCK_CACHE_SIZE: ${BLAZE_MEMORY_CAP} + CQL_EXPR_CACHE_SIZE: ${BLAZE_CQL_CACHE_CAP:-32} ENFORCE_REFERENTIAL_INTEGRITY: "false" volumes: - "blaze-data:/app/data" diff --git a/lib/functions.sh b/lib/functions.sh index 5e69a047..b4ee26c8 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -171,8 +171,10 @@ optimizeBlazeMemoryUsage() { if [ $available_system_memory_chunks -eq 0 ]; then log WARN "Only ${BLAZE_MEMORY_CAP} system memory available for Blaze. If your Blaze stores more than 128000 fhir ressources it will run significally slower." export BLAZE_RESOURCE_CACHE_CAP=128000; + export BLAZE_CQL_CACHE_CAP=32; else export BLAZE_RESOURCE_CACHE_CAP=$((available_system_memory_chunks * 312500)) + export BLAZE_CQL_CACHE_CAP=$((($system_memory_in_mb/4)/16)); fi fi }