Hi Muneendra,
I believe you're still using emulated pmem, so let's look at the difference between your two runs. Peifeng can confirm, but I think the configuration you ran is using pmem as additional volatile capacity, using it to hold values greater than 64 in size. That means that in your test runs, redis will use malloc (actually jemalloc) for most memory allocation, which of course just asks the system for DRAM, and when storing a value greater than 64, it will use memory obtained by mapping a file on pmem (which for you is also DRAM). If you use DAX, that's the end of the story, but if you don't use DAX, the mapped file will be cached in the page cache (which is also DRAM). So you're comparing slightly different code paths of accessing things in DRAM. Your results are very close, but perhaps without DAX they are a little worse because you're measuring the impact of copying data into the page cache, where it will have the same access performance after that.
You might be wondering what's the point? In fact, since Optane media is said to be slower than DRAM, you might wonder why use these changes? Won't the result actually slow down compared to DRAM? There are two reasons:
- The volatile use case: Optane DC persistent memory is higher capacity than DRAM, up to 3TB per socket, and is expected to be cheaper. For large memory use cases where applications have huge datasets in DRAM (like Redis using DRAM to hold a large in-memory database), using DCPMM for additional volatile capacity means you can build the system cheaper (less DRAM) or free up some DRAM for other things. In this case, you're replacing the faster DRAM capacity with the slower-but-cheaper pmem capacity, so you expect a slowdown, but we find many use cases where the slowdown is not significant so the application still meets the needs of the use case while lowering the total cost of ownership for the solution.
- The persistent use case: Optane DC persistent memory is slower than DRAM, but it is significantly faster than storage and it is persistent. If you replace some of the storage in a use case with pmem, those accesses to persistence will run faster. For Redis, there are a few places where it accesses persistent media, and the "append-only file" (AOF) is one such case. If you have a use case where Redis is bottlenecked on the AOF writes, moving the AOF to pmem will improve performance.
in summary: sometimes we use pmem to get better performance, sometimes we use it to lower TCO (and sometimes both).
Hope that helps,
-andy