Preloading registry to avoid cpu spikes
Nirbheek Chauhan
nirbheek.chauhan at gmail.com
Tue Jun 7 08:44:46 UTC 2022
Hi Guru,
You can add this to your Dockerfile:
RUN gst-inspect-1.0
And that will ensure that the registry cache is generated and saved to
~/.cache/gstreamer-1.0/registry.x86_64.bin where ~ is /root if the user
inside docker is root.
You can set GST_REGISTRY_1_0 to control where that file is stored / read
from.
Note that saving the cache means you might have a cache invalidation
problem later, for instance if the list of devices attached to the machine
changes, you might see outdated information.
Cheers,
Nirbheek
On Tue, Jun 7, 2022 at 6:30 AM Guru Govindan via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:
> Hi There,
> I have a docker container that runs multiple pipelines sometimes upto 16
> Gstreamer pipelines concurrently.
> When the docker container starts there is a CPU spike increasing the load
> average which fails other services in that computer.
>
> On digging I see that the gst_init() and internally gst_update_registry()
> might be the reason behind it as it is updating the registries for the
> plugins.
>
> Since all the pipelines are more or less using the same plugins, I was
> wondering if I can copy the `registry.x86_64.bin` default into the docker
> container while building the image so that I can avoid this.
>
> Or is there any other way to reduce this?
> Please advise
> Thanks a lot!
> Regards,
> Guru
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220607/550df383/attachment.htm>
More information about the gstreamer-devel
mailing list