[Icecast] Use of TCP_CORK instead of TCP_NODELAY
Karl Heyes
karl at xiph.org
Wed Dec 28 21:08:33 UTC 2005
Klaas Jan Wierenga wrote:
> Hi Henri and others,
>
> Very interesting post about TCP_CORK. I would be very interested in having
> it applied in the next version of Icecast.
I'd be more interested in some figures to show there being a benefit,
most examples talk about HTTP servers with short lived connections where
sendfile(2) is used.
> For low-bitrate streams the problem originates in the fact that the stream
> source often produces many small packets (they should be using TCP_CORK
> too!), which were passed on unchanged by icecast to each client (again as
> small write() calls on each socket). This problem had been reduced a lot in
> Icecast 2.3.0 as can be read from the release notes of 2.3.0:
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 far as I can see this fix has been applied only for the mp3 format. I
> guess the problem still remains for other formats, correct me if I am wrong.
It applies to all passthrough streams (ie mp3, aac*, nsv), Ogg is
different as it has pages which are generally not really small.
karl
More information about the Icecast
mailing list