FAQ - What is
allow-ttl-without-nsup used for?
NSUP or namespace supervisor sub-system is an internal process within Aerospike that takes care of removing records when their
time to live has elapsed, a process called expiration or, when certain thresholds are met, before the
TTL has elapsed, a process called eviction. By default the time interval between which
NSUP scans the primary index for records eligible for expiration is 0, meaning that expiration and eviction are switched off. Unless this
nsup-period is configured to a non-zero value, Aerospike will not allow records with a
TTL to be written to the database.
The reason for this is that the developers would be expecting records with
TTL to be removed via expiration and as such may not have included explicit methods for record removal in their code (such as expunges or durable deletes). If Aerospike allowed records with non-zero
TTL to be written when
NSUP is not running it could lead to the database being overloaded with records and entering
Why then is there a configuration parameter called `allow-ttl-without-nsup’?
The reason to include
allow-ttl-without-nsup is to allow the customer to measure the impact of
NSUP when running in a use case where
TTL is non-zero. When
NSUP runs it locks to a single CPU (by default, but configurable through the
nsup-threads configuration parameter) and will utilise that CPU as much as 100% which can be alarming for the operations team. On modern multi core CPU systems, the
NSUP process (running in user space) would typically not impact the overall performance. Nevertheless, it can be useful to see exactly what impact
NSUP really has on the system.
The way in which this test is carried out is to have a system where
nsup-period is set to a non-zero value and records with a
TTL are being written. The
CPU in normal conditions is measured and then
allow-ttl-without-nsup is set to true and
nsup-period to 0. The
CPU usage and system impact is measured again. The delta between the measurements is the effect of
NSUP. The parameter allows the test to be carried out without disrupting incoming client workload on a production system. Once the tests are finished
allow-ttl-without-nsup is set back to false and
nsup-period is switched back to the usual value for the system. Expiration will then continue as normal.
allow-ttl-without-nsupis a parameter for testing only.
- On systems where
nsup-periodis set to 0 as normal, [
allow-ttl-without-nsup'](https://www.aerospike.com/docs/reference/configuration/index.html?show-removed=1#allow-ttl-without-nsup) should not be used to allow records withTTL` to be written.
ALLOW-TTL-WITHOUT-NSUP NSUP EXPIRATION EVICTION CPU 100%