前面启动Redis时,看到如下警告:
[1958] 13 Aug 16:18:24 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
需要修改/etc/sysctl.conf文件:
vim /etc/sysctl.conf
末尾追加vm.overcommit_memory = 1
然后执行sysctl vm.overcommit_memory=1,使之生效:
# sysctl vm.overcommit_memory=1 vm.overcommit_memory = 1
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/9735.html