Liquidsoap Memory and CPU Performance: jemalloc vs. Default Allocator #4203
vitoyucepi
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
Liquidsoap can run with or without jemalloc, a memory allocator that aims to improve memory efficiency. If you have been using Liquidsoap with jemalloc and are now wondering if turning it off makes sense, I tested both setups to compare memory and CPU usage.
Setup
For this test, I utilized a Liquidsoap script that encodes MP3, OGG, and Opus audio streams from a single input source. The stream rotates through about 50 playlists, without using crossfade or compression. I ran the setup continuously for 6 days, once with the default memory allocator and once with jemalloc. I tracked:
Build config
Results
Liquidsoap with jemalloc
With jemalloc, memory usage started at 155 MB and increased to 188 MB after 6 days. CPU usage stayed around 10% on average, with small spikes during heavy tasks.
Liquidsoap without jemalloc
Without jemalloc, memory usage started at 150 MB and reached 183 MB after 6 days. CPU usage stayed around 10% on average, similar to the jemalloc version.
Conclusion
Turning off jemalloc doesn’t make a big difference in performance. Memory usage is slightly lower without it, and CPU usage is the same in both setups. Synthetic tests showed a tiny increase in CPU (0.01% to 0.1%), but it wasn’t noticeable in real use.
Beta Was this translation helpful? Give feedback.
All reactions