Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What are the slow listeners?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
sonia



Joined: 28 Dec 2008
Posts: 67
Location: Greece

PostPosted: Sat Mar 20, 2010 2:21 am    Post subject: What are the slow listeners? Reply with quote

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
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Mar 20, 2010 2:49 am    Post subject: Reply with quote

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 Smile

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sonia



Joined: 28 Dec 2008
Posts: 67
Location: Greece

PostPosted: Sat Mar 20, 2010 3:00 am    Post subject: Reply with quote

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
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Mar 20, 2010 3:49 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sonia



Joined: 28 Dec 2008
Posts: 67
Location: Greece

PostPosted: Sat Mar 20, 2010 11:21 am    Post subject: Reply with quote

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. Very Happy
_________________
www.freshwebradio.com
Back to top
View user's profile Send private message
robertut



Joined: 31 Aug 2007
Posts: 156

PostPosted: Sat Mar 20, 2010 9:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Mar 21, 2010 2:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
robertut



Joined: 31 Aug 2007
Posts: 156

PostPosted: Sun Mar 21, 2010 11:40 am    Post subject: Reply with quote

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
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Mar 21, 2010 2:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
robertut



Joined: 31 Aug 2007
Posts: 156

PostPosted: Sun Mar 21, 2010 2:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Mar 21, 2010 3:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
robertut



Joined: 31 Aug 2007
Posts: 156

PostPosted: Sun Mar 21, 2010 6:13 pm    Post subject: Reply with quote

Thanks, we'll see how it goes.
Back to top
View user's profile Send private message
sonia



Joined: 28 Dec 2008
Posts: 67
Location: Greece

PostPosted: Tue Apr 06, 2010 5:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Apr 06, 2010 7:18 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sonia



Joined: 28 Dec 2008
Posts: 67
Location: Greece

PostPosted: Tue Apr 06, 2010 11:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber