[erlang-questions] Why reductions of supervisor is heigh?

Solomon <>
Mon Sep 17 12:35:27 CEST 2012


Hi,
I generate the process like this code:

*init([])->
  Children={my_server, {my_server, start_link, []}, permanent, 5000,
worker, [my_server]},
  Processes=lists:flatten([Children]),
  Strategy={one_for_one, 100000, 1},
  {ok, {Strategy, lists:flatten(Processes)}}.*

The supervisor should append the children at the beginning.

2012/9/17 Roberto Aloi <>

> Hi,
>
> > I test web server build with OTP, and I found reductions of supervisor
> was
> > much heigher then gen_server, what was supervisor doing?
>
> What kind of supervisor are we talking about? Does it have dynamic
> children?
>
> In OTP you can have different kinds of "supervisor". Assume you use a
> "simple_one_for_one" supervisor and you add children dynamically. In
> such a case, you would perform a call (or even more than one) to the
> supervisor process every time you append a child. That would affect
> the reductions counter.
>
> Roberto Aloi
> @robertoaloi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120917/fa778ad1/attachment.html>


More information about the erlang-questions mailing list