When Aerospike Community version evict expired record from disk?

  • when aerospike evict this expired records from my disk? eviction and expiration are very different things. Expiration is when the record expires and gets deleted at the specified TTL time. Eviction happens when you do not have enough capacity to handle your current load - so when you breach HWM, Aerospike “evicts” the oldest records - basically a premature expiration to protect your capacity. Records are expired and deleted in the nsup cycle, which runs frequently. FAQ What are Expiration, Eviction and Stop-Writes?

  • At next cold start, or when disk usage meet high water level? Evictions happen at HWM. At cold start, it depends on how your namespace is configured. If its a RAM-based namespace, cold start means you just start your server with NO records at all - regardless of TTL.

  • Is it possible these expired records appear after code start ? I assume you mean cold start here. If you are persisting data to disk, check if you have “cold-start-empty true” in your namespace configuration. If you don’t, then data will be scanned off the disk and brought back into the cluster. It depends on your use case as to how to handle maintenance - can you tolerate zombie records, are you very sensitive to data integrity, do you have a multi node cluster, do you have capacity to allow for ((1/n-1)+1) * max% increase in data on the other nodes, etc…

  • Need I worry about this expired records eaten up all my disk? If you do capacity planning correctly, no. Expired records and other deleted/rewritten records are queued for cleanup later as part of a “defrag” cycle. Aerospike recommends you keep your disk below 50% to allow for defrag to occur. If using a memory based namespace, you do not need to worry about defrag. Defragmentation

  • I can make sure they expired in time and never use out of my disk, but I don’t know if they can be evicted in time. Can you elaborate what the question is here? Are you asking if eviction is happening fast enough? In a perfect world, if you did capacity planning sufficiently, you shouldn’t have evictions.

All of these details are actually directly related to capacity planning. If you want to ensure you have enough space and everything works right, this is paramount. http://www.aerospike.com/docs/operations/plan/capacity/ Aerospike capacity calculator http://www.aerospike.com/docs/operations/plan

1 Like