To implement pjsip to support 200 simultaneous calls

AV
Arie Velthoen
Mon, Sep 19, 2011 7:21 AM

Hi Varun,

I checked audio with hard-phones listening to continuous tones generated by my PJSIP-app,
checking that the tones were really continuous and contained no interruptions.

As mentioned I had to undo ticket #1015 'Disable ioqueue Completion Port backend' because it took a lot of performance.
Undoing this reduced load with factor of ca. 20 (twenty!).
(See http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2010-June/011104.html)

Other things I changed (Windows platform) were:

  • raising the priority with "SetPriorityClass( GetCurrentProcess(), HIGH_PRIORITY_CLASS);"  and
  • setting high timer resolution, i.e. setting to 1 msec resolution to prevent transmission jitter,

UINT set_high_timer_resolution()
{
const UINT one_msec = 1;
TIMECAPS  lv_tc;
UINT      lv_timer_resolution = 0;
UINT      lv_result = 0;

if (timeGetDevCaps(&lv_tc, sizeof(TIMECAPS)) == TIMERR_NOERROR)
{
    lv_timer_resolution = max( lv_tc.wPeriodMin, one_msec );
    if ( timeBeginPeriod(lv_timer_resolution) == TIMERR_NOERROR )
        {
            lv_result = lv_timer_resolution;
        }
}
if ( lv_result == 0)
{
    DF_EVENT1("Cannot set timer resolution" );
}
return lv_result;

}

See MSDN for more info.

Regards,

Arie

Date: Fri, 16 Sep 2011 23:26:32 +0530
From: varunps2003@gmail.com
To: pjsip@lists.pjsip.org
Subject: Re: [pjsip] To implement pjsip to support 200 simultaneous calls

Hi Arie,

Thanks for your reply.

But don't you think when you had 500 simultaneous calls and 500 RTP streams then your call qualities were bad. In my case if I use the same conference bridge for all calls the quality goes bad after 20 simultaneous calls. Is there any trick or settings you are using. Or have you done some changes at code level to achieve this. Can you share this information.

Thanks in advance.

Regards:
Varun

On Fri, Sep 16, 2011 at 6:32 PM, Arie Velthoen arie_velthoen@hotmail.com wrote:

Hi,

My experience is that one can use PJSUA-lib with more than 500 simultaneous calls, and 500 bothway RTP channels when using conferences with 8kHz sampling, PCMA or PCMU codec, and no echo cancelling.
I used a Win2003 server on a Xeon5130 machine (pretty old now).

I also had to undo ticket #1015 Disable ioqueue Completion Port backend
See http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2010-June/011104.html

Regards,

Arie

Date: Fri, 16 Sep 2011 18:00:23 +0530
From: varunps2003@gmail.com
To: pjsip@lists.pjsip.org
Subject: Re: [pjsip] To implement pjsip to support 200 simultaneous calls

HI Shayne,

Thanks for your reply. But I don't think PJSIP is not suitable as any
other Library.

See first I don't want to serve thousands of calls but only 200 calls.
Second point is that PJSUA-LIB has only the limitation that it creates
only one conference bridge for all calls and media. But the low level
PJSIP libraries like PJSIP-UA and PJMEDIA don't limits anything. If we
can execute a proper application design on the basic PJSIP libraries
or modify the PJSUA-LIB to serve 200 calls we can do it. This is I
think.

But I really wanted to know that have somebody already tried this. If
yes then what was his approach. Can any body share some work or some
idea which can be useful.

Your help is appreciated. Thanks in advance.

Regards:
Varun Pratap Singh

On 9/16/11, Shayne O'Neill shayne.oneill@gmail.com wrote:

If your planning on serving thousands of calls your probably better off
looking at something like Opensips with a dedicated media proxy array.
pjsips can handle a surprising call load, but your really pushing it with
that sort of volume in a monolithic sip/rtp stack.

On 15/09/2011, at 10:15 PM, varun pratapsingh wrote:

HI All,

I need to implement in PJSIP so that it can support the 200 calls
simultaneously. I am following the steps given at:
http://trac.pjsip.org/repos/wiki/FAQ#high-perf
The steps told under heading: How can I configure pjsip to serve thousands
of calls?

Has anyone tried to implement such functionality in pjsip. If any body can
share his experience in this then It will be appreciated.

