<div class="gmail_quote">2010/6/9 Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com">simon@rabbitmq.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On 09/06/10 16:12, Nicolás César wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Is there any other way to checkit? Is there a way to get a memory dump<br>
from the vm to see whats going on?<br>
</blockquote>
<br></div>
Well, there's erlang:memory/0.<br>
<br>
If you're using the Debian packages, type:<br>
<br>
$ sudo -u rabbitmq -H erl -remsh rabbit@`hostname` -sname foo<br>
<br>
to establish a connection to the RabbitMQ Erlang process then at the Erlang prompt:<br>
<br>
memory().<br>
<br>
to give some high level statistics about what's using memory.<br></blockquote><div><br>Cool!! <br><br>(rabbit@sendsorium)1> memory().<br>[{total,27420688},<br> {processes,8840004},<br> {processes_used,8793876},<br>
{system,18580684},<br> {atom,683329},<br> {atom_used,650462},<br> {binary,11081456},<br> {code,5263067},<br> {ets,452988}]<br> <br>but in top I see beam.smp using:<br>VIRT=141m RES=95m<br></div><div><br>none of those numbers get close.... <br>
<br>How can I use this information to get better debugging? <br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Other things to think about:<br>
<br>
* Are you using the most recent Erlang? (R13B04) GC has improved recently.<br></blockquote><div><br>I've been using:<br> Erlang R13B02 (erts-5.7.3) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]<br><br>
Is that old? I'm trying other resources before changing erlang version (and taking my Debian to 'testing' instead of 'stable') . Thanks for the advice. Now I'm aware of that... if everything fails, I'll do it!<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
* Are you stopping the queues from hibernating? If you've written something like a shell script to repeatedly invoke rabbitmqctl list_queues this will keep the queue processes from hibernating which in turn stops them from GCing on hibernate. If queues are busy this is not a problem as they also GC every (n) reductions, but if they're almost-but-not-quite idle it can be a problem. It doesn't have to be a shell script, anything that means the queues never get 10 seconds or so idle.</blockquote>
<div> </div><div><br>This is really nice data!! Yes. I have scripts but they're cron'ed every minute.... I'm changing that and testing again. <br><br>One small detail. I'm using:<br><br>-----------------------------------------------------<br>
while True:<br> msg = self.chan.basic_get(self.config['queue'])<br> if msg:<br> ....<br> time.sleep(2.0)<br>----------------------------------------------------<br><br>because I need a fixed-rate consumer . ... could this be a similar case of the "almost-but-not-quite idle queue"? <br>
is there any way to tell the broker to consume at a fixed rate with chan.basic_consume(...callback = f)?<br><br>Greetings<br><br clear="all">Nico César<br><a href="http://blog.nicocesar.com">http://blog.nicocesar.com</a><br>
<br></div></div>