본문 바로가기

Redis

[Redis] Redis 시작시 Warning 처리

Redis 를 설치 후 시작해보면 로그에 몇몇 Warning 에 대한 처리를 해보자.

1. WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

처리

sudo vi /etc/sysctl.conf

net.core.somaxconn=65535

2. 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.

처리

sudo vi /etc/sysctl.conf

vm.overcommit_memory = 1

3. WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

처리

sudo vi /etc/rc.local

echo never > /sys/kernel/mm/transparent_hugepage/enabled

대부분 서버의 설정들이니 혹시 다른 부분이 있다면 서버에 맞게 해당 옵션을 수정해주면 된다.

'Redis' 카테고리의 다른 글

[Redis] tomcat 에 설정  (0) 2020.02.06