Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aerospike Memory Calculation for multiple Sets

I need to store a large number of Keys in an shared memory Aerospike Primary Index. My specs are as follows: Namespaces : 2, Number of Records : 500 M, TTL : 1D, Replication: 2

According to Aerospike Capacity planning: By String Key should need 64 bytes × (replication factor) × (number of records)

= 64 * 2 * 0.5 * 10^9 = 64 GB of space per namespace.

Question is the the index separate for every set? For EG, if I have 20 sets per namespace, do I need 20 * 64 gigs in memory for that namespace?

like image 966
Neil Nandi Avatar asked Dec 07 '25 07:12

Neil Nandi


1 Answers

The primary index is not separate for every set.

According to https://aerospike.com/developer/blog/of-queries-and-indexes, "In Aerospike, there is only one system-defined primary index for each namespace" which makes sense because you can change the way you store your primary index - shared memory (shmem), persistent memory (PMem) and flash (NVMe SSDs) at the namespace level.

Set is an optional unit to group records, its the equivalent of a table but without an explicit schema, for sets you have a dedicated optional Set Indexes which allows you to index the membership of records to their set.

like image 59
Roi Menashe Avatar answered Dec 09 '25 20:12

Roi Menashe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!