Old 7th June 2013, 09:39   #1
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
How many open files will sc_serv need?

I've run into "too many open files" errors from sc_serv on Ubuntu 12.04.2 server, 2 GB ram, dual core 2 GHz opteron CPU, 50 Mb/s up&down internet connection

My machine - a virtual machine hosted at FDC - came configured with 1024 open files, that wasn't enough so I set it to 10,240 open files and THAT wasn't enough (same "too many open files" errors from sc_serv after 12 hours or so) so now I gave it 102,400 open files and I wonder will THAT be enough?


What does sc_serv need all these open files for? I've only got ~300 listeners....
milosz is offline   Reply With Quote
Old 10th June 2013, 11:51   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
depends on how many concurrent listeners you're getting as to what will work. though you're also hitting a bug with the linux build of the DNAS and how it copes with large numbers of file handles which can cause it to throw that error when it's not correct. only solution without an updated build is to run a cluster of DNAS to cope with the listener loads.
DrO is offline   Reply With Quote
Old 10th June 2013, 12:02   #3
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
I set open files to 1,024,000 and also put 2 IP's on the ban list that seemed problematic; sc_serv is running at 150% cpu utilization (using top on a dual core server will show % this way) - so CPU is working hard but server is still up and running, log has no 'too many open files' errors today.... 400 listeners peak. Max is 500.

How does one "run a cluster of DNAS to cope with the listener loads." ??? I probably need to do that.
milosz is offline   Reply With Quote
Old 10th June 2013, 12:13   #4
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Interesting; sc_serv was running at 150% cpu, 300 listeners. I shut down sc_serv and immediately restarted it; still have 300 listeners, but sc_serv is down to 9%.

There must be something going wrong here with sc_serv on this Ubuntu 12.04.2 server. sc_serv cpu% utilization seems to climb madly after about 20 hours online. I can set a cron job to stop / start it once a day but really that should not be needed if everything worked as it should.

Memory use stays stable, it's just CPU cycles that climb. And CPU stays stable for quite a while - more than 18 hours- before starting to climb.
milosz is offline   Reply With Quote
Old 10th June 2013, 12:15   #5
DrO
 
Join Date: Sep 2003
Posts: 27,873
for clustering, if you've got them listed and using a v2 DNAS, then you just need to use the same authhash for all of the stream instances. if using v1 DNAS, you have to ensure _every_ piece of information about the stream (title, genre, etc) _exactly_ matches.


as for the other part, the CPU will peak when going above ~300 listeners (and relates to http://forums.winamp.com/showthread.php?p=2790357#known) due to how the network handling was done with the current build. there were some changes started which would alleviate the high CPU usage and also the incorrect throwing of the error you're seeing with the internal builds but it hasn't been completed).

with a fixed DNAS, if 500 is the max then a ulimit -n 1024 should suffice, maybe you'd need to go to 1152 or something like that to give a bit of head room, but in most cases 1024 does what is needed for everyone.
DrO is offline   Reply With Quote
Old 10th June 2013, 22:16   #6
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Clustering:

Run multiple sc_serv on the same port 8000?

Feed multiple sc_serv on localhost from one sc_trans?
milosz is offline   Reply With Quote
Old 10th June 2013, 22:22   #7
DrO
 
Join Date: Sep 2003
Posts: 27,873
clustering is where you have multiple DNAS, either feed directly from the same source or are setup as relays of another DNAS and it is then them which are listed in the Directory under the same stationid / listing (with the Directory also telling them about the others so they'll do a basic form of load balancing for you).

it can be on the same port, but the IP has to be different in that case as you cannot run multiple instances of a program on the same IP and the same port. otherwise you could run them on the same IP but on a different port.

or rather than getting confused, you could wait a few weeks and you should then be able to get a newer DNAS build to work with and then you don't have to mess around with things...
DrO is offline   Reply With Quote
Old 10th June 2013, 23:04   #8
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
OK I see re: clustering. As you describe it, on different IPs or ports, it seems straightforward.

I think it will serve my interests best to just wait for the newer build. Is there some thread or site I should watch for an announcement of availability of the new build?

-thanks for all your help- :-)
milosz is offline   Reply With Quote
Old 10th June 2013, 23:09   #9
DrO
 
Join Date: Sep 2003
Posts: 27,873
would suggest checking via this sticky thread http://forums.winamp.com/showthread.php?t=324877 or seeing if anything appears in the discussion forum.
DrO is offline   Reply With Quote
Old 10th June 2013, 23:11   #10
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Great, thanks.
milosz is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump