Centova Cast's log processing uses too much CPU time

Question:

When Centova Cast processes the ShoutCast logs, the CPU load on my server spikes and causes my streams to stutter. What can be done to avoid this?

Answer:

By default, Centova Cast attempts to process your logs as quickly as possible, using as much CPU time as is available. On most modern servers which are not excessively loaded, this will have no noticeable impact on your streams.

If your server is slower and/or overloaded, however, you may wish to reduce the speed of Centova Cast's log processing. To activate this feature, add the following to /usr/local/centovacast/etc/centovacast.conf:

LOG_SLEEP_INTERVAL=500000
LOG_SLEEP_DURATION=100000

Then, customize the two values to suit your needs. The LOG_SLEEP_INTERVAL value indicates how often to pause while processing the logs (i.e., a value of 1000 indicates that Centova Cast should pause after every 1000 lines of log data). The LOG_SLEEP_DURATION value indicates how long Centova Cast should sleep for, in milliseconds.

Please keep in mind the size of your streams' log files when tuning these values; if you set them too high, your log processing job may take an exceedingly long time to complete.