What is the minimum memory needed to use RabbitMQ?

1,454 views
Skip to first unread message

Lars Janssen

unread,
Oct 15, 2015, 10:45:32 AM10/15/15
to rabbitmq-users
Hi all,

I'm trying to set up a Sensu monitoring server on a Digital Ocean droplet. I don't expect it to be heavily used (personal project) so I started with the $5/month 512MB server. Obviously I can upgrade it later when it's up and running, but it seems I can't even get off the ground with this spec!

Memory usage on the box goes down to around 49MB and then lots of things start failing; especially RabbitMQ, which can't stop because it doesn't have enough memory to do so via the init script.

My Sensu (with RabbitMQ) setup is basically this Docker image: https://github.com/hiroakis/docker-sensu-server (see the rabbitmq.conf in there). BTW Docker is on 1.8.2 and hopefully free of the memory leak issues from earlier versions.

I tried adding this line into the /etc/rabbitmq/rabbitmq.conf:

    {vm_memory_high_watermark, 0.2},

The logs show that it's limited memory to around 98MB as a result of this config, but still when I launch the container RabbitMQ is using all the available memory. This is a few seconds after starting, with only one Sensu agent trying to connect, and no checks defined.

For comparison, I looked at a machine at home where I'd run the Sensu container without any problems (probably because this machine has 16GB of hardly-used RAM):

      PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
     2062 498       20   0 2550680 302764   3648 S   0.3  1.9  25:48.43 beam.smp

Memory usage:

    $ free -m
                 total       used       free     shared    buffers     cached
    Mem:         15894      11905       3988          2       2452       7027
    -/+ buffers/cache:       2425      13468
    Swap:        16225          0      16225

After logging into the container and stopping just rabbitmq:

    $ free -m
                 total       used       free     shared    buffers     cached
    Mem:         15894      11611       4283          2       2452       7027
    -/+ buffers/cache:       2131      13763
    Swap:        16225          0      16225

294MB seems like an awful lot of memory for a process that's doing nothing (although I didn't set the vm_memory_high_watermark value on this instance).

So is there a certain memory footprint needed just to "get off the ground" (I'm sure it's super efficient at larger scale), or am I missing some obvious configuration settings that might apply to a small scale installation?

Thanks,

Lars.

Michael Klishin

unread,
Oct 15, 2015, 11:35:26 AM10/15/15
to rabbitm...@googlegroups.com
RabbitMQ can work with 128 MB under light load, default memory configuration is "up to 40% of total ram". I cannot comment on Sensu.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lars Janssen

unread,
Oct 15, 2015, 12:24:00 PM10/15/15
to rabbitmq-users
That's good to know, thanks.

In that case, I have no idea what that Docker container/config needs so much memory. It wasn't Sensu using the memory, because just stopping Rabbit freed up 295MB (exactly the same on both machines where I've been testing).

I just tried installing RabbitMQ directly and also via the official Docker container. The direct install uses around 37MB when fired up but not used; the Docker container uses 72MB.
Reply all
Reply to author
Forward
0 new messages