Endeca recommends disabling the swap token timeout by setting it to zero. The swap token is a mechanism in Linux that allows some processes to make progress when the total working set size of all processes exceeds the size of physical RAM.
In situations when only one process is active, and the virtual memory size of that process gets close to, or exceeds the size of the available RAM, enabling the swap token negatively affects performance. In the context of the Dgraph, this can happen if the physical server is dedicated exclusively to running the MDEX Engine, and the index size is close to, or exceeds the size of the available RAM.
Endeca recommends disabling the swap token for those MDEX Engine configurations running on Linux that serve large data sets and are memory- and disk-bound.
If you choose not to disable the swap token, and experience erratic Dgraph performance, you may wish to examine the system to determine whether the swap token is causing problems. The swap token can cause "direct steal" operations.
To measure "direct steal" operations, check the contents of /proc/vmstat, adding pgsteal_dma32 and pgsteal_normal values and subtracting kswapd_steal.
To disable the swap token timeout on RHEL 5:
sysctl -w vm.swap_token_timeout=0
or
echo 0 > /proc/sys/vm/swap_token_timeoutOr, add vm.swap_token_timeout = 0 to /etc/sysctl.conf.