rabbitmq
rabbitmq copied to clipboard
Outdated information about memory limits
The Memory Limits
section of https://hub.docker.com/_/rabbitmq is incorrect (perhaps was true a long time ago). Container limits are taken into account, so vm_memory_high_watermark.relative
will be calculated based on container memory, not host memory. I think the whole section can be simply removed.
Ah, good catch! I won't be able to get to it right away myself, but that's maintained at https://github.com/docker-library/docs/blob/master/rabbitmq/content.md if you (or someone else reading this) wanted to take a stab at a PR. :+1:
Turns out this can still happen. A user created an issue today (using up to date version of RabbitMQ and Erlang) and I noticed:
Memory high watermark setting: 0.4 of available memory, computed to: 108.0799 gb
I'm fairly sure this is the host's memory, not container memory limit. I wonder what could be causing this in some situations.
Erlang's imperfect detection of the limits using cgroups? cgroup version differences (IIRC some distribution have started rolling out v2 recently)?
In rabbitmq cluster operator, we set total_memory_available_override_value
to 80% of the resource limit in the Pod i.e. limit by cgroup. We could document this setting in the Memory Limits
section, if Erlang doesn't play well with cgroups.
I'm fairly sure this is the host's memory, not container memory limit. I wonder what could be causing this in some situations.
Is there any solution for this? 🙏
vm_memory_high_watermark.relative
is not working when using rabbitmq 3 with Kubernetes memory limits and I think that it used to work in the past (Reference -> https://www.rabbitmq.com/kubernetes/operator/using-operator#resource-reqs)
@luarx no, it never did work reliably because the runtime's ability to detect the amount of available memory is only limited to some OSes and likely cgroups v1 for now.
The docs have been updated to provide Kubernetes-specific recommendations.
@tianon @yosifkit folks, can we integrate these recommendations from the RabbitMQ docs into this image, and then hopefully consider this issue resolved?
I would be happy to contribute if you tell me where to look in the source, and how to test a preview of my edits locally. Thank you!
That's in https://github.com/docker-library/docs/blob/master/rabbitmq/content.md :eyes: (as linked above :sweat_smile:)
If you want to test the Docker Hub rendering, you can just create a repository and there's a preview in the private "edit" page, but I think markdown is probably limited enough that you can probably guess how it'll render pretty well (Hub's rendering is pretty vanilla). :innocent: