[Freeswitch-dev] Problem with RTP auto_flush code and hot_socket
Cooper Xu
cooper.xu at mapleworks.com
Thu Aug 6 14:29:34 PDT 2009
Hi,
In our load test, we found that the new RTP auto_flush and hot_socket code
after version 1.04 seems to cause voice quality problem. We were stress
testing Freeswitch with 250 channels using codec G.711u and iLBC. The RTP
auto_flush appeared to be trigged very frequently.
Because our system is under load and socket buffer for RTP stream sometimes
accumulated a few packets before the channel can handle it. When this
happened, the RTP auto_flush and hot_socket mechanism seemed sending those
accumulated packets in a very short interval. However after this burst, the
RTP stream receiving will wait for 80-100ms before receiving and sending
another RTP packet. To find out why this can happen, We looked at the RTP
part of Freeswitch code and found that inside the RTP read, during auto RTP
flush, it will call switch_core_timer_sync() function. This will add 3 to
the timer reference count and the next switch_core_timer_next() call will
add another 1 to timer reference. This caused the next RTP receiving being
delayed 80-100ms. This 80-100ms delay for RTP receiving caused 4-5 packets
being accumulated in socket buffer again. And it will soon trigger another
auto_flush for RTP stream. As the result, we saw a lot of short burst in the
RTP stream, which caused voice quality problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20090806/24fa60cd/attachment-0001.html
More information about the FreeSWITCH-dev
mailing list