Testing pmem-redis with pmemcheck

29 views
Skip to first unread message

Jayashree Mohan

unread,
Feb 14, 2019, 1:36:14 AM2/14/19
to pmem
Hi,

I have set up and been able to run pmem redis corresponding to this repo - https://github.com/pmem/redis

pmem redis seems to use libpmem internally - and given that libpmem has inbuilt support for valgrind, I tried running valgrind with pmemcheck tool for redis-benchmark program. I also enable logging to a file using :

valgrind --tool=pmemcheck -q --log-stores=yes --log-file=redis_store_log.log redis-benchmark

However, I don't see any STORE instructions being logged in my logfile. I see that the benchmark runs successfully - so there is no issue with the workload being run incorrectly. Do you have any insights as to why I am not able to trace the instructions?

Thanks,
Jayashree Mohan

Marcin Ślusarz

unread,
Feb 14, 2019, 3:46:48 PM2/14/19
to Jayashree Mohan, pmem
czw., 14 lut 2019 o 07:36 Jayashree Mohan <jayash...@gmail.com> napisał(a):
Hi,

I have set up and been able to run pmem redis corresponding to this repo - https://github.com/pmem/redis

Which branch do you use? Some branches are for persistent use cases, some are for volatile. In the later case libpmem is not used.
 
pmem redis seems to use libpmem internally - and given that libpmem has inbuilt support for valgrind, I tried running valgrind with pmemcheck tool for redis-benchmark program. I also enable logging to a file using :

valgrind --tool=pmemcheck -q --log-stores=yes --log-file=redis_store_log.log redis-benchmark

Isn't "redis-benchmark" just a client of a redis server?

Marcin

Jayashree Mohan

unread,
Feb 14, 2019, 3:56:03 PM2/14/19
to Marcin Ślusarz, pmem
>> I have set up and been able to run pmem redis corresponding to this repo - https://github.com/pmem/redis
>
>
> Which branch do you use? Some branches are for persistent use cases, some are for volatile. In the later case libpmem is not used.
>
Ah! I didn't pay attention to the branch I was on - it is 4.0
volatile. This is the branch I was on by default when I cloned the
repo! I see 5.0_persistent_memory_with_replication - I believe that
should be good?

>>
>> pmem redis seems to use libpmem internally - and given that libpmem has inbuilt support for valgrind, I tried running valgrind with pmemcheck tool for redis-benchmark program. I also enable logging to a file using :
>>
>> valgrind --tool=pmemcheck -q --log-stores=yes --log-file=redis_store_log.log redis-benchmark
>
>
> Isn't "redis-benchmark" just a client of a redis server?
Yes, but wouldn't the redis store 'put' operations be translated to
corresponding operations on libpmem?

Thanks!

Marcin Ślusarz

unread,
Feb 14, 2019, 4:39:52 PM2/14/19
to Jayashree Mohan, pmem
czw., 14 lut 2019 o 21:56 Jayashree Mohan <jayash...@gmail.com> napisał(a):
>> I have set up and been able to run pmem redis corresponding to this repo - https://github.com/pmem/redis
>
>
> Which branch do you use? Some branches are for persistent use cases, some are for volatile. In the later case libpmem is not used.
>
Ah! I didn't pay attention to the branch I was on - it is 4.0
volatile. This is the branch I was on by default when I cloned the
repo! I see 5.0_persistent_memory_with_replication - I believe that
should be good?

Someone more familiar with this project will need to answer this question.
"5.0_persistent_memory_with_replication" seems to use memkind, so it's not really persistent...   
 
>>
>> pmem redis seems to use libpmem internally - and given that libpmem has inbuilt support for valgrind, I tried running valgrind with pmemcheck tool for redis-benchmark program. I also enable logging to a file using :
>>
>> valgrind --tool=pmemcheck -q --log-stores=yes --log-file=redis_store_log.log redis-benchmark
>
>
> Isn't "redis-benchmark" just a client of a redis server?
Yes, but wouldn't the redis store 'put' operations be translated to
corresponding operations on libpmem?

In traditional server/client architecture only server has access to the underlying storage. If server and client live in different processes, then tracing client won't allow you to see stores made by the server.
 

Thanks!

Jayashree Mohan

unread,
Feb 14, 2019, 4:54:34 PM2/14/19
to Marcin Ślusarz, pmem
Hi Marcin!

Thanks for making things clear :)

You are right, when I try tracing the server and run a client program
in the background, I can see a few fence operations - but no stores.
This is probably because as you said, I might not be on the right
branch. I tried branch 5.0-poc_cow which had an additional pmdir
argument to the server - I couldn't trace stores. I did not try
"5.0_persistent_memory_with_replication" as the server didn't have an
option to input pmdir.

I'll wait for someone to direct me to the right branch!

kuba.sc...@gmail.com

unread,
Feb 15, 2019, 9:31:03 AM2/15/19
to pmem
Hi,
both branches:
- 4.0-volatile
- 5.0-poc_cow
are volatile versions of Redis.
4.0-volatile has support for all Redis data structures, but doesn't implement persistency options (AOF/RDB).
5.0-poc_cow is based on Redis 5.0 and is currently under development. It will include RDB creation.
Both branches are using Memkind alocator which is volatile allocator (data is not available after restart) not PMDK/libpmemobj. Pmemcheck is dedicated to libpmemobj pools.

Jakub

Jayashree Mohan

unread,
Feb 15, 2019, 9:35:53 AM2/15/19
to kuba.sc...@gmail.com, pmem
I checked 3.2-nvml branch and I can trace instructions there. I see that it uses libpmemobj library. Is that the latest branch that uses PMDK? 

--
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/dfa83a0c-7c5e-45eb-b13d-f105193b6196%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Thanks,
Jayashree Mohan

kuba.sc...@gmail.com

unread,
Feb 15, 2019, 9:54:13 AM2/15/19
to pmem
Hi,
You can also check:
reserve_publish_poc. It is prototype of another approach to Redis with persistency implemented with PMDK.
Jakub

Jayashree Mohan

unread,
Feb 15, 2019, 10:13:56 AM2/15/19
to kuba.sc...@gmail.com, pmem
Sounds good! Thank you for the pointers. 

--
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.

For more options, visit https://groups.google.com/d/optout.
--

Thanks,
Jayashree Mohan

Reply all
Reply to author
Forward
0 new messages