首页 > 其他 > 详细

安装redis时Newer version of jemalloc required错误解决

时间:2021-05-25 22:24:27      阅读:17      评论:0      收藏:0      [点我收藏+]

安装redis时Newer version of jemalloc required错误解决

问题:

[root@localhost redis-4.0.0]# make 

cd src && make all
make[1]: Entering directory `/root/data/redis-4.0.0/src‘
CC Makefile.dep
make[1]: Leaving directory `/root/data/redis-4.0.0/src‘
make[1]: Entering directory `/root/data/redis-4.0.0/src‘
CC adlist.o
In file included from adlist.c:34:
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/root/data/redis-4.0.0/src‘
make: *** [all] Error 2

 

解决方法:

# cd deps/

# make hiredis jemalloc linenoise lua geohash-int

#cd ..

#make

 

不要使用这样的解决方式:make MALLOC=libc

原因(摘自:http://www.jb51.net/article/100575.htm):

于tcmalloc,jemalloc和libc对应的三个内存分配器。其性能和碎片率如何呢?

下面是一个简单测试结果,使用Redis自带的redis-benchmark写入等量数据进行测试,数据摘自采用不同分配器时Redis info信息。

我们可以看到,采用tcmalloc时碎片率是最低的,为1.01,jemalloc为1.02,而libc的分配器碎片率为1.31,

安装redis时Newer version of jemalloc required错误解决

原文:https://www.cnblogs.com/yaoyangding/p/14810321.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!