I've verified through experimentation that erl_child_setup does use more CPU the more open (but unused) file descriptors are allocated to the container. When using Docker "swarm" mode (via "docker stack deploy") there is no way to set ulimits, but there is using "docker run". So to test, I launched two containers with "docker run", one with no ulimits set (resulting in over 1000000) and one setting the max open files param to 8000. The one with no limit regularly saw erl_child_setup running with 50%+ CPU load, while the one with 8000 still saw erl_child_setup run, but using less than 1% CPU.
Also, if you ps aux | grep erl_child_setup, you see that the param passed to this process is the max file descriptors, so whatever this process is doing, it's doing it once for every possible file descriptor. Note that during this entire experiment, RabbitMQ is completely idle, with no active connections.
I've tried over a dozen different ways to set the max file descriptors when using "docker stack deploy", but none have had any effect.
Where does the RabbitMQ docker image get it's value from?
If there a way to set the max file descriptors as part of a RabbitMQ config file or environment var?