Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could gstd handle up to 1000 pipelines simultaneously? #311

Open
eirenik0 opened this issue Aug 29, 2022 · 4 comments
Open

Could gstd handle up to 1000 pipelines simultaneously? #311

eirenik0 opened this issue Aug 29, 2022 · 4 comments

Comments

@eirenik0
Copy link

eirenik0 commented Aug 29, 2022

Hey there!

During GStreamer POC project for Ephyr restreamer, I've found this wonderful project. Seems it should fit perfectly our needs in terms of functionality.

But it's not clear what about performance. How would it behave if there would be up to 1000 pipeline simultaneously?

Thanks

@eirenik0 eirenik0 changed the title Could it handle up to 1000 pipelines simultaneously? Could gstd handle up to 1000 pipelines simultaneously? Aug 29, 2022
@eirenik0
Copy link
Author

eirenik0 commented Aug 29, 2022

Also, I've added implementation of the client in Rust https://github.com/ALLATRA-IT/gst-client/

@lleon95
Copy link
Contributor

lleon95 commented Oct 19, 2022

Hi @skhalymon

Thanks for your kind words. We are glad gstd is being useful to you. Also, we would be glad to consider your Gstd Client in Rust.

Regarding your question, the main concern is how your host will behave with:

  • More than 1000K buffers circulating. It will depend on your PC BW and memory size (~11 GB for 4K in NV12)
  • The number of cores and threads. If you want to have concurrent execution, your scheduler will be overwhelmed.

Going back to gstd, Gstd does construct pipelines as a GStreamer application would. Hence, without too much interaction in the Gstd API, it will behave as GStreamer. If we involve some calls in Gstd, there will be overhead from JSON, string parsing, and the sockets.

@fischer
Copy link

fischer commented Oct 19, 2022

@skhalymon,
After writing too many streaming media servers for customers, all nearly the same, all using gobject, and all with potential memory leaks, we came up with the idea of GStreamer daemon. If you are writing a GStreamer element, use the GStreamer API, gobject, etc. If you are writing an application that uses GStreamer as a library, then it is much, much easier to use GStreamer daemon, which allows almost as much pipeline control as an integrated more traditional GStreamer application. Although there is overhead as @lleon95 mentioned above, one big advantage is GStreamer daemon is a separate process, so if something happens in a pipeline (like a poorly implemented element crashes), your controlling application continues to run as normal. For embedded devices, this can be a critical requirement, and rather hard to achieve with an application that uses the GStreamer API (since the are in the same process).

@clogwog
Copy link

clogwog commented Oct 19, 2022

One other advantage of gstd I would like to add that if you're controlling application crashes, your existing pipeline will keep running. Then when you restart your controlling app you can check what is still running and don't bother about re-starting anything that is still doing fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants