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 

Major CPU usage with 100 listeners

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Fri Mar 30, 2007 5:15 pm    Post subject: Major CPU usage with 100 listeners Reply with quote

Hi there,

I'm having some challenges with Icecast 2.3-kh7. Everything has been working great until we just recently started hitting 100 listeners. When Icecast has < 100 listeners the CPU usage is around 1%, but with that extra listener the CPU consumption jumps up to 98%, the Icecast status page times out when trying to load, and no new listeners can connect to our streams.

I have spent hours Googling and looking through forums and I have been unable to find a solution to this problem. I would greatly appreciate any guidance or direction!

This is my limits section of icecast.xml:
<limits>
<clients>800</clients>
<sources>100</sources>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-size>65535</burst-size>
</limits>

Our individual mount points look like this:

<mount>
<mount-name>/mountname-32k.ogg</mount-name>
<password>passwordhere</password>
<max-listener-duration>21600</max-listener-duration>
<burst-size>65536</burst-size>
<hidden>0</hidden>
<no-yp>1</no-yp>
</mount>

Icecast is being run out of a chroot and is correctly logging to access.log and error.log, however there is no information shown on this within error.log.

Has anyone else encountered this behavior?
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Mar 30, 2007 7:40 pm    Post subject: Reply with quote

There isn't anything special about the 100 listener figure within icecast and it's not been a behaviour reported to me so far. Can you send me the error log up to the point the CPU spikes?

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





PostPosted: Fri Mar 30, 2007 7:47 pm    Post subject: Reply with quote

I turned my logging on to Debug mode and I found the following:

[2007-03-30 13:44:26] WARN connection/_accept_connection accept() failed with error 24: Too many open files

Any ideas?
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Mar 30, 2007 9:01 pm    Post subject: Reply with quote

If on linux, check the /proc/<pid>/fd directory. The usual per-process default limit is 1024 not anything like 100. I'm guessing the busy loop is triggered when this limit is reached but hard to say at the moment.

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





PostPosted: Mon Apr 02, 2007 6:39 pm    Post subject: Reply with quote

Hi Karl,

Thanks for the tip! I run BSD here, so the /proc stuff didn't apply, but it did point me in the right direction. It turned out to be an issue with ulimit. By adding the following line right above my script that starts icecast I was able to increase the maximum open file limit:
ulimit -n 1024

Thanks!
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Apr 02, 2007 9:00 pm    Post subject: Reply with quote

what was the limit before? I'll see if I can reproduce the same busy loop here with a system limit imposed.

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





PostPosted: Mon Apr 02, 2007 11:06 pm    Post subject: Reply with quote

-bash-3.00$ ulimit -a |grep "open files"
open files (-n) 64

In OpenBSD the default limit is 64 open files.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
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