-
Good afternoon, The problem is that no matter what settings I use for the transcoder, after about 10-12 streams, I start getting queue errors, which leads to RAM overflow, and eventually, everything crashes due to OOM (Out of Memory). I have tried setting various values for Profile, Preset, and ThreadCount, but nothing helps. What's most interesting is that the CPU is only utilized up to 20%, and I can't manage to make it use more. Please advise what I am doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
I think software decode is bound to a single thread per instance in OME. I hit this issue all the time with Thumbnail publishers and the only way to prevent OME from consuming all system memory is to use the experimental DeleteLazyStream feature. This is still not ideal because it would stop the transcode even when there is plenty of CPU available. Is there any difference if you run this against the master branch? I believe they changed the decoder to use to 2 threads in commit 9e9be09. |
Beta Was this translation helpful? Give feedback.
-
Could you please check which threads need to be distributed using top -H -p command? https://airensoft.gitbook.io/ovenmediaengine/performance-tuning#monitoring-the-usage-of-threads |
Beta Was this translation helpful? Give feedback.
@Bistiara
First, I fixed the issue with thread usage not being accurate. I also added the x264 library.
In short, OpenH264 doesn't show the exact number of threads it creates. It looks like all the encoders share the same threads. but, the H264 decoder, scaling filter, and x264 encoder seem to handle CPU thread usage well.
To use x264, use
<Codec>h264_x264</Codec>
Patches
CPU load balance test result
The patched code has not been released yet. The next version will be released soon. thanks.