Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please configure debian:buster-slim so it's more compatible with Redis #224

Closed
ruralcoder opened this issue Feb 11, 2020 · 3 comments
Closed

Comments

@ruralcoder
Copy link

I get the following warnings

# WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
# Server initialized
# 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.
# 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.

Of course the debian:buster-slim base is so restricted and uses RO filesystem, it makes this dockerfile not so user-friendly.

@tianon
Copy link
Contributor

tianon commented Feb 11, 2020

Duplicate of #14, #19, #20, #55, #165 (to name a few).

TL;DR, these need to be set on the host, not in the container (if they were image settings, we would set them by default).

@tianon tianon closed this as completed Feb 11, 2020
@ruralcoder
Copy link
Author

On the host machine I get

$ cat /proc/sys/net/core/somaxconn
65535

When I run docker I still see

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

When I bash into the docker

docker run -it dmvmonkey/redis  /bin/bash
# cat /proc/sys/net/core/somaxconn
128

I don't see it carrying from the host into the container.

Any further advice??

@yosifkit
Copy link
Contributor

$ docker run -it --rm debian
root@2a9ac928345d:/# cat /proc/sys/net/core/somaxconn
128
root@2a9ac928345d:/# exit
$ docker run -it --rm --sysctl net.core.somaxconn=11223344 debian
root@085d23ea47ae:/# cat /proc/sys/net/core/somaxconn
11223344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants