[icecast] FreeBSD in general
boersma at genomica.com
Wed May 30 08:17:26 PDT 2001
On Wednesday 30 May 2001 07:59 am, you wrote:
> Hello everyone,
> I am very tempted to try and use icecast as the weapon of choice
> to realize a live audio stream for the radio station I work for.
> Now, the last time I tried the FreeBSD port of Icecast, it
> immediately consumed something like 95% CPU time, even without
> any client connected. I think someone else reported that
> problem, but I somehow lost track of the issue - has this been
I'm using icecast1.3.10 (latest cvs), liveice and lame 3.88 on a FreeBSD 4.3
box. It's only a Pentium II-233, but it keeps up with encoding a
low-bandwidth radio stream (anywhere from 16 to 64 kbits) just fine. Icecast
is trivial in terms of CPU and memory usage: from 0.8 - 2 % CPU time and
about 4MB of resident memory. I even "renice -10" it at the suggestion of
someone else on this list. Lame (or another encoder) will be by far the
biggest CPU consumer.
One of the downsides of FreeBSD is that Fraunhofer's l3enc and mp3enc
encoders are not supported on it (although you could probably run the Linux
binary in compatibility mode). So lame is really your only choice for an
encoder, as far as I can tell. Which isn't bad--the quality sounds as good
to my ear at the low bitrates we use (and often better at CD-quality); it's
just nice to have choices.
FreeBSD doesn't have any audio drivers in the default kernel, so the first
thing is to recompile the kernel, adding the proper driver (probably "pcm").
If you don't have the newer sock.c (from CVS, not in the 1.3.10.tgz
distribution), you will likely hear "looping" problems, so make sure to get
Some things that seemed to improve network performance and help crappy
players like RealAudio not rebuffer:
in src/icetypes.h, change the default values (8192 and 64) to these:
#define BUFSIZE 16384
#define CHUNKLEN 128
And in /etc/rc.local (or another script run by root), add this:
# Max out some network parameters for potential throughput improvement
/sbin/sysctl -w kern.ipc.maxsockbuf=1048576
/sbin/sysctl -w net.inet.tcp.sendspace=32768
/sbin/sysctl -w net.inet.tcp.recvspace=32768
These made an obvious difference for our tests, YMMV.
It's been rock solid and we're very happy with it, and the combo of FreeBSD +
icecast + liveice + lame + donated old hardware = good value for a
non-profit, community radio station. Plus, with the call letters KGNU, open
source just makes sense. :-)
There are several other radio stations doing this, and I've contacted many of
them to try to find their "best practices." You're in good company.
--- >8 ----
List archives: http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Icecast