[rabbitmq-discuss] why run cpu_sup?

Marek Majkowski majek04 at gmail.com
Wed Dec 7 10:44:19 GMT 2011


On Tue, Dec 6, 2011 at 17:40, Jason Lunz <jason.lunz at gmail.com> wrote:
> It appears from some searching that the rabbitmq startup script has been
> invoking start_cpu_sup=true for a long time. But I can't find anywhere
> where rabbitmq is using the data it gathers. Perhaps that should be
> disabled just to have one less process hanging around?

In rabbitmq 2.0.0 and before it was used to make sure that load is
evenly distributed between nodes in a cluster.

Check out src/rabbit_load.erl in rabbitmq 2.0.0:

local_load() ->
    LoadAvg = case whereis(cpu_sup) of
                  undefined -> unknown;
                  _         -> case cpu_sup:avg1() of
                                   L when is_integer(L) -> L;
                                   {error, timeout}     -> unknown
                               end
              end,
    {{statistics(run_queue), LoadAvg}, node()}.


But this code seems to be removed in 2.2.0 and later, so running
cpu_sup may not be necessary now indeed.

Cheers,
  Marek


More information about the rabbitmq-discuss mailing list