RabbitMQ Memory Optimization Help #9918
-
Hello, everybody. I have the following questions: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
Since you have a lot of queues and channels, the plugin that uses a lot of memory is almost certainly the management plugin, since it collects all those metrics that you are showing in the screenshot. We recommend, especially in environments with a lot of queues/connections/channels, using the Prometheus endpoint for monitoring and turning off the Management metrics. This way you don't store metrics within RabbitMQ, but externally (but you also won't get these graphs in the Management UI). If you are not ready for that, you can play with https://www.rabbitmq.com/management.html#sample-retention to limit the amount of data collected/stored. Second point is the number of channels you have. Given you have ~300 connections, I'm don't understand why you need ~14000 channels. Perhaps instead of that many channels that declare that many queues, you can just have fewer queues bound with multiple routing keys so that the same apps receive the same messages, but using much fewer channels and queues? That should lower the memory usage significantly. |
Beta Was this translation helpful? Give feedback.
Since you have a lot of queues and channels, the plugin that uses a lot of memory is almost certainly the management plugin, since it collects all those metrics that you are showing in the screenshot. We recommend, especially in environments with a lot of queues/connections/channels, using the Prometheus endpoint for monitoring and turning off the Management metrics. This way you don't store metrics within RabbitMQ, but externally (but you also won't get these graphs in the Management UI). If you are not ready for that, you can play with https://www.rabbitmq.com/management.html#sample-retention to limit the amount of data collected/stored.
Second point is the number of channels you have. …