RabbitMQ can report on its own memory use, to let you see where your system is using memory.
Note that all measurements are somewhat approximate, based on values returned by the underlying Erlang virtual machine; however they should still be accurate enough to be useful.
You can obtain the memory use report by invoking rabbitmqctl status, or by looking at the node details page in the management web UI. Memory use is split into the following categories (which do not overlap):
This includes memory used by incoming connections and channels, and outgoing ones if the appropriate plugins are loaded. It also includes memory used by the SSL system.
Memory used by individual queue processes. Note that queues will swap their contents out to disc when under memory pressure. Message bodies do not show up here but in Binaries.
Memory used by plugins (apart from the Erlang client which is counted under Connections, and the management database which is counted separately). Note that RabbitMQ will count some per-connection memory here for protocol plugins such as STOMP and MQTT.
Memory belonging to processes not counted above, and memory assigned to “processes” by the Erlang VM, but not to any one process. Memory that has recently been garbage collected can show up here briefly.
Mnesia keeps an in-memory copy of all its data (even on disc nodes). Typically this will only be large when there are a large number of queues, exchanges, bindings, users or virtual hosts.
The default message store implementation keeps an in-memory index of all messages, including those paged out to disc.
The management database (if the management plugin is loaded). In a cluster, this will only be present on one node.
Other in-memory tables besides the three sets above. Note that due to a bug in current versions of the Erlang runtime, some memory will be counted under this heading for all tables, including the three sets above.
Memory used by shared binary data in the Erlang VM. In-memory message bodies show up here.
Memory used by code. Should be fairly constant.
Memory used by atoms. Should be fairly constant.
Other memory used by Erlang. One contributor to this value is the number of available file descriptors.