[icecast-dev] why is there a timeout in _accept_connection (icecast/src/connection.c)
Michael Smith
msmith at labyrinth.net.au
Wed Feb 26 05:53:01 PST 2003
"k.j.wierenga at home.nl" <k.j.wierenga at home.nl> said:
> Hi all,
>
> I was wondering why there is a timeout (100msec) in the
> _acception_connection function (icecast/src/connection.c) where it calls
> the util_timed_wait_for_fd.
>
> To me this seems to incur unecessary load on the machine on which the
> icecast server runs, since each time the timeout expires some more user
> time is used up by the process.
>
> In my particular setup I run an icecast server 24/7, but only have a source
> (and clients) connected for a couple of hours during the week. When I leave
> the server running it continues to use processor time whereas if there was
> no timeout in _accept_connection the process would simply block until the
> next source or client connects.
>
> Is there a particular reason for having this timeout? Has it got something
> to do with the fact that icecast2 is a multi-threaded application?
>
> You answer would be very much appreciated.
>
This is primarily to allow clean shutdown to proceed normally. The CPU load is
nominal - I doubt you'd be able to measure it. However, if you want to change
this timeout, it's safe - but if you increase it beyond a few seconds,
shutdown will take an excessively long time. This won't be changed in the
standard version of icecast (though if you can give a convincing reason to
increase it slightly, I might).
Mike
--- >8 ----
List archives: http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Icecast-dev
mailing list