<div dir="ltr"><div>Thanks, this is quite useful info indeed.<br><br></div>Have a great weekend.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 16, 2015 at 4:55 PM, Richard Fuchs <span dir="ltr"><<a href="mailto:rfuchs@sipwise.com" target="_blank">rfuchs@sipwise.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/13/2015 05:53 PM, M S wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Q2:<br>
If so, then assuming each INVITE requires to engage RTPEngine. How can<br>
we ensure that RTPEngine would be capable to handle these 40 INVITE<br>
requests? The only relevant parameter I see in RTPEngine daemon script<br>
is "NUM_THREADS" (default value 5). What does this represent? Does this<br>
analogs to children as in Kamailio?<br>
</blockquote>
<br></span>
Correct. Kamailio uses separate processes (and shared memory) for multi tasking, while rtpengine is a true multi threaded (single process) application. Each thread can handle one request/packet simultaneously. The default value is to launch one thread per CPU core present, but this can be overridden.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Q3:<br>
How does RTPEngine manages SRTP <=> RTP translation (e.g. if one<br>
endpoint is WebRTC and other is traditional SIP)? My understanding is<br>
that RTPEngine has a kernel module (assuming kernel module is installed)<br>
which also manages this conversion besides forwarding the media packets.<br>
The Linux kernel already has encoders / decoders for nearly all<br>
encryption algorithms which are utilized by RTPEngine for doing the<br>
conversion in kernel space, right? if not then how it is done?<br>
</blockquote>
<br></span>
Also correct. The userspace part uses OpenSSL, the kernel part uses the kernel's crypto API. In theory, this should mean that any crypto hardware present is automatically used, but I've never tested this.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Q4:<br>
Continuing to Q2, If these NUM_THREADS process actual media packets (RTP<br>
or SRTP) then are these synchronous or asynchronous? I think these are<br>
asynchronous, just want to confirm (otherwise RTPEngine won't process<br>
more then e.g. 5 calls at a time).<br>
</blockquote>
<br></span>
If you mean that the threads are multiplexing all open sockets, then yes, of course they do.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So, assuming asynchronous how many<br>
packets can be queue to each thread? This would help estimating<br>
RTPEngine throughput using various codecs in calls. (e.g. assuming G.711<br>
codec we have 50pps, if each thread queue size is 1000 then each thread<br>
can process 1000/50=20 concurrent calls and whole RTPEngine would<br>
process 20x5=100 concurrent calls).<br>
</blockquote>
<br></span>
It doesn't quite work like that. The only existing queue is provided by the OS and it's only used if the incoming requests/packets can't be processed fast enough, which normally only happens when there isn't enough CPU time available and then you start having serious problems (packet jitter/latency/drops, dropped calls etc). Otherwise, during normal operation, the processing time for a single packet is much less then the pps for any given codec and so a lot more calls can be handled. The last number I've heard from a customer was 12k simultaneous calls without any noticeable performance impact (at which point they started running out of ports and couldn't increase the number any more).<br>
<br>
Cheers<br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div><br></div>