Only 1 replica of data in memory even when device storage replication factor is 2?

Hi, We have configured our namespace as follows (data-in-memory = true with storage-engine as device). As you can see in the screenshot, the data on disk is occupying ~111 GB (with a replication factor of 2) while that in memory is ~52 GB which is roughly half the data on disk. I am assuming this might because the data in memory has just one copy in memory. If this is so, in case of node failures, the migration process also involved copying data in memory apart from building index. My question is, can we not tune the replication factor for the data in memory also? Is it and by default always going to be one copy in the memory?

namespace inference {
	replication-factor 2
	memory-size 25G
	default-ttl 0

	storage-engine device {
		device /dev/vdb1
		write-block-size 512K
		data-in-memory true
	stop-writes-pct 80
	high-water-memory-pct 80
	high-water-disk-pct 80

No, replica copies are stored in memory as well.

The disk layout can me larger than the memory layout because each bin name contained within a record is also stored with the record. In memory, the bins hold a bin_id instead. Similarly for the set the data belongs to.

Which version are you running?

I am using community edition. Will the difference in layout make so much difference. There is only one bin per record which is of size 4.

Yes, in 3.16 the rblock size was 128 bytes which meant the minimum size of a record on disk was 128 bytes and records grew in increments of 128 bytes. If a record took 129 bytes of space, it would occupy 256 bytes of storage.

As of 4.2 the rblock size is 16 bytes. Due to record metadata overhead, the minimum record size is 48 bytes. If the record occupies 49 bytes, it will require 64 bytes of storage space.

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