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

RemoteTranscoderManager should stick with transcoder as long as conditions are good #1712

Closed
kyriediculous opened this issue Dec 20, 2020 · 0 comments · Fixed by #1849
Closed

Comments

@kyriediculous
Copy link
Contributor

kyriediculous commented Dec 20, 2020

Is your feature request related to a problem? Please describe.
This issue pertains to running an O/T split setup with remote GPU transcoders.

Currently for each segment from an incoming stream, the RemoteTranscodeManager will pick a new transcoder each segment. This is not ideal as it will result in GPU session startup overhead each time a transcoder gets re-selected after a few segments.

Under ideal circumstances the stream is transcoded by the same remote transcoder until there's a negative outcome: error, timeout, invalid result, ... .

Describe the solution you'd like
Add a Sessions concept to the RemoteTranscoderManager. A Session keeps track of the current Transcoder to be used for each ongoing stream ManifestID.

This can be tracked in a mapping map[manifestID]*remoteTranscoder.

When a remoteTranscoder is assigned a ManifestID its load will increase by 1.
When a remoteTranscoder is removed for a ManifestID (either due to bad performance, error or the segment loop for the manifestID timing out) its load will be reduced by 1.

If there is an existing session whenever a Transcode request for a segment comes in we will use the remoteTranscoder currently in the map rather than call selectTranscoder() for each incoming request.

Other than trying to improve O/T performance. This new per-stream rather than per-segment behaviour also opens the door for more suitable selection algorithms such as latency based selection.

The selectTranscoder and completeTranscoders functions can be re-used to manage sessions instead.
The biggest change/addition would be a way for the RemoteTranscoderManager to listen for segment loop closures (or run its own cleanup loop).

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

Successfully merging a pull request may close this issue.

1 participant