[erlang-questions] Stupid mistakes (Re: Suggestions)

Tomas Pihl tomas.pihl@REDACTED
Wed Aug 22 10:41:35 CEST 2007


* Chandru <chandrashekhar.mullaparthi@REDACTED> [2007-08-22 08:55:36 +0100]:

> Hi,
> 
> I have a couple of suggestions to make to the OTP team.
> 
> * Can a command which shows only processes with non-zero message
> queues be added (similar to c:i() but shows only processes which have
> non-zero message queues). Will be very helpful when a node is going
> wrong and eating up all available CPU. I know it can be done using a
> combination of c:processes() and then checking the message queue
> length of each process using erlang:process_info but in a high load
> situation, fetching the list of processes and walking the process list
> is time and resource consuming and might make things worse.

Ohhh, you have my wote on this one! 

Me and a collegue was called out to a customer site who had a bunch of AXD
301's running live traffic. One site had problems with high load and we
suspected this was due to some process was queueing up messages. At 1am, our
list comprehension-fu wasn't really showing its glory. We actually managed to
kill the site trying to get a list of the processes with non-zero messages due
to even higher load from a list comprehension which was not so CPU friendly.
Things around us lit up like a christmas tree. Red leds all over the place.

At this time my collegue asked the techies the customer had there:

 "Do you have a bathroom around here?"
 
and off he went. With the techies looking at me asking how things are
progressing, all I could say was

 "Hrm, tricky problem but we really had to reboot the thing. It'll be sorted in
 a minute or so" 

  
  /topi




More information about the erlang-questions mailing list