Configure Hazelcast to have 1 backup to reduce memory 17/137517/3
authordanielhanrahan <daniel.hanrahan@est.tech>
Fri, 15 Mar 2024 12:42:15 +0000 (12:42 +0000)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Tue, 19 Mar 2024 10:08:19 +0000 (10:08 +0000)
commite1277ab49cfbd8fd980336b1f2b84bca3166a449
treea448d6c891c9def39837d11c7ddaad1998e99ae6
parentbf75ff4d43dc9eb459deaf61920de22cf5c6f1ea
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 <daniel.hanrahan@est.tech>
Change-Id: I4a5f6d83bc35e2c13cfb32002e38dc365da34c8e
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfigSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/TrustLevelCacheConfigSpec.groovy
cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java
cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy