Hello,
Batch read use case is most important while using Aerospike for us.
We have four sets from which we query data. 2 are stored in device (pcs_device namespace) and 2 are stored in memory (pcs_memory namespace). Each set is queried with 3000 keys.
Currently our db queries for 3000 records take around 45ms.
My questions are:
- Is database configuration set up properly?
- Are C# aerospike client and read/write policies set up properly?
- Is there something we are missing out what could increase performance of batch read operations?
Our setup:
We have 3 db machines with:
- Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-1021-aws x86_64)
- 16 core 2nd generation AMD EPYC 7002 3.3 GHz32 gb ram
- 32 GB RAM
- 2 x 300 GB nvme
Db configuration file:
service {
proto-fd-max 80000
}
logging {
file /var/log/aerospike/aerospike.log {
context any info
}
}
network {
service {
address any
port 3000
}
heartbeat {
mode mesh
mesh-seed-address-port ip_of_first_machine 3002
mesh-seed-address-port ip_of_second_machine 3002
mesh-seed-address-port ip_of_third_machine 3002
port 3002
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
}
namespace pcs_device {
replication-factor 2
memory-size 18G
default-ttl 0
high-water-memory-pct 0
high-water-disk-pct 0
stop-writes-pct 90
partition-tree-sprigs 16K
index-stage-size 1G
storage-engine device {
device /dev/nvme1n1p1
device /dev/nvme1n1p2
device /dev/nvme1n1p3
device /dev/nvme1n1p4
device /dev/nvme2n1p1
device /dev/nvme2n1p2
device /dev/nvme2n1p3
device /dev/nvme2n1p4
write-block-size 1M
defrag-lwm-pct 70
data-in-memory false
}
}
namespace pcs_memory {
memory-size 10G
storage-engine memory
}
C# client policy:
var clientPolicy = new AsyncClientPolicy
{
asyncMaxCommandAction = MaxCommandAction.BLOCK,
asyncMaxCommands = 1024,
asyncMaxConnsPerNode = -1,
maxConnsPerNode = 300,
connPoolsPerNode = 10,
asyncMaxCommandsInQueue = 1000,
};
C# client read policy set up:
var readPolicy = BatchPolicy.ReadDefault()
readPolicy.maxConcurrentThreads = 0;
readPolicy.maxRetries = 0;
readPolicy.allowInline = false;
readPolicy.SetTimeout(5000);