|
|
#1 |
|
Junior Member
Join Date: Nov 2004
Posts: 11
|
freebsd or debian OS?
Hi,
i am interest to provide shoutcast hosting. The last 5 years i am admin in linux-freebsd servers. I have setup shoutcast in 2 test servers. One with debian and one with freebsd. Both servers have the same hardware specs (celeron 2.2G). I have see that the freebsd use about 4-5% of cpu per soutcast server. This is for 0 listeners. (until 3 listeners it is the same). in debian use 0-0.1% of cpu. Can everyone inform me if this is normal? So it is better to use debian? Why the freebsd use so mere CPU? Can (some admins) someone inform me if it is more stable in freebsd or in debian? Thanks for the answers Christos |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Nov 2004
Posts: 11
|
So? any help?
There no freebsd admins here? |
|
|
|
|
|
#3 |
|
Forum King
|
Dunno which is more stable - never had a problem with running SC on FreeBSD. The only thing I can look at for guidance is the BSD strain of Linux was recently rated as one of the most secure OS's on the planet and that's good enough for me to stick with it.
1001. FM - Megarock Radio - St. Louis Since 1998! Tune In Now! Corporate Radio Sucks! No suits, all rock! |
|
|
|
|
|
#4 | |
|
Junior Member
Join Date: Nov 2004
Posts: 11
|
Quote:
I know how i can secure debian so this is not a prob. I have see that every sc server in freebsd use 3-4% of cpu (even and with 1 listener). This happen and in your server? I use freebsd 4.10 in a celeron 2.2G box. In linux i see cpu usage 0-0.10% per sc. Can you please give me more info about this? Thanks, Regards, Christos |
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Feb 2004
Posts: 31
|
linux/freebsd cpu usage difference
It seems they did something wrong while porting it to FreeBSD.
I tried linux binary on FreeBSD-5(old, debug code enabled version, not upgraded to -stable yet). ad.conf and test.conf is identical except listening port and PublicServer. also theres only 1 user listening, since ad.conf is relay-relay(not for listener)code: sc_serv_linux appearing 6 times is normal(thread) I think I'm gonna switch my relays to linux binary.. ![]() (of course after stability testing.. but i used to run rather complex applications with linux emulation, so i dont expect trouble..) btw, above ps result is taken from Athlon 700Mhz, my main relay on Cel950(FreeBSD5) use 5~6% at 50~90/250 user(with 128Kbps) and 3~4% at 0~5/200 24Kbps. |
|
|
|
|
|
#6 |
|
Junior Member
|
freebsd5 is more robust to handle a large number of connections.
so, it may look faster in linux when the server is idle, but when you'll get 5000 or even 500 connections, it will be the other way around. |
|
|
|
|
|
#7 | |
|
Junior Member
Join Date: Feb 2004
Posts: 31
|
Quote:
Generally, its on par. (it still works little better in heavy load tho..) And you don't seem to know what you talking about. 5000 listener * 24Kbps = over 100Mbps, 5000 listener * 128Kbps = 650+Mbps including overhead. You can achieve 650Mbps on Gig-E without lots of trouble these days when you transfer big files OR testing network performance. but without good(expensive) equipments, you are NOT going to get 650Mbps with lots of small pipes(5000 listeners). anyway.. back to topic, I switched my main relay to shoutcast-1-9-4-linux-glibc6 on FreeBSD5 with linux emulation(with linux_base-8-8.0_4).. lets see how it does with some listeners. Last edited by paz21; 15th November 2004 at 10:20. |
|
|
|
|
|
|
#8 | |
|
Junior Member
Join Date: Nov 2004
Posts: 11
|
Quote:
I hope some small bug have make this problem. I try to find older versions of shoutcast and i post my comments. Christos |
|
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Nov 2004
Posts: 11
|
I have check the versions 1.8.9 & 1.9.2
Both have the same problem in freebsd. Can some freebsd admins explain this? I have read that the developers recomended freebsd mre from linux. So how can explained this big cpu usage? Christos |
|
|
|
|
|
#10 | |
|
Junior Member
Join Date: Feb 2004
Posts: 31
|
Quote:
otherwise you'd get same result from emulated linux binary... since linux emulator is just wrapper of system calls. btw, using linux binary, its using around 2.98~3.5% cpu on Cel950 with 80~90 concurrent user. with freebsd binary, it was 5~6% at about 60 user and 3~4% with idling server. |
|
|
|
|
|
|
#11 | |
|
Junior Member
Join Date: Nov 2004
Posts: 11
|
Quote:
Christos |
|
|
|
|
|
|
#12 |
|
Junior Member
Join Date: Nov 2004
Posts: 11
|
ok finally i have find the problem.
i have a custom kernel with the option: HZ=1000 (for better handle big load and ddos). This have make the sc server to use big cpu. I have recompile the kernel without the option HZ=1000 (so use the default HZ=100) and now the freebsd binary runing with CPU usage 0-0.10% (same as linux binary). So the problems is only if you use custom kernel with the HZ=1000 option (maybe with any HZ not 100). I have test this with freebsd 4.9 and 4.10 I test and with 5.2.1 and 5.3 and i post my results (i hope it is the same). Also can some of the users who use linux binary in freebsd change this in the kernel conf and post the results? Regards, Christos Pelekis BSD admin |
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Feb 2004
Posts: 31
|
hmm, HZ=1000 shouldnt have that much overhead on 2.2G cpu.
also don't lower HZ if you doing traffic shaping with FreeBSD. it can have undesirable effects. I'd rather go with different Sleep value(in sc_serv.conf) OR use linux binary. /me can't understand why it eats alot more cpu with higher granularity when its default polling interval is 833ms |
|
|
|
|
|
#14 |
|
Major Dude
Join Date: Sep 2004
Posts: 754
|
and he told to be admin.... lol
|
|
|
|
|
|
#15 |
|
Forum King
|
Right now I have the server loaded and pushing out a full 10 Mbps:
0.9 ./sc_serv sc_serv.conf Less than 1 % of the CPU and that's fully in use. The server is a 1.7 g Celeron with 512 Mb RAM at 64k. 1001. FM - Megarock Radio - St. Louis Since 1998! Tune In Now! Corporate Radio Sucks! No suits, all rock! |
|
|
|
|
|
#16 | |
|
Junior Member
Join Date: Nov 2004
Posts: 11
|
Quote:
|
|
|
|
|
|
|
#17 |
|
Major Dude
Join Date: Sep 2004
Posts: 754
|
...
|
|
|
|
|
|
#18 | |
|
Junior Member
Join Date: Nov 2004
Posts: 11
|
Quote:
The only answers i receive is "use linux binary" or "in high usage it is BSD better". After some checks i have find that this problem happen only if you change the HZ in kernel config. This happen at least in freebsd 4.X (tested with 4.9 and 4.10). also the same problem have and older releases of shoutcast. I have make a search in winamp forum but i not have see any other post about this solution. Please if you have any other post about HZ correct me. Also i not understand why the real admins canot find this problem. and a admin who just begin with shoutcast have find this within some hours. Regards, Christos P.S. I know, my English is bad. Sorry for this. |
|
|
|
|
|
|
#19 |
|
Major Dude
Join Date: Sep 2004
Posts: 754
|
Congrates Christos. You did what was expected from a real admin (except post your troubles, lol
)
|
|
|
|
|
|
#20 |
|
Major Dude
Join Date: Mar 2002
Location: g
Posts: 1,603
|
I've had issues running shoutcast on the 2.6 kernel (fedora core 2). Lots of idle CPU usage similar to the freeBSD issue mentioned here.
BB 192k Mp3 HIGH DEFINITION | BB 24k Mp3 | BB 20k WMA | BB Community __________________________ My Host - Fast-Serv.com | Free Shoutcast Hosting - Coming Soon... |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|