Replies: 3 comments 6 replies
-
Hi @adworks,
It's possible to dynamically create and destroy new stream pipelines without restart. But I would prefer to create a separate namespace for each process.
The absolute minimum for each liquidsoap instance is 200 MB of RAM. Processor usage may vary, but for me it's 4% CPU per encoder. |
Beta Was this translation helpful? Give feedback.
-
Just to follow-up on my previous questions, we finally went with a separate LS instance for each stream due to higher flexibility and easier implementation. We also realized that we can support enough streams with separate instances as we have 128GB RAM on our servers and the average RAM usage per instance is 200MB. Also, we noticed that RAM usage varies with the number of songs in the playlist - 375 songs / up to 250MB RAM, 20 songs / up to 190MB RAM (which is probably to be expected). Processor usage is around 3.5% per stream on an older Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz and somewhat surprisingly between 1.9-4.5% on a newer AMD EPYC 7313P 16-Core Processor. Maybe these figures help someone. One rookie mistake that we did was to push the metadata via http to a web backend on the same thread as the main LS script. When the web backend responded a bit late, the stream would cut out for a second and we'd see a We solved this by pushing the metadata asynchronously with
We now rarely see Thank you both for your support! Bogdan |
Beta Was this translation helpful? Give feedback.
-
Hi @toots,
I didn't know that the radio = playlist("~/Music")
def handle_metadata(m)
h = http.post(
headers=[("Content-Type", "application/json; charset=UTF-8")],
data=metadata.json.stringify(m),
"http://our.website.com/update_metadata.php"
)
if h.status_code >= 400 then
log.important("Failed to update metadata.")
end
end
radio.on_track(handle_metadata) |
Beta Was this translation helpful? Give feedback.
-
Thanks for supporting liquidsoap!
We're fairly new to liquidsoap. We are looking into developing a system that outputs multiple audio streams. The system will generate the necessary liquidsoap scripts and start them upon user request. We plan to support up to 50-100 audio streams on a single machine.
We have two options: either use
%include
to include all streams in a single script (and restart that script whenever a new stream is added or removed, restarting all the streams at once), or use separate .liq scripts and start/stop/restart each of them.How much more resource-intensive is the separate scripts option compared to the single script one? What option would you recommend?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions