How to manage 100000+ Megaco contexts on a measly PC?
Peter-Henry Mander
erlang@REDACTED
Fri Aug 13 13:35:18 CEST 2004
Hi Hakan and Bjorn,
The queue completes the picture. I expected that OTP team would have
anticipated the problem I've confronted and had already created a
solution. Thank you.
Pete.
On Fri, 13 Aug 2004 13:16:00 +0200 (CEST)
Hakan Mattsson <hakan@REDACTED> wrote:
> 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.
>
>
--
"The Tao of Programming
flows far away
and returns
on the wind of morning."
More information about the erlang-questions
mailing list