From e1277ab49cfbd8fd980336b1f2b84bca3166a449 Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Fri, 15 Mar 2024 12:42:15 +0000 Subject: Configure Hazelcast to have 1 backup to reduce memory Currently Hazelcast is configured to have 3 synchronous backups and 3 asynchronous backups. These are separate, meaning there will be 7 copies in the cluster (1 original + 3 sync + 3 async backups). Even if only 1 instance of CPS/NCMP is running, it will have 7 copies in memory. Given that CPS/NCMP is typically only deployed using 1 or 2 instances, the settings are changed to 1 synchronous backup (same as Hazelcast's default configuration). This change has been tested and shown to reduce heap usage by around 100MB during 20K CM-handle registration. Issue-ID: CPS-2146 Signed-off-by: danielhanrahan Change-Id: I4a5f6d83bc35e2c13cfb32002e38dc365da34c8e --- .../test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cps-service/src/test/groovy') diff --git a/cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy index e219945d8..010308c42 100644 --- a/cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy @@ -50,8 +50,8 @@ class AnchorDataCacheConfigSpec extends Specification { def anchorDataCacheMapConfig = anchorDataCacheConfig.mapConfigs.get('anchorDataCacheMapConfig') expect: 'system created instance with correct config' assert anchorDataCacheConfig.clusterName == 'cps-and-ncmp-test-caches' - assert anchorDataCacheMapConfig.backupCount == 3 - assert anchorDataCacheMapConfig.asyncBackupCount == 3 + assert anchorDataCacheMapConfig.backupCount == 1 + assert anchorDataCacheMapConfig.asyncBackupCount == 0 } def 'Verify deployment network configs for Distributed Caches'() { -- cgit 1.2.3-korg