<div dir="ltr"><div><div><div><div><div><div><div><div>Are you making a copy for each connected viewer? <br></div>The system I worked on just over a year ago could stream around 400 streams but never was it 400 of 1 stream, it was 5 or 10 of 100-200 sources. <br></div>Even then I used a buffer pool and a shared pointer so when the last unicast client was sent the packet, it returned itself to the pool.<br><br></div>Another thing was my architecture, which may be important. I was RTSP in from many sources and serving thru my own http protocol basterdization. In this I ran "Processors" of a settable number of sources. Each Processor was it's own usage environment and ran in a thread. This allowed the OS to parallelize the I/O to the buffers to the ethernet interface.  IF the event Queue design, whichdoes have  the best overall thruoughput, gets too deep, (spread across 2 many sources) then latency can go up and slow overall thruput to multiple clients.<br><br></div>I was able to get to the limit of the gigibit network.<br></div>I usually ran from 10 to 64 sources per "processor" <br></div>  If the cameras had small frames like D1 it was better to run 64 per processor. (FD_SET on windows is slower beyond 64 sockets)<br></div>  If they were high resolution cameras and had big nal frames, it was faster to break it into 6 processors of 10 and let the OS utilize the cores.<br></div>    (Threads tend to stay on a single core)  <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 26, 2014 at 4:40 PM, Pete Pulliam <span dir="ltr"><<a href="mailto:ppulliam@llnw.com" target="_blank">ppulliam@llnw.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large">I have an implementation of an rtsp proxy server based on the live555ProxyServer that ships with the live555 source.  When connecting only a couple of viewers to a single proxied stream, things look great.   I'm hoping to get a few hundred viewers per stream though.  What I'm seeing is that there is a large drop off in quality and kbps as I add more viewers.  I see this drop off both with the custom proxy I've written and the stock proxy that ships with the source.</div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large"><br></div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large">While this is happening, the CPU and memory are only lightly used, and the NIC is not that busy.</div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large"><br></div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large">I'm trying to use this to shield a transcoder that provides an RTSP origin (as well as several other formats).  When I run the same test directly against the origin I don't see a drop off in quality like this for viewers less than 50 (and haven't tested that for more than 50 viewers).  Hitting the origin directly looks great.</div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large"><br></div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large">Is there perhaps something I should have tuned in the proxy, or could tune with the Linux box this is running on that is causing this drop off?  Advice wanted to improve the scaling of single stream => many viewer.</div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large"><br></div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large">The kbps drop off looks like:</div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large"><div class="gmail_default" style="color:rgb(51,51,51);line-height:20px;display:inline"># ​</div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">of clients</span><div class="gmail_default" style="color:rgb(51,51,51);line-height:20px;display:inline">​ , ​</div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"> bitrate (kbps)</span></div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">2 977.688820</span><br></div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">3 976.666311</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">4 936.494160</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">5 940.096328</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">6 944.486316</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">7 955.723431</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">8 945.044076</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">9 944.803396</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">10 930.465372</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">11 925.247045</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">12 931.066158</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">13 713.205068</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">14 486.331708</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">15 492.473134</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">16 485.362249</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">17 483.711453</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">18 490.636454</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">19 485.919289</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">20 487.862608</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">21 489.587224 </span><br><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large">  </div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large">Pete</div><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large"><br></div>
</div>

<br>
<div><font>The information in this message may be confidential.  It is intended solely for</font></div><div><font>the addressee(s).  If you are not the intended recipient, any disclosure,</font></div><div><font>copying or distribution of the message, or any action or omission taken by you</font></div><div><font>in reliance on it, is prohibited and may be unlawful.  Please immediately</font></div><div><font>contact the sender if you have received this message in error.</font></div><div style="font-size:1.3em"><br></div><br>_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></blockquote></div><br></div>