I am running a Redis (version 6.2.5) cluster "sentinel" of 3 nodes (1 master, 2 replicas), OS FreeBSD 13, the dataset is approximately 70GB, the system has 320GB RAM, SSD disks, and the servers (dedicated, not VM's) are in the same network/datacenter, probably hardware is not a problem, but I start to notice that after
The current /boot/loader.conf:
In /etc/sysctl.conf
For building the kernel I have this in /etc/make.conf
From the flame graph, next to the Redis is one from ZFS:
Here also I notice that ZFS is using memcpy:
Currently trying with
BGSAVE
finishes, there is a lag of approximately 10 seconds, because of this, the applications randomly get this error: NOREPLICAS Not enough good replicas to write
, setting, min-replicas-max-lag
to 20 helps but I would like to know if there is something I could fine-tune to speed up memcpy
, from the flame graph: (Github discussion here: https://github.com/redis/redis/discussions/9457)
The current /boot/loader.conf:
Code:
# Set Max size = 32GB
vfs.zfs.arc_max="34359738368"
# Min size = 4GB
vfs.zfs.arc_min="4294967296"
kern.ipc.semmns="2048"
kern.ipc.semmni="128"
kern.ipc.shmall="33554432"
kern.ipc.shmseg="1024"
kern.ipc.shmmax="137438953472"
In /etc/sysctl.conf
Code:
kern.ipc.shm_use_phys=1
For building the kernel I have this in /etc/make.conf
Code:
CFLAGS= -O2 -pipe -fno-strict-aliasing
COPTFLAGS= -O2 -pipe -fno-strict-aliasing
BUILD_OPTIMIZED= YES
BUILD_STATIC= YES
OPTIMIZED_CFLAGS= YES
WITHOUT_DEBUG= YES
WITH_CPUFLAGS= YES
WITH_OPTIMIZED_CFLAGS= YES
MALLOC_PRODUCTION= YES
From the flame graph, next to the Redis is one from ZFS:
Here also I notice that ZFS is using memcpy:
Currently trying with
vm.pmap.pg_ps_enabled=0
Last edited: