On 02/12/14 19:20, Noah Magram wrote:
> I read somewhere on this list that queues will not GC until they are in
> an idle state.
That's not really true. Queues GC after they have done a certain amount
of work (counted as "reductions" by Erlang and visible in the stats
below). However, they also do a sort of super-GC when they go idle, in
which the process memory is GCed then compressed. Obviously going into
and out of this state is expensive, hence why we don't do it all the time.
> If we were in the weird mode where publisher
> confirmations were trickling back (despite no publishes to queues
> happening, and the queues themselves being empty), would this prevent
> the queues from freeing memory?
It certainly shouldn't.
> > # rabbitmqctl eval 'lists:sublist(lists:reverse(__lists:sort([{catch
> process_info(Pid, memory), Pid, catch process_info(Pid)} || Pid <-
> processes()])), 30).'
>
> Great - thanks! The cluster is in a "healthy" state pushing around
> 10k/s, and the largest process appears to the call to eval, am I
> interpreting this correctly? Memory usage is usually pretty low when
> the queues are nearly empty.
You are. I was hoping to see the output of that command when the system
was in a bad state...
> Also I notice a most of the other processes in the top 10 are
> "process_next_msg" functions, and the dictionary (property, attribute?)
> seems to hold counters (credit_to) that appear to be for the internal
> rate limiting / flow control.
Yes, you should also be able to see a description of the process under
'process_name' in the dictionary.
> Often we are trying to determine why a
> connection/channel/queue is in "flow", could this information help
> diagnose that?
Have you seen
http://www.rabbitmq.com/blog/2014/04/14/finding-bottlenecks-with-rabbitmq-3-3/
?
> And finally, is there an easy way to get these erlang structures into
> valid JSON? They seem pretty close already.
It's a bit more fiddly than that since Erlang terms and JSON have
different type systems, you need to make some decisions about how to
convert things.
But: the HTTP API exported by the rabbitmq-top plugin talks JSON and
gives very similar information.
Cheers, Simon
> Thanks,
>
> -N
>
> On Tue, Dec 2, 2014 at 2:45 AM, Simon MacMullen <
si...@rabbitmq.com
> <mailto:
si...@rabbitmq.com>> wrote:
>
> On 01/12/14 17:27, Noah wrote:
>
> On the affected nodes the memory details show nearly all the memory
> being held in Queues, Slaves and Binaries. Again - there are no
> messages in the queues.
>
>
> (I understand you're upgrading now but in case the problem reoccurs
> / for other people finding this thread.)
>
> We are running RMQ 3.4.1 on erlang R15B01. Does anyone have any
> suggestions on how to diagnose or resolve this issue?
>
>
> You might find the rabbitmq-top plugin useful. You can get it from
>
http://www.rabbitmq.com/__community-plugins.html
> # rabbitmqctl eval 'lists:sublist(lists:reverse(__lists:sort([{catch