| View previous topic :: View next topic |
| Author |
Message |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Sat Mar 20, 2010 2:21 am Post subject: What are the slow listeners? |
|
|
Hello all and especially Karl,
One question and one sub-question:
a) What are the slow listeners? I've seen them on my stats and usually the number is 3 times up, than the actual! for example if I have 100 listeners live the slow listeners number is up to 350!
b) Is it something on icecast that I must fix? And if yes, can you please tell me exactly and what?
thank youuuuuuuuuuuuuuuuuuuuuu
Sonia _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sat Mar 20, 2010 2:49 am Post subject: |
|
|
It is the count of listeners that have been dropped by icecast because the stream has not been able to be sent to a listener in time. Like sending a 128k stream down a 56k dialup line. Eventually the data to be sent will back up so much that it exceeds queue-size and then icecast drops them, increasing the slow listeners count in the process.
The count accumulates while the stream is active so don't expect there to be a direct link to listeners. The only settings that would affect this is queue size and burst size. If the queue can be at most 200k and you burst 180k then there isn't much tolerance for temporary glitches. If the stream is an on-demand relay and the source of the relay bursts a large number then that could also push the listener off the queue, think icecast queue of 512k relaying a stream that bursts 1Meg
The only other thing that could cause stalling is network errors or congestion so any problems may not actually be under your control but it is not unknown for icecast to be used for accidental network testing
karl. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Sat Mar 20, 2010 3:00 am Post subject: |
|
|
thank you so much for all. understood perfectly.
soooo according to what you said, no need to change anything from the following,e?
<limits>
<clients>100000</clients>
<sources>2</sources>
<threadpool>25</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-on-connect>1</burst-on-connect>
<burst-size>98304</burst-size>
</limits> _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sat Mar 20, 2010 3:49 am Post subject: |
|
|
Those look fine, 128k stream is 16kbyes/s so that would be around 30 seconds lag before they are dropped. The other possible issue is the TCP settings on the server, specifically the send buffer, if the listener is far enough away and the send buffer is not large enough then the connection can be throttled, but this typically only affects win32 servers.
karl. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Sat Mar 20, 2010 11:21 am Post subject: |
|
|
| karlH wrote: |
Those look fine, 128k stream is 16kbyes/s so that would be around 30 seconds lag before they are dropped. The other possible issue is the TCP settings on the server, specifically the send buffer, if the listener is far enough away and the send buffer is not large enough then the connection can be throttled, but this typically only affects win32 servers.
karl. |
aha! ok, so more probably it's up to them, because my server settings are OK.
thank you so so much Karl.
Wishing you a great day and a beautiful weekend.  _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
robertut
Joined: 31 Aug 2007 Posts: 156
|
Posted: Sat Mar 20, 2010 9:25 pm Post subject: |
|
|
| karlH wrote: |
Those look fine, 128k stream is 16kbyes/s so that would be around 30 seconds lag before they are dropped. The other possible issue is the TCP settings on the server, specifically the send buffer, if the listener is far enough away and the send buffer is not large enough then the connection can be throttled, but this typically only affects win32 servers.
karl. |
What can be done, to compensate this, on Win32? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Mar 21, 2010 2:11 am Post subject: |
|
|
In listen-socket specify <so-sndbuf>N</so-sndbuf> where N is the TCP send buffer size. From my understanding, many win32 setups only go up to may 8k or so, this may be different on various win32 versions and a global registry may be available but that isn't always the case and may not be suitable if you have other busy apps on there as well.
karl. |
|
| Back to top |
|
 |
robertut
Joined: 31 Aug 2007 Posts: 156
|
Posted: Sun Mar 21, 2010 11:40 am Post subject: |
|
|
| karlH wrote: |
| In listen-socket specify <so-sndbuf>N</so-sndbuf> where N is the TCP send buffer size. |
What value do you recommend for N? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Mar 21, 2010 2:14 pm Post subject: |
|
|
Anything above 8k obviously, but the question would depend on what you expect from the listeners connecting. 1000 listeners at 32k each would mean socket buffers of at least 32Meg of real memory (probably more because of administration overhead, could be twice).
karl. |
|
| Back to top |
|
 |
