query on pmem on redis

21 views
Skip to first unread message

muneendra kumar

unread,
Feb 12, 2019, 7:43:53 AM2/12/19
to pmem
Hi ,
Iam running redis on emulated pmem device using the below link.


I am using the default redis.conf available in the above git hub and just enabled the below options
appendonly =yes

and run my server using the below command
[root@pmem4]# ./redis-server redis.conf  --nvm-maxcapacity 1 --nvm-dir /mnt/pmem4

and running the benchmark test to study the performance.
redis-benchmark -h 127.0.0.1 -p 6379 -t set,lpush -n 100000 -q  -d 32 -r 100000 

Query:
In the /mnt/pmem4 directory i observed two files.
redis-port-6379-1GB-AEP, and appendonly.aof files
And when i hexdump these two file both has some valid data
Can someone explain what are these two files.

When i looked into the code all the memory needed for setCommand is coming from
mmap memory of redis-port-6379-1GB-AEP file .IS my understanding correct?



Regards,
Muneendra.






Peifeng Si

unread,
Feb 12, 2019, 9:29:55 PM2/12/19
to pmem
Hi Muneendra,

If you enable the option "appendonly", redis stores a copy of key-value pairs in a disk file (e.g. appendonly.aof). With it, all key-value pairs can be restored after rebooting host or restarting redis-server.

Besides, as usual, for the key-values in memory, their spaces are allocated from a memory mapping file (e.g., redis-port-6379-1GB-AEP) on NVM.

Thanks,
Peifeng


在 2019年2月12日星期二 UTC+8下午8:43:53,muneendra kumar写道:

muneendra kumar

unread,
Feb 13, 2019, 1:24:01 AM2/13/19
to Peifeng Si, pmem
Hi Peifeng,
Thanks for your reply.
I have one more query on the same.

Can i store  appendonly.aof file  in PMEM mount directory i.e /mnt/pmem4 ? 

 
If i give appendfsync always in the redis.conf file i observed couple of writes happening into the appendonly.aof file,
For all these write operations we need a buffer to write(server.aof_buf) ,is this buffer also coming from spaces allocated from a memory mapping file  or it's a cached buffer ?



Regards,
Muneendra.





--
You received this message because you are subscribed to the Google Groups "pmem" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pmem+uns...@googlegroups.com.
To post to this group, send email to pm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pmem/43a7a267-7193-46c5-8b49-0500fe330c61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peifeng Si

unread,
Feb 13, 2019, 3:40:55 AM2/13/19
to pmem
Muneendra,
Please see my reply inline with the prefix ">>PSI".

Thanks,
Peifeng

在 2019年2月13日星期三 UTC+8下午2:24:01,muneendra kumar写道:
Hi Peifeng,
Thanks for your reply.
I have one more query on the same.

Can i store  appendonly.aof file  in PMEM mount directory i.e /mnt/pmem4 ? 
>>PSI: yes, you can. or you can store it on another high speed disk drive.
 
If i give appendfsync always in the redis.conf file i observed couple of writes happening into the appendonly.aof file,
For all these write operations we need a buffer to write(server.aof_buf) ,is this buffer also coming from spaces allocated from a memory mapping file  or it's a cached buffer ? 
 >> PSI: No, aof_buf is allocated from DRAM.
Reply all
Reply to author
Forward
0 new messages