Throttling a process

Francesco Cesarini francesco@REDACTED
Wed Mar 19 13:02:10 CET 2003


Hi Vlad,

you could use instrument.erl I have never used it myself, so I am 
unaware over pitfalls/performance, but it appears to do the monitoring 
job. And if you want to get nasty, you have the bifs suspend and resume 
to start and stop your processes. If you use them, just make sure I do 
not get sent to Gothenburg to review your code ;-)

Francesco
--
http://www.erlang-consulting.com

Vlad Dumitrescu (EAW) wrote:

>Hi,
>
>I need to be able to throttle down a process, if the node is very busy with more important things. What I thought I could do is check erlang:statistics() and also follow a few well-chosen processes with erlang:process_info(). This information will then be used to set longer sleep intervals for my process, or to simply make it wait until load goes down.
>
>Is this the way to do it? I noticed that process_info has a warning "to noly be used when debugging" - is that a soft warning, or a hard one? :-)
>
>Thanks in advance. Regards,
>Vlad
>
>
>  
>





More information about the erlang-questions mailing list