Throttling a process
Vlad Dumitrescu (EAW)
Vlad.Dumitrescu@REDACTED
Wed Mar 19 13:06:41 CET 2003
No, this is for a private project, and I can't afford to send for you from England. :-) But now that you mention it, it might be possible to use the answer at work too!
Anyway, what I want is to let my process run in the background, when the load isn't too high. The VM doesn't offer this functionality (maybe it should?) but I am especially after a few processes that I don't want to disturb.
Thanks! regards,
Vlad
> -----Original Message-----
> From: Francesco Cesarini [mailto:francesco@REDACTED]
> Sent: Wednesday, March 19, 2003 1:02 PM
> To: Vlad Dumitrescu (EAW)
> Cc: Erlang-questions (E-mail)
> Subject: Re: Throttling a process
>
>
> 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