High CPU usage by erl.exe (using 20%-25% CPU continuously)

8,716 views
Skip to first unread message

Shruti Malani Krishnan

unread,
Dec 12, 2015, 11:53:44 AM12/12/15
to rabbitmq-users
Hello,

We're new to using RabbitMQ and are running it on a Windows Server 2012. The problem is that erl.exe is taking high CPU usage, usually running at around 25% usage and reaches as high as 45% at times. Even in idle state it's running between 4-15% CPU usage.

What could be causing this? Is there any setting that we need to change?

Any pointers would be great!

Thanks,
Shruti

Michael Klishin

unread,
Dec 12, 2015, 4:10:47 PM12/12/15
to rabbitm...@googlegroups.com, Shruti Malani Krishnan
On 12 December 2015 at 19:53:47, Shruti Malani Krishnan (shr...@powrofyou.com) wrote:
> The problem is that erl.exe is taking high CPU usage, usually
> running at around 25% usage and reaches as high as 45% at times.
> Even in idle state it's running between 4-15% CPU usage.
>
> What could be causing this? Is there any setting that we need to
> change?

We've seen this in the past on Windows and found no obvious explanation. Erlang VM does not use
kernel polling (I/O completion ports) on Windows, which means it has to use highly inefficient
alternatives.

You may want to try 64-bit Erlang 18.1 (which means RabbitMQ 3.5.6, as earlier versions won't run on that release)
and deploying RabbitMQ on a different OS, where kernel polling is used by the runtime. 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Shruti Malani Krishnan

unread,
Dec 12, 2015, 7:44:06 PM12/12/15
to Michael Klishin, rabbitm...@googlegroups.com
Hi Michael,

Thanks for replying! To clarify, we have the latest version of both installed on our Windows Server. But it's still has the issue. Do you recommend Linux (CentOS) instead?

Also, is there a way to limit total number of processes simultaneously being managed by RabbitMQ?

Thanks,
Shruti

--

Shruti Malani Krishnan (accent -- clicked on 400+ times)
Powr of You | Co-founder



   

Michael Klishin

unread,
Dec 12, 2015, 8:14:30 PM12/12/15
to Shruti Malani Krishnan, rabbitm...@googlegroups.com
On 13 December 2015 at 03:44:00, Shruti Malani Krishnan (shr...@powrofyou.com) wrote:
> Do you recommend Linux (CentOS) instead?

I'd personally recommend Linux over Windows for just about any data service, not just RabbitMQ.
We don't hear about CPU use around 10% on Linux, that's for sure.

> Also, is there a way to limit total number of processes simultaneously
> being managed by RabbitMQ?

Erlang processes? Not really, as connections, channels and queues all use multiple
processes each. I assure you that that number is the problematic as an idle Erlang process
uses 1-2 KiB of RAM (on 64-bit architectures), compared to a few MiB in many other runtimes.

You can limit the number of schedulers, things that execute code in Erlang processes,
using VM options. Again, I doubt that would help much and would be worth doing. 

Shruti Malani Krishnan

unread,
Dec 12, 2015, 8:25:16 PM12/12/15
to Michael Klishin, rabbitm...@googlegroups.com
Ok thanks Michael, will try it out.

--

Shruti Malani Krishnan (accent -- clicked on 400+ times)
Powr of You | Co-founder



   

Dev Imagicle

unread,
Jun 15, 2017, 8:28:48 AM6/15/17
to rabbitmq-users, mkli...@pivotal.io
Hello,
I had the same problem with my cluster running RabbitMQ 3.6.6 and Erlang 17.5 32bit on W2K2008 R2 servers. I noticed this happens when multiple processor cores are available and Erlang VM starts with SMP support and multiple schedulers. I disabled SMP support by defining the enviroment variable ERL_AFLAGS with value -smp disable. This way the Erlang VM runs only one scheduler and (I suppose) does not need to use synchronization obiects. Using this settings CPU usage drammatically goes down, passing from 20%-25% to less than 1%.

Does disabling SMP support affect Erlang VM performance? In my application I have a low message rate of about 40 msgs/sec.

Rik
Reply all
Reply to author
Forward
0 new messages