Hi All,
I got this error like blow when I want to set activedefrag
(error) ERR Active defragmentation cannot be enabled: it requires a Redis server compiled with a modified Jemalloc like the one shipped by default with the Redis source distribution
Redis Server
# Server
redis_version:4.0.6
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:147c3ed356144711
redis_mode:standalone
os:Linux 4.9.0-5-amd64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:6.3.0
process_id:20009
run_id:72d7604a437702c1d7a1396094a73c981481df88
tcp_port:6379
uptime_in_seconds:2150608
uptime_in_days:24
hz:10
lru_clock:12715469
executable:/usr/bin/redis-server
config_file:/etc/redis/redis.conf
Redis Info Memory
used_memory:36776648152
used_memory_human:34.25G
used_memory_rss:53895950336
used_memory_rss_human:50.19G
used_memory_peak:48538982016
used_memory_peak_human:45.21G
used_memory_peak_perc:75.77%
used_memory_overhead:7703176370
used_memory_startup:1801880
used_memory_dataset:29073471782
used_memory_dataset_perc:79.06%
total_system_memory:54881607680
total_system_memory_human:51.11G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:44000000000
maxmemory_human:40.98G
maxmemory_policy:allkeys-lfu
mem_fragmentation_ratio:1.47
mem_allocator:jemalloc-3.6.0
How to enable autodefrag. I did search on internet but I couldn't find anything
Thanks...
Comment From: youjiali1995
You should use the modified version of jemalloc in Redis. Try "make malloc=jemalloc"
Comment From: gokhandincer
I did update Redis and solved this issue. Thanks
Comment From: ahululu
hello,can you help me? I got this problem too.how do you update redis and don't stop the redis server
Comment From: oranagra
@madalion if you got the error message at the top, it means redis was compiled without defrag support. you can't enable it without restarting your server. you can however, create a replica that as it enable, and then switch-over to it.
Comment From: ahululu
@madalion if you got the error message at the top, it means redis was compiled without defrag support. you can't enable it without restarting your server. you can however, create a replica that as it enable, and then switch-over to it.
but I also get a problem: bgsave don't work ,i just google and find that means i can't create a replica because ,create a slave
requires the bgsave command.
127.0.0.1:6379> CONFIG GET dir
1) "dir"
2) "/home/centos/redis"
127.0.0.1:6379> BGSAVE
Background saving started
127.0.0.1:6379>
[root@redis redis-5.0.4]# ls /home/centos/redis
[root@redis redis-5.0.4]#
Comment From: oranagra
@madalion a slave doesn't require a BGSAVE command, although it does depend on similar mechanism. please have a look at your log file to see why the save fails. if the problem is related to disk access maybe you can fix it, or switch to diskless replication.
Comment From: ahululu
@madalion a slave doesn't require a BGSAVE command, although it does depend on similar mechanism. please have a look at your log file to see why the save fails. if the problem is related to disk access maybe you can fix it, or switch to diskless replication.
sorry , i have also a problem ,the running redis server don't set redis log file . i have try to set it,but i have not found the method while the server still running and don't stop the server.
127.0.0.1:6379> CONFIG GET logfile 1) "logfile" 2) ""
how can i get log ....
Comment From: oranagra
@madalion i'm sorry, but this is not the right place to ask such questions (this is the place to report bugs, or suggest improvements). please refer to the documentation, or ask for help in other places. Besides, i'm not at all clear on why you concluded that activedefrag is the solution to your problem (posting in this closed issue).
Comment From: ahululu
tank you help me a lot.