tiered memory for Redis

20 views
Skip to first unread message

Anton Gavriliuk

unread,
Dec 14, 2022, 8:08:10 AM12/14/22
to pmem
Hi all

I'm trying to run Redis/TieredMemDB on Fedora37 running on PMEM box.

This is my current DRAM/PMEM setup

[root@memverge2 anton]# numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7
node 0 size: 386613 MB
node 0 free: 362037 MB
node 1 cpus: 8 9 10 11 12 13 14 15
node 1 size: 387066 MB
node 1 free: 362168 MB
node 2 cpus:
node 2 size: 1521664 MB
node 2 free: 1521664 MB
node 3 cpus:
node 3 size: 1521664 MB
node 3 free: 1521664 MB
node distances:
node   0   1   2   3
  0:  10  21  17  28
  1:  21  10  28  17
  2:  17  28  10  28
  3:  28  17  28  10
[root@memverge2 anton]#

When I set tiered memory config "only-pmem", it works

[root@memverge2 src]# ./redis-server --memory-alloc-policy only-pmem --hashtable-on-dram no --daemonize yes --maxmemory 5G
[root@memverge2 src]# ./redis-cli
127.0.0.1:6379> DEBUG POPULATE 40000000 PHPREDIS_SESSION
OK
(41.68s)
127.0.0.1:6379> quit
[root@memverge2 src]#
[root@memverge2 src]# ps -ef|grep redis
root        4383       1 52 14:58 ?        00:00:41 ./redis-server *:6379
root        4392    4355  0 15:00 pts/1    00:00:00 grep --color=auto redis
[root@memverge2 src]#
[root@memverge2 src]# numastat -p 4383

Per-node process memory usage (in MBs) for PID 4383 (redis-server)
                           Node 0          Node 1          Node 2
                  --------------- --------------- ---------------
Huge                         0.00            0.00            0.00
Heap                         0.03            0.07            0.00
Stack                        0.02            0.00            0.00
Private                      2.41           68.66            0.00
----------------  --------------- --------------- ---------------
Total                        2.45           68.73            0.00

                           Node 3           Total
                  --------------- ---------------
Huge                         0.00            0.00
Heap                         0.00            0.10
Stack                        0.00            0.02
Private                   4165.78         4236.84
----------------  --------------- ---------------
Total                     4165.78         4236.96
[root@memverge2 src]#

But, with allocation policy "ratio", DRAM:PMEM like 1:4, it looks ALL data in DRAM

[root@memverge2 src]# ./redis-server --memory-alloc-policy ratio --dram-pmem-ratio 1 4 --hashtable-on-dram yes --daemonize yes --maxmemory 5G
[root@memverge2 src]# ./redis-cli
127.0.0.1:6379> DEBUG POPULATE 40000000 PHPREDIS_SESSION
OK
(20.16s)
127.0.0.1:6379> quit
[root@memverge2 src]# ps -ef|grep redis
root        4416       1 41 15:03 ?        00:00:20 ./redis-server *:6379
root        4424    4355  0 15:04 pts/1    00:00:00 grep --color=auto redis
[root@memverge2 src]# numastat -p 4416

Per-node process memory usage (in MBs) for PID 4416 (redis-server)
                           Node 0          Node 1          Node 2
                  --------------- --------------- ---------------
Huge                         0.00            0.00            0.00
Heap                         0.03            0.07            0.00
Stack                        0.02            0.00            0.00
Private                      2.37         4234.40            0.00
----------------  --------------- --------------- ---------------
Total                        2.42         4234.47            0.00

                           Node 3           Total
                  --------------- ---------------
Huge                         0.00            0.00
Heap                         0.00            0.10
Stack                        0.00            0.02
Private                      0.05         4236.82
----------------  --------------- ---------------
Total                        0.05         4236.95
[root@memverge2 src]#

So what I'm missing, why with DRAM:PMEM 1:4 ALL data still in DRAM and no in PMEM ?

Anton
Reply all
Reply to author
Forward
0 new messages