[Icecast] bandwidth calculation
karl at xiph.org
Mon Jul 18 15:09:20 PDT 2005
On Mon, 2005-07-18 at 22:46, Ian A. Underwood wrote:
> Do 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 don't think the mp3 bitrate accounts for framing either, nevermind the
TCP and any shoutcast metadata overhead.
Of course the big assumption you made is that packets sizes are near the
1500 byte size. There have been reports of TCP packets of less than 100
bytes for the likes of mp3. My tests of the batching up of pass-through
data does seem to be working well for that case though.
More information about the Icecast