gen_server:start - performance

Vladimir Sekissov svg@REDACTED
Tue May 24 16:45:53 CEST 2005


Good day,

nm> Hmm, after doing some measurements, I've found that
nm> spawning processes with gen_server:start and stopping
nm> them takes several times much time that with spawn.

You don't need write simple short living workers as gen_server's.

If you need OTP support for them look at _plain_fsm_ module at
Jungerl(http://jungerl.sourceforge.net/). You can convert simple
spawn+loop FSMs with it easily to obey OTP system protocols.

It seems that _proc_reg_ module could be useful too for your
application.

Best Regards,
Vladimir Sekissov

nm> Hmm, after doing some measurements, I've found that
nm> spawning processes with gen_server:start and stopping
nm> them takes several times much time that with spawn.
nm> 
nm> The only way to get around this was to leave some processes alive, 
nm> cleaning their status, but not stopping them.
nm> 
nm> I need rate of about 2500 proc/second starting for a some time range - 
nm> say bursts 10 seconds long with such spawn rate
nm> 
nm> 
nm> 
nm> 
nm> -- 
nm> Gaspar Chilingarov
nm> System Administrator
nm> 
nm> t +37491 419763
nm> w www.web.am
nm> e nm@REDACTED
nm> 



More information about the erlang-questions mailing list