<div dir="ltr">
<div>Hi,</div><div>This is a query related to CPU utilization and any 
optimization can be done to reduce the CPU utilization.i've a media 
server that connects to web app applications running in the browser  . 
The media server uses webrtc bin plugin .</div><div>I use a single 
socket to transmit and receive audio/video .  I've attached the png 
files extracted from the Dot file. Below is configuration details of the
 server used</div><div><br></div><div>Num of CPU cores: 8</div><div>Model: Intel(R) Xeon(R) CPU  X5650  @ 2.67GHz</div><div>Audio codec: opus <br></div><div>video codec : VP8 <br></div><div>video encoding by clients: 640 x480 @ ~ 500 kbps</div><div><br></div><div>The
 server does not decode or encode the RTP but just forward from one 
client to another. When I execute the top command, I find that the cpu %
 is around 14 to 16 % just for 2 clients . The cpu utilization goes up 
higher and higher as the number of clients connected to the server 
increases. For 8 participants it goes beyond 400% , distributed among 
the cores. output of the top command <br></div><div><br></div>2329570 root     -11   0 4074924  73708  18920 S   2.0   1.3   0:01.80 queue1:src<br>2331060 root     -11   0 4074924  73708  18920 S   1.7   1.3   0:01.45 nicesrc1:src<br>2329568 root     -11   0 4074924  73708  18920 S   1.3   1.3   0:05.39 nicesrc0:src<br>2329569 root     -11   0 4074924  73708  18920 S   1.3   1.3   0:04.39 queue0:src<br>2331061 root     -11   0 4074924  73708  18920 S   1.3   1.3   0:01.38 queue2:src<br>2331062 root     -11   0 4074924  73708  18920 S   1.0   1.3   0:01.41 queue3:src<br>2329567 root     -11   0 4074924  73708  18920 S   0.7   1.3   0:01.64 rtpsession-rtcp<br>2329583 root     -11   0 4074924  73708  18920 S   0.7   1.3   0:00.94 rtpjitterbuffer<br>2331058 root     -11   0 4074924  73708  18920 S   0.7   1.3   0:00.39 appsrc_Audio_36<br>2331059 root     -11   0 4074924  73708  18920 S   0.7   1.3   0:00.64 rtpsession-rtcp<br>2331079 root     -11   0 4074924  73708  18920 S   0.7   1.3   0:00.42 rtpjitterbuffer<br>2331080 root     -11   0 4074924  73708  18920 S   0.7   1.3   0:00.38 rtpjitterbuffer<br>2329580 root     -11   0 4074924  73708  18920 S   0.3   1.3   0:00.08 timer<br>2329582 root     -11   0 4074924  73708  18920 S   0.3   1.3   0:01.42 rtpjitterbuffer<br>2329584 root     -11   0 4074924  73708  18920 S   0.3   1.3   0:00.51 rtpjitterbuffer<br>2331070 root     -11   0 4074924  73708  18920 S   0.3   1.3   0:00.40 appsrc_Audio_13<br><div>2331084 root     -11   0 4074924  73708  18920 S   0.3   1.3   0:00.20 rtpjitterbuffer</div><div><br></div><div>From
 the above, I see that nicesrc plugin takes around 2 % of cpu of one 
client  I think this plugin receives packets and puts them to queue. 
Should this thread take 2 % cpu to receive RTP packets from socket and 
put them to queue ?</div><div>other elements like nicesink, rtpjitterbuffer ,appsrc thread consume CPU. Features like do-nack and TWCC are enabled for video <br></div><div><br></div><div>1.
 Is there any benchmark of CPU utilization that the webrtcbin plugin 
should take for a 2 way TX and RX of audio,video RTP packets @ 500 kbps 
?  <br></div><div>2. ARe there any element property config changes that need to be done to reduce CPU utilization ?</div><div>3. How to proceed to reduce cpu utilization ? 
Any suggestions that help me  in figuring out are welcome</div><div><br></div><div> </div><div>Thanks <br></div><font color="#888888"><div>Pradeep</div></font>

</div>