Hi all, my question: how is the exact formula to calculate bandwidth needed to upstream at given bitrate to a certain number of simultaneous listeners ? is it simply BANDWIDTH (bps) = BITRATE (bps) X LISTENERS ? tnx in advance, carlo. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20050714/59a0b8a5/attachment.html
On Thu, 2005-07-14 at 19:51, carlo wrote:> Hi all, > > my question: > > how is the exact formula to calculate bandwidth needed to upstream at > given bitrate to a certain number of simultaneous listeners ? > > > > is it simply BANDWIDTH (bps) = BITRATE (bps) X LISTENERS ?That is the approximate figure, the bitrate as listed via the codecs don't account for protocol overhead, and the likes of mp3 tend to under-specify the actual rate (eg 56k is like 60k really). So the above equation is really 'at least' that. Obviously variable bitrate streams make it harder to work out. karl.
I'm pretty sure that the protocol used by icecast is TCP so you also have the overhead from TCP to add, though in the end, the overhead probably isn't enough to be really noticed. -Daniel On 7/14/05, carlo <right_tack@katamail.com> wrote:> > > > Hi all, > > my question: > > how is the exact formula to calculate bandwidth needed to upstream at given > bitrate to a certain number of simultaneous listeners ? > > > > is it simply BANDWIDTH (bps) = BITRATE (bps) X LISTENERS ? > > > > tnx in advance, > > carlo. > > > _______________________________________________ > Icecast mailing list > Icecast@xiph.org > http://lists.xiph.org/mailman/listinfo/icecast > > >-- Daniel Ballenger http://denetron.com Sr. Systems Administrator - Denetron LLC
Daniel Ballenger wrote:> I'm pretty sure that the protocol used by icecast is TCP so you also > have the overhead from TCP to add, though in the end, the overhead > probably isn't enough to be really noticed. > > -DanielDo that for a few hundred connections, and the overhead can add up to something more significant. I'm basing this on a theoretical maximum of an IP packet, not counting any streaming overhead. A 56,000 bits/sec = 7,000 bytes/sec. MTU of an IP packet in most cases = 1500 bytes. With an IP header of 20 bytes and a TCP header of 20 bytes, assuming no options, that leaves 1,460 bytes for payload. 7,000 / 1,460 = 4.8 packest/sec. 4.8 pkts/sec * 40 bytes of header = 192 bytes/sec. 7,192 bytes / sec = 57,536 bits /sec. All-in-all, the IP overhead accounts for an additional 3% with a 56kbps stream. Take the overhead and multiply it by the number of simultanenous clients. In my experience, though the actual data rate is higher. I haven't done any further testing in awhile and I assume that the theoretical maximum of stuff put in each packet isn't the full 1460 bytes. -I