Aerospike 命名空间配置选项

Aerospike namespace configuration options

我最近参与了在我们的产品中实施 Aerospike 数据存储的工作。我们一直在努力为我们的命名空间找出最佳配置。持久化数据的要求意味着我们需要有一个存储引擎作为一个设备。我们已将内存中的数据指定为 true。

我的问题是:data-in-memory 是否像模糊描述所暗示的那样尝试将 ALL 后备存储数据加载到内存中?

Keep a copy of all data in memory always.

还是会注意命名空间的 memory-size 设置,只从后备存储加载 memory-size 量的数据?

documentation 检索到设置说明。

我一直在和第一个实现 aerospike 的人交谈,想知道他是否知道但不确定,所以我正在寻求澄清。

作为参考,我的命名空间配置看起来像这样,内存配额明显小于后备存储

namespace Test {
    replication-factor 2
    memory-size 4G
    default-ttl 0
    storage-engine device {
        file /opt/aerospike/data/Test.dat
        filesize 16G
        data-in-memory true
    }
}

它会将所有数据保存在内存中。 Aerospike 还没有部分缓存实现来将最常用的数据保存在提供的内存中。

您的数据将只存在于内存中,而磁盘用于服务器重启时的恢复恢复。之所以filesize is larger than the memory-size is that disk space is needed for maintenance operations such as defragmentation of blocks. Disk devices are block devices, and in the default 1MB write-block-size you can fit multiple records so operations such as defrag occur by moving records from blocks that are less than defrag-lwm-pct满。这需要额外的块,因此您需要备用容量。