robertut
Joined: 31 Aug 2007 Posts: 156
|
Posted: Sun Mar 21, 2010 2:48 pm Post subject: |
|
|
Into which section of config file to put this <so-sndbuf>N</so-sndbuf>? How to specify:
| Code: |
<so-sndbuf>32</so-sndbuf>
<so-sndbuf>32k</so-sndbuf>
<so-sndbuf>32K</so-sndbuf> |
Which one is correct? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Mar 21, 2010 3:20 pm Post subject: |
|
|
use 32768, I haven't added a converter for size fields like this or burst/queue size. The K and M options work on bitrate fields like max-bandwidth/limit-rate and true/false yes/no 0/1 work on booleans
karl. |
|
| Back to top |
|
 |
robertut
Joined: 31 Aug 2007 Posts: 156
|
Posted: Sun Mar 21, 2010 6:13 pm Post subject: |
|
|
| Thanks, we'll see how it goes. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Tue Apr 06, 2010 5:43 pm Post subject: |
|
|
Hello Karl and everybody
sorry for ressurecting! this topic, but I want to ask you and tell me your opinion:
Finally, because I see hundreds of slow listeners every day, is it a good idea to broadcast also and a stream lower than 128k? Perhars 64k?
My connection is fine, my server has no problems, so assume that people with low bandwidth lines are trying to listen
And if yes, can it be supported from icecast from the same ip?
If yes to that also, I suppose that I must do some changes to xml, correct?
Please, you know I trust you and I need you to tell me if you agree, disagree and all the changes that I must do, if aaaaaaall the above can proceed.
thank you thank you thank you
Sonia _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Apr 06, 2010 7:18 pm Post subject: |
|
|
usually people have a few different bitrate streams so that people can choose, not only bitrate but format as well. icecast has no problem with that but you have to decide what you are comfortable with. Obviously while a lower bitrate stream should reduce the cause of "slow listeners", but playback quality is most likely lowered.
The issue raised originally was specifically with win32 and how that platform handles the sending of the stream data to the listener. At 128k, you may find that the OS is throttling the sending rate from icecast to the listener (if they are far enough away) causing a slow listener event to trigger, even though you may not of saturated your network connection. The so-sndbuf setting could help in such cases.
karl. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Tue Apr 06, 2010 11:10 pm Post subject: |
|
|
| karlH wrote: |
usually people have a few different bitrate streams so that people can choose, not only bitrate but format as well. icecast has no problem with that but you have to decide what you are comfortable with. Obviously while a lower bitrate stream should reduce the cause of "slow listeners", but playback quality is most likely lowered.
The issue raised originally was specifically with win32 and how that platform handles the sending of the stream data to the listener. At 128k, you may find that the OS is throttling the sending rate from icecast to the listener (if they are far enough away) causing a slow listener event to trigger, even though you may not of saturated your network connection. The so-sndbuf setting could help in such cases.
karl. |
with the format I have no issues at all. Anybody with anything can listen with the m3u.
I'll search the documentation regarding the bitrate, so to provide and lower, and if I find any difficulties, I'll be back!
my server is linux, so no win32 issues here.
Regarding the far away: I'm greece, the server is in the states, and personally never had problems with that. Surely I'm much more far than most of our listeners, so if it was that kind of issue, me first I would have noticed it.
The "so-sndbuf" is the one that you have written earlier?
"<so-sndbuf>32</so-sndbuf>
<so-sndbuf>32k</so-sndbuf>
<so-sndbuf>32K</so-sndbuf>"
And for my xml
"<limits>
<clients>100000</clients>
<sources>2</sources>
<threadpool>25</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-on-connect>1</burst-on-connect>
<burst-size>98304</burst-size>
</limits>" what my so-sndbuf must write and to where I must place it to my xml?
Sorry for all those questions and thank you so much for your patience.
Sonia _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
|