Regards:
Varun Pratap Singh


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Varun, I checked audio with hard-phones listening to continuous tones generated by my PJSIP-app, checking that the tones were really continuous and contained no interruptions. As mentioned I had to undo ticket #1015 'Disable ioqueue Completion Port backend' because it took a lot of performance. Undoing this reduced load with factor of ca. 20 (twenty!). (See http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2010-June/011104.html) Other things I changed (Windows platform) were: - raising the priority with "SetPriorityClass( GetCurrentProcess(), HIGH_PRIORITY_CLASS);" and - setting high timer resolution, i.e. setting to 1 msec resolution to prevent transmission jitter, UINT set_high_timer_resolution() { const UINT one_msec = 1; TIMECAPS lv_tc; UINT lv_timer_resolution = 0; UINT lv_result = 0; if (timeGetDevCaps(&lv_tc, sizeof(TIMECAPS)) == TIMERR_NOERROR) { lv_timer_resolution = max( lv_tc.wPeriodMin, one_msec ); if ( timeBeginPeriod(lv_timer_resolution) == TIMERR_NOERROR ) { lv_result = lv_timer_resolution; } } if ( lv_result == 0) { DF_EVENT1("Cannot set timer resolution" ); } return lv_result; } See MSDN for more info. Regards, Arie Date: Fri, 16 Sep 2011 23:26:32 +0530 From: varunps2003@gmail.com To: pjsip@lists.pjsip.org Subject: Re: [pjsip] To implement pjsip to support 200 simultaneous calls Hi Arie, Thanks for your reply. But don't you think when you had 500 simultaneous calls and 500 RTP streams then your call qualities were bad. In my case if I use the same conference bridge for all calls the quality goes bad after 20 simultaneous calls. Is there any trick or settings you are using. Or have you done some changes at code level to achieve this. Can you share this information. Thanks in advance. Regards: Varun On Fri, Sep 16, 2011 at 6:32 PM, Arie Velthoen <arie_velthoen@hotmail.com> wrote: Hi, My experience is that one can use PJSUA-lib with more than 500 simultaneous calls, and 500 bothway RTP channels when using conferences with 8kHz sampling, PCMA or PCMU codec, and no echo cancelling. I used a Win2003 server on a Xeon5130 machine (pretty old now). I also had to undo ticket #1015 Disable ioqueue Completion Port backend See http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2010-June/011104.html Regards, Arie > Date: Fri, 16 Sep 2011 18:00:23 +0530 > From: varunps2003@gmail.com > To: pjsip@lists.pjsip.org > Subject: Re: [pjsip] To implement pjsip to support 200 simultaneous calls > > HI Shayne, > > Thanks for your reply. But I don't think PJSIP is not suitable as any > other Library. > > See first I don't want to serve thousands of calls but only 200 calls. > Second point is that PJSUA-LIB has only the limitation that it creates > only one conference bridge for all calls and media. But the low level > PJSIP libraries like PJSIP-UA and PJMEDIA don't limits anything. If we > can execute a proper application design on the basic PJSIP libraries > or modify the PJSUA-LIB to serve 200 calls we can do it. This is I > think. > > But I really wanted to know that have somebody already tried this. If > yes then what was his approach. Can any body share some work or some > idea which can be useful. > > Your help is appreciated. Thanks in advance. > > > Regards: > Varun Pratap Singh > > On 9/16/11, Shayne O'Neill <shayne.oneill@gmail.com> wrote: > > > > If your planning on serving thousands of calls your probably better off > > looking at something like Opensips with a dedicated media proxy array. > > pjsips can handle a surprising call load, but your really pushing it with > > that sort of volume in a monolithic sip/rtp stack. > > > > On 15/09/2011, at 10:15 PM, varun pratapsingh wrote: > > > >> > >> HI All, > >> > >> I need to implement in PJSIP so that it can support the 200 calls > >> simultaneously. I am following the steps given at: > >> http://trac.pjsip.org/repos/wiki/FAQ#high-perf > >> The steps told under heading: How can I configure pjsip to serve thousands > >> of calls? > >> > >> Has anyone tried to implement such functionality in pjsip. If any body can > >> share his experience in this then It will be appreciated. > >> > >> > >> Regards: > >> Varun Pratap Singh > >> > >> > >> > >> _______________________________________________ > >> Visit our blog: http://blog.pjsip.org > >> > >> pjsip mailing list > >> pjsip@lists.pjsip.org > >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org