How to manage 100000+ Megaco contexts on a measly PC?

Inswitch Solutions - Erlang Evaluation erlang@REDACTED
Fri Aug 13 14:37:53 CEST 2004


Hi!,

PM> 2) Another solution is to reduce the memory footprint of each process
PM> mirroring each context in the Session Controller. How would I do this?
PM> Would a garbage-collection once the context is created (Megaco Add) and
PM> configured (Megaco Modify) reduce the memory footprint sufficiently to
PM> allow 100000 context processes to co-exist in 1GB of RAM?

The use of erlang:hibernate/3 function relates to memory only or are other
perfomance issues ?


thanks,
Eduardo Figoli
INSwitch Solutions


----- Original Message -----
From: "Hakan Mattsson" <hakan@REDACTED>
To: "Peter-Henry Mander" <erlang@REDACTED>
Cc: <erlang-questions@REDACTED>
Sent: Friday, August 13, 2004 8:16 AM
Subject: Re: How to manage 100000+ Megaco contexts on a measly PC?


On Fri, 13 Aug 2004, Peter-Henry Mander wrote:

PM> 2) Another solution is to reduce the memory footprint of each process
PM> mirroring each context in the Session Controller. How would I do this?
PM> Would a garbage-collection once the context is created (Megaco Add) and
PM> configured (Megaco Modify) reduce the memory footprint sufficiently to
PM> allow 100000 context processes to co-exist in 1GB of RAM?

Take a look at erlang:hibernate/3.

PM> 3) The solution I think would be far better than either the above would
PM> be to store the Context ID in a list or database after completing the
PM> Modify and squirting a burst of RTP media through the Session Controller
PM> to verify proper operation, then terminate the process and delegate to a
PM> subtraction process which would recover the Context ID at the
PM> appropriate moment and issue a Subtract to the Session Controller. All
PM> that is required for Subtract is the Context ID, which need to be sorted
PM> and stored according to subtraction order. Since the subtract rate is
PM> the same as the add rate I can use a second instance of the rate-control
PM> process that I already wrote. Since I need a FIFO to store context IDs,
PM> is there one available in OTP? I would prefer to avoid continually
PM> reversing a list of over 100000 elements!

Take a look at the queue module.

/Håkan





More information about the erlang-questions mailing list