Skip to content

Instantly share code, notes, and snippets.

@yunqu
Last active April 17, 2019 17:30
Show Gist options
  • Save yunqu/e25253b699d6be8f00a39514b0e662a2 to your computer and use it in GitHub Desktop.
Save yunqu/e25253b699d6be8f00a39514b0e662a2 to your computer and use it in GitHub Desktop.
Resolve redis server warnings when booting up ray

Go to your log folder as instructed when you start ray.

cat redis-shard_0.out

You may see the following warnings.

875:C 17 Apr 2019 16:32:39.561 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5875:C 17 Apr 2019 16:32:39.561 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=5875, just started
5875:C 17 Apr 2019 16:32:39.561 # Configuration loaded
5875:M 17 Apr 2019 16:32:39.562 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
5875:M 17 Apr 2019 16:32:39.562 # Server initialized
5875:M 17 Apr 2019 16:32:39.562 # 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.
5875:M 17 Apr 2019 16:32:39.562 # 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

To solve those warnings:

  • warning 1: docker-library/redis#35
  • warning 2: see the warning message to resolve
  • warning 3: see the warning message to resolve

Also, make sure your rc.local can be executed: https://askubuntu.com/questions/299792/why-is-the-command-in-etc-rc-local-not-executed-during-startup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment