Speed up Garbage Collection


When deletes in sindex (secondary index) takes longer then normal or is really slow to delete.

Path to resolution:

Depending on how the sindex was created. If your sindex was created by persisted and you want those settings to stay static. You will have to change it in the configuration.

namespace test {
   si ind1 {
       si-gc-period 1000          #Interval between two iterations of index garbage collection
	   si-gc-max-units 10000     #Maximum number of elements we walk in the index tree for garbage-collection in one cycle
	   si-tracing 0              #The value that indicates the level of global tracing for this index
	   si-histogram false        # Flag to enable si-historgram mapping of this index

This works for both Dynamic and Static, you can run the following command to change the parameter values:

asinfo -v "set-config:context=namespace;id=<namespaceid>;indexname=<indexid>;<parameter value>"

gc-period : 500      : Lowering the value will make it wait less time between intervals
gc-max-units 500  : increasing the value will make it walk through less elements in a garbage collection cycle.

More info can be read upon here: http://www.aerospike.com/docs/operations/manage/indexes

Is there any way to know from server side if this needs to be tweaked?

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