k.j.wierenga@home.nl
2004-Aug-06 14:57 UTC
[icecast-dev] why is there a timeout in _accept_connection (icecast/src/connection.c)
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. Cheers, Klaas Jan Wierenga The Netherlands -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . <p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Michael Smith
2004-Aug-06 14:57 UTC
[icecast-dev] why is there a timeout in _accept_connection (icecast/src/connection.c)
"k.j.wierenga@home.nl" <k.j.wierenga@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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Apparently Analagous Threads
- k.j.wierenga@home.nl: " why is there a timeout in _accept_connection (icecast/src/connection.c)"
- FW: Multi-Level Fallbacks
- [PATCHES] Smartjog PatchDump
- icecast performance on many concurrentlow-bitrate streams
- FW: Tip: using icecast in chroot mode may break timestamp inaccess.log