Megaco simple Media Gateway bleeds memory under load.

Ulf Wiger etxuwig@REDACTED
Thu Aug 29 09:49:53 CEST 2002

On Wed, 28 Aug 2002, Hakan Mattsson wrote:

>Sorry. What I was getting at, was that it is not obvious that
>spawning new processes should be avoided by performance reasons.
>In the Megaco application one process (megaco_tcp/megaco_udp)
>reads the bytes off a socket and spawns a new process
>(megaco_messenger) with a binary as argument. The new process
>decodes the binary and creates lots of temporary data and
>eventually terminates. If the initial size of the process heap
>is set large enough (see spawn_opt), no GC is needed at all.

BTW, what "large enough" is can be determined using e.g. dbg and
tracing on garbage collections. The trace messages will show what
the new heap size is after each GC (and, of course, show whether
there is a GC at all). This may vary dependending on
the application.

Sorry, no examples of how this is done. I leave that up to
somebody else. It does pay off to study the tracing support
closely, so it's a highly useful exercise.


Ulf Wiger, Senior Specialist,
   / / /   Architecture & Design of Carrier-Class Software
  / / /    Strategic Product & System Management
 / / /     Ericsson Telecom AB, ATM Multiservice Networks

More information about the erlang-questions mailing list