-
Notifications
You must be signed in to change notification settings - Fork 872
docs: Avoid memory bloat in some misconfigured versions of Docker/containerd Hosts (e.g. on Debian 13) #4999
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
base: main
Are you sure you want to change the base?
Conversation
…on Debian 13) by limiting the number of open file descriptors (ulimits nofile) in the example docker-compose.yml files
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thanks for your contribution. |
|
I think it might be worth while here considering how many people affected. And we already do document the docker-compose file. |
|
I tend to agree since the beginning. |
| cap_drop: | ||
| - all | ||
| ulimits: | ||
| nofile: 65536 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To explain this to newcomers, a comment would greatly enhance UX.
| cap_drop: | ||
| - ALL | ||
| ulimits: | ||
| nofile: 65536 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To explain this to newcomers, a comment would greatly enhance UX.
| cap_drop: | ||
| - all | ||
| ulimits: | ||
| nofile: 65536 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To explain this to newcomers, a comment would greatly enhance UX.
|
I agree about the cryptic nature of these settings. Please consider the change I've just made to |
|
If the change to the entrypoint alone is good enough i would vote for that. Lower overall maintenance for us and less complexity exposed to users. Could you update the pr and remove the other changes? |
I do see it differently. This is hiding a setting which is host specific and even worse make it hard coded and not changeable. In my instance the ulimits is much higher and this change will decrease performance. So I do see several options:
|
|
is that really affecting performance?
|
|
To add: I strongly vote against using a deprecated env variable:
source: https://erlang.org/documentation/doc-7.2/erts-7.2/doc/html/erl.html |
fully agree, wasn't aware. in that case also voting for nothing or adding it to the docs. |
|
Ah, I didn't realize the env var was deprecated. I've just pushed a change to set the ulimit directly. I don't see how this will decrease performance for anyone (assuming no one has thousands of cars connected to the same instance). |
and avoid getting an error if the current limit is smaller.
|
I've refined entrypoint.sh again with a configuration variable and also to avoid an error if the system's limit is smaller. |
As found in #3045 and #4940, some versions of Docker/containerd set the "nofiles" limit very high, which causes beam.smp to use > 2 GB of memory. In particular, this happens in the current Debian stable (13/Trixie).
I've checked that this reduces the memory size in the default docker install, but not the Apache or Traefik installs.