Namespace Memory gets freed up after Aerospike restart

I have around 3 mn records in my aerospike cache. My persistence is disk-based and I have allotted certain memory to it as well. On my different sets, I have several Secondary Indexes created which are contributing to the memory of the namespace. I have around 20 lakh expired objects and 10 mn evicted objects.

On server restart, my memory gets freed up.

My question is as the expired and evicted objects are stored in disk and are cleared from the disk on a cold start, are the indexes of these objects stored on RAM?

If yes, is there any other solution to clear those from RAM automatically?

The primary index should be freed up when you get the evictions / expirations. The secondary index garbage collection happens at a pre-determined interval governed by

if you’re seeing the memory consumed by the secondary, rather than primary index you may be running into the behaviour we document here:

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.