How To Speed Up Evictions

How To Speed Up Evictions


Aerospike intentionally evicts slowly, so that it doesn’t overshoot and evict more records than needed. Sometimes, though, reducing data volume quickly is more important.


There are some configuration parameters you can dynamically change to speed up evictions. Use asinfo -v 'get-config:context=namespace;id=NSNAME' -l (or asinfo -v 'get-config' -l for nsup-delete-sleep) to check the values before making any changes, so that you can revert after your data volume is satisfactory.

The downside to using any of these options for speeding up evictions is increased system load, either CPU or IO or both.

  • Increase how often the eviction process runs (nsup-period – per namespace; default 120 = 2 minutes). This is only useful if nsup is not already running continuously: setting the interval to less than nsup’s run time will have no effect. You can find the duration in milliseconds of the last complete nsup run with asinfo -v 'namespace/NSNAME' -l | grep nsup_cycle_duration:

    • asadm -e 'asinfo -v "set-config:context=namespace;id=NSNAME;nsup-period=30"'
  • Increase the fraction of eligible records deleted per pass (evict-tenths-pct – per namespace; default 5 = 0.5%). Increasing this will make each run of nsup take longer, and also increase the likelihood of over-eviction:

    • asadm -e 'asinfo -v "set-config:context=namespace;id=NSNAME;evict-tenths-pct=10"'
  • (Only from version 4.5.1 onward) Increase number of threads performing evictions (nsup-threads – per namespace; default 1). More threads will process the evictions more quickly, at the cost of more CPU and IO. This option is the most likely to interfere with other activity on the cluster:

    • asadm -e 'asinfo -v "set-config:context=namespace;id=NSNAME;nsup-threads=3"'
  • (Only before version 4.5.1) Reduce the time between deletes being processed (nsup-delete-sleep – global; default 100 = 0.1ms). Although the mechanism is different, decreasing this parameter has the same benefits and drawbacks as increasing nsup-threads:

    • asadm -e 'asinfo -v "set-config:context=service;nsup-delete-sleep=10"




May 2020

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