Detail
In addition any Primary Index or Data that you have configured to be stored in memory, Aerospike also requires additional memory for the Aerospike (asd) process itself, plus various queues and caches used during normal operation. Although this will vary from deployment to deployment, this article is designed to give you an idea of what to expect and the configuration used to control this usage
Answer
As a guide, you can expect Aerospike to use allocate memory for the following:
| Element | Description | Default usage | Reference |
| Aerospike process | Main Aerospike (asd) process, including queues not specifically defined below | Varies, but ~1GB is a good estimation for most setups | N/A |
| Primary Index | Amount of Shared Memory allocated to each namespace | Varies | https://aerospike.com/docs/server/operations/plan/capacity#calculating-primary-index-storage |
| Secondary Index | Amount of memory (Shared or application memory depending on version) allocated to Seconadry Indexes configured on namespaces | Varies | https://aerospike.com/docs/server/operations/plan/capacity/secondary_indexes |
| Set Indexes | Amount of memory allocated to Set Indexes configured on namespaces | Varies | https://aerospike.com/docs/server/operations/plan/capacity#calculating-storage-for-the-set-index |
| Data Storage | Amount of memory allocated to storing data if configured to storage data in memory | 0 or Varies |
Pre-7.0 https://aerospike.com/docs/server/reference/configuration#namespace__memory-size 7.0+ https://aerospike.com/docs/server/reference/configuration#namespace__data-size |
| Max Write Cache | Writes that can be stored in memory before being flushed to disk | 64MB per configured device |
https://aerospike.com/docs/server/reference/configuration#namespace__max-write-cache |
| Post Write Cache | Cache of recently written records | 256MB per configured device |
Pre-7.0 https://aerospike.com/docs/server/reference/configuration#namespace__post-write-queue 7.0+ https://aerospike.com/docs/server/reference/configuration#namespace__post-write-cache |
| Batch Response Buffers | Buffers used for batch responses to clients | Default Max 32MB per CPU core |
https://aerospike.com/docs/server/reference/configuration#service__batch-max-buffers-per-queue |
| XDR Transaction Queues | Queues for transactions that need to be shipped via XDR | Default Max 400KB per partition per namespace per datacenter |
https://aerospike.com/docs/server/reference/configuration#xdr__transaction-queue-limit Note: nodes hold XDR Transaction Queues for master and replica partitions stored on a node |
Notes
Note: during maintenance or when there are failures within the cluster, nodes may hold many more partitions than they would usually. Ensure you allocate capacity for these scenarios in order to avoid cascading OOM kills should those situations arises