[erlang-questions] Process Monitoring

Johan Montelius <>
Tue Jun 8 10:13:24 CEST 2010


I don't know the answer but since your question relates to mine in the
tread "monitor and failure detectors" I could provide my understanding of
how this. I don't think you will have a measurable difference between
monitoring each individual process on the remote card compared to
monitoring the node they are running on. Individual monitors do not send
their own heartbeats to see if  a process is alive, it is simply being
passively registered as interested when the process terminates. Locally
they have also been registered as being interested in the state of the
node. The local node then monitors the remote node using heartbeats.

For your previous questions:

1) Are we guaranteed to get the {'DOWN', MonitorRef, Type, Object, Info}
if the remote node crashes?

See my other thread, I guess that the current behavior is - yes.

2) Is there a cost in doing many erlang:monitor calls (especially over
remote nodes)?

I don't think so.

3) Would a better option (WRT node crash) to maintain a table of node id's
and interested pids on that node, and do erlang:monitor_node/2 instead?

Don't think so.


On Thu, 27 May 2010 15:48:45 +0200, Evans, Matthew <>

> Hi
> I asked this question a while ago, but no takers.
> I wish to monitor multiple processes on a remote card. Would the best  
> approach be to do erlang:monitor/2, or do erlang:monitor_node/2 and  
> write a simple (local) mechanism to alert interested parties locally?
> I guess the bigger question is: Is there any overhead of doing remote  
> erlang:monitor/2 calls? Since gen_server uses it my guess is no.
> Thanks
> Matt

Associate Professor Johan Montelius
Royal Institute of Technology - KTH
School of Information and Communication Technology - ICT

More information about the erlang-questions mailing list