pmem / pmem-redis Goto Github PK
View Code? Open in Web Editor NEWA version of Redis that uses persistent memory
License: BSD 3-Clause "New" or "Revised" License
A version of Redis that uses persistent memory
License: BSD 3-Clause "New" or "Revised" License
zadd(512/2000),zadd(2000/2000) TPS and latency performance drop down:
Single node:
zadd (512/2000) AEP/DDR TPS ratio =37%, zadd(2000/2000) AEP/DDR TPS ratio = 41%
zadd (512/2000) Latency =270%, zadd (2000/2000) Latency =218%
Multi node:
zadd (512/2000) AEP/DDR TPS ratio =31%, zadd(2000/2000) AEP/DDR TPS ratio =33%
zadd (512/2000) Latency =343%, zadd (2000/2000) Latency =275%
Hello to all,
I would like to kindly ask if this version of redis uses fsync calls to persist data,
or use-space durability management with cache line flushes is utilized.
Thank you very much in advance,
BR,
Chloe
Had been trying to use pmem-redis with Redis 5.0.
Building the two together fails due to difference in the jemalloc library being used in pmem-redis and redis 5.0.
On executing, "make USE_NVM=yes" the following error in thrown on Ubuntu 16.04.
--===============
../redis-5.0/deps'
CC adlist.o
CC quicklist.o
In file included from ../deps/memkind/include/memkind/internal/memkind_pmem.h:32:0,
from nvm.h:37,
from quicklist.c:43:
../deps/memkind/include/memkind/internal/memkind_arena.h:44:52: error: unknown type name ‘chunk_hooks_t’
int memkind_arena_create_map(struct memkind *kind, chunk_hooks_t *hooks);
^
Makefile:299: recipe for target 'quicklist.o' failed
make[1]: *** [quicklist.o] Error 1
--===============
The issue seems to be due to change in the jemalloc implementation in jemalloc 5.0 which is being used by Redis 5.0.
Would like to know,
1). whether pmem-redis has been tried with jemalloc 5.0 as I see one comment with respect to jemallocat library not working with jemalloc 5.0 (2ea9574)
2). whether any workaround available so that pmem-redis works with redis 5.0
3). whether any roadmap is available for moving pmem-redis to redis 5.0
Would like to have your inputs and suggestions on this issue.
I used CentOS 7 and tried
make USE_NVM=yes
It results
zmalloc.h:55:2: error #error Newer version of jemalloc required
I already tried make hiredis jemalloc linenoise lua
in the ./deps folder.
And I always use make distclean
whenever run make command.
I manually build the pmdk-1.4.2, and copy it to the ./deps/pmdk folder.. (Not using git init submodule
because of a firewall problem.
I'm wondering how can I fix the make error and whether it is fine building PMDK manually.
The pmem-redis generated binaries have the same names with official redis which makes it difficult to be added to Clear Linux package (name conflicts).
I wonder what compile flags do I need to set in order to make sure data on DCPMM can be recovered after a power failure?
Could you explain more about the AEP_COW flag? How does it affect data persistence and recovery?
Hi, trying to see if I can run this one Fedora 31. I noticed a similar issue reported to mine, but I have tried the fixes from that issue, and I still get this failure.
After installing and updating Fedora 31, I used these steps to try and install and build:
git clone https://github.com/pmem/pmem-redis.git
cd pmem-redis/
git submodule init
git submodule update
Remove -Werror from deps/pmdk/src/examples/Makefile.inc
make clean
make distclean
make USE_NVM=yes
I notice 'make distclean' doesn't seem to run quite right, in a way similar to one of the errors in the final compile:
[root@jrgruher-nc1-f31 pmem-redis]# make distclean
cd src && make distclean
make[1]: Entering directory '/root/pmem-redis/src'
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-benchmark-seq redis-check-rdb redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html Makefile.dep dict-benchmark
(cd ../deps && make distclean)
make[2]: Entering directory '/root/pmem-redis/deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd memkind/jemalloc/obj && make distclean) > /dev/null || true
/bin/sh: line 0: cd: memkind/jemalloc/obj: No such file or directory
(cd memkind && make distclean) > /dev/null || true
make[3]: *** No rule to make target 'distclean'. Stop.
(cd jemalloc && make clean) > /dev/null || true
make[3]: *** No rule to make target 'clean'. Stop.
(cd pmdk && make clobber) > /dev/null || true
(cd jemallocat && make clean) > /dev/null || true
(cd aofguard && make clean) > /dev/null || true
(rm -f .make-*)
make[2]: Leaving directory '/root/pmem-redis/deps'
(rm -f .make-*)
make[1]: Leaving directory '/root/pmem-redis/src'
This is the error I get after trying 'make USE_NVM=yes':
cc: error: ../deps/memkind/jemalloc/obj/lib/libjemalloc.a: No such file or directory
cc: error: ../deps/memkind/.libs/libmemkind.a: No such file or directory
cc: error: ../deps/jemallocat/lib/libjemallocat.a: No such file or directory
cc: error: ../deps/aofguard/lib/libaofguard.a: No such file or directory
make[1]: *** [Makefile:244: redis-server] Error 1
make[1]: Leaving directory '/root/pmem-redis/src'
make: *** [Makefile:8: all] Error 2
I will attach a full log of the make attempt.
my oprations are as follows:
cd /root
yum -y update
yum -y install vim make gcc gcc-c++ git cmake kernel-devel kernel-headers tcl autoconf automake pkg-config pcre-devel zlib-devel libmemcached-devel libevent libevent-devel numactl numactl-devel libtool ndctl ndctl-libs daxctl daxctl-libs ndctl-devel daxctl-devel
#All packages have been installed successfully
git clone https://github.com/pmem/pmem-redis
cd pmem-redis/
git submodule init
git submodule update
make clean
make distclean
make USE_NVM=yes
#Fail as shown:
LINK redis-server
cc: error: ../deps/memkind/jemalloc/obj/lib/libjemalloc.a: No such file or directory
cc: error: ../deps/memkind/.libs/libmemkind.a: No such file or directory
cc: error: ../deps/jemallocat/lib/libjemallocat.a: No such file or directory
cc: error: ../deps/aofguard/lib/libaofguard.a: No such file or directory
make[1]: *** [Makefile:244: redis-server] Error 1
make[1]: Leaving directory '/root/pmem-redis/src'
make: *** [Makefile:8: all] Error 2
Do I need to enter deps first to compile the package inside? Or am I missing any required installation packages?
Hi Folks,
I am trying to use pmem-redis with Kubernetes containers and upon running 'make USE_NVM=yes AEP_COW=yes' I see it failing because of dependencies not getting met. Here is the error
cc: error: ../deps/pmdk/src/nondebug/libpmem.a: No such file or directory cc: error: ../deps/memkind/jemalloc/obj/lib/libjemalloc.a: No such file or directory cc: error: ../deps/memkind/.libs/libmemkind.a: No such file or directory cc: error: ../deps/jemallocat/lib/libjemallocat.a: No such file or directory cc: error: ../deps/aofguard/lib/libaofguard.a: No such file or directory Makefile:244: recipe for target 'redis-server' failed make[1]: *** [redis-server] Error 1 make[1]: Leaving directory '/home/labuser/pmem-redis/src' Makefile:8: recipe for target 'all' failed make: *** [all] Error 2
I followed the steps in README:
OS: Ubuntu 18.04
There are two regions, each having 24 namespaces.
Please can you provide me what I am doing wrong? Thanks in advance
some connection ports lost, and Redis crash when running hset workload in multi-node with commit: eb6409b2
Redis_crash.txt
Line 106 in cc54b55
106 sds sdsmvtonvm(const sds s)
107 {
108 if(server.nvm_base && !is_nvm_addr(s))
109 {
110 size_t header_size = sdsheadersize(s);
111 size_t total_size = header_size + sdsalloc(s) + 1;
112 if(total_size >= server.sdsmv_threshold)
113 {
114 void* new_sh = nvm_malloc(total_size);
115 if(!new_sh)
116 {
117 //serverLog(LL_WARNING, "Can't allocate on NVM. Keep data in memory.");
118 return s;
119 }
120 void* sh = s - header_size;
121 size_t used_size = header_size + sdslen(s) + 1;
122 pmem_memcpy_persist(new_sh, sh, used_size);
123 zfree(sh);
124 return (char*)new_sh + header_size;
125 }
126 }
127 return s;
128 }
I would like to change the sdsmvtonvm() signature to return an error message when nvm_malloc failed. Otherwise, users who calls sdsmvtonvm() have no chance to check if it succeed or not.
Would you like to shed a light on that?
########################### NVM #######################
nvm_maxcapacity 1
nvm_dir /mnt/pmem1
nvm_threshold 10
should be
########################### NVM #######################
nvm-maxcapacity 1
nvm-dir /mnt/pmem1
nvm-threshold 10
Trying to compile using these basic steps:
dnf -y update
dnf -y install vim make gcc gcc-c++ git cmake kernel-devel kernel-headers tcl autoconf automake pkg-config pcre-devel zlib-devel libmemcached-devel libevent libevent-devel numactl numactl-devel libtool ndctl ndctl-libs daxctl daxctl-libs
cd /root
git clone https://github.com/pmem/pmem-redis.git
cd pmem-redis/
git submodule init
git submodule update
make clean
make distclean
make USE_NVM=yes
Fails as shown here:
cc: error: ../deps/pmdk/src/nondebug/libpmem.a: No such file or directory
cc: error: ../deps/memkind/jemalloc/obj/lib/libjemalloc.a: No such file or directory
cc: error: ../deps/memkind/.libs/libmemkind.a: No such file or directory
cc: error: ../deps/jemallocat/lib/libjemallocat.a: No such file or directory
cc: error: ../deps/aofguard/lib/libaofguard.a: No such file or directory
make[1]: *** [Makefile:244: redis-server] Error 1
make[1]: Leaving directory '/root/pmem-redis/src'
make: *** [Makefile:8: all] Error 2
Seems like maybe an earlier failure building PMDK is the problem?
cd pmdk && make
make[3]: Entering directory '/root/pmem-redis/deps/pmdk'
src/common.inc:370: *** libndctl(version >= 60.1) is missing -- see README. Stop.
make[3]: Leaving directory '/root/pmem-redis/deps/pmdk'
make[2]: *** [Makefile:82: pmdk] Error 2
make[2]: Leaving directory '/root/pmem-redis/deps'
make[1]: [Makefile:225: persist-settings] Error 2 (ignored)
But I do have ndctl-libs installed:
[root@jrgruher-c8s-redis-aep pmem-redis]# rpm -qa |grep ndctl
ndctl-65-1.el8.x86_64
ndctl-libs-65-1.el8.x86_64
I will attach a full build failure log.
The compiling was successful, and all new parameters including -pointer-based-aof work for me except the "use-aofguard".
src/redis-server --port 30001 --protected-mode yes --appendonly yes --appendfsync everysec --appendfilename 30001.aof --save --daemonize yes --nvm-maxcapacity 128 --nvm-dir /mnt/pmem0 --nvm-threshold 64 --pointer-based-aof yes --use-aofguard yes
when start a redis server with "--use-aofguard yes", below error will prompt:
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 13
'use-aofguard "yes"'
Bad directive or wrong number of arguments
I am sure I've used all the parameters before compiling:
make USE_NVM=yes AEP_COW=yes SUPPORT_PBA=yes USE_AOFGUARD=yes
Any idea why this error is happening?
I want to allocate memory from persistent memory that do not intervene filesystem like devdax. is it available? i could find direction to use persistent memory that use filesystem-dax (fsdax)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.