[Icecast] Use of TCP_CORK instead of TCP_NODELAY

Klaas Jan Wierenga k.j.wierenga at home.nl
Thu Dec 29 20:25:55 UTC 2005

> This is exactly why it was implemented, a few people complained about
> the overhead with large numbers of listeners, not only because of the
> TCP overhead but also the fact that it reduces the write syscall
> overhead. Will TCP_CORK (linux) and TCP_NOPUSH (BSD) give noticable
> benefits wrt icecast? It might prove helpful if available but more info
> is needed.

As Christopher Baus points out in his article
http://www.baus.net/on-tcp_cork it is not so much the overhead of a few
write calls that affects performance, but the overhead in sending more
smaller packets. In my case sending small packets resulted in a lot of
interrupts (one or two for each packet sent) for many listeners listening to
low bitrate streams. This resulted in jerky playback because the machine
simply couldn't keep up. With icecast 2.3.0 the interrupt rate at the same
level of listeners has been reduced by more than 50%.

The question that still remains for me is why some clients would have a
problem with a lower packet rate of packets filled to the brim as opposed to
more packets that are partially filled (with the TCP/IP PSH flag set).

In our application it is extremely important to use the low bandwidth
available as efficient as possible to prevent buffer underflow and
connection stall.


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.9/216 - Release Date: 29-12-2005

More information about the Icecast mailing list