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

GPU Load Balancing #1108

Closed
9 tasks
j0sh opened this issue Oct 2, 2019 · 0 comments · Fixed by #1124
Closed
9 tasks

GPU Load Balancing #1108

j0sh opened this issue Oct 2, 2019 · 0 comments · Fixed by #1124
Labels

Comments

@j0sh
Copy link
Collaborator

j0sh commented Oct 2, 2019

The current load balancing algorithm for GPUs is a simple, stateless round robin. For each segment:

gpu = gpus[i++ % len(gpus)`

With the LPMS bottleneck fix, transcode sessions become stateful. A naive approach to maintaining "sticky" sessions is this:

if sessions[id].nil ? sessions[id] = gpus[i++ % len(gpus)]
gpu = sessions[id]

Can we do better than the naive approach? Probably.

Some challenges here are:

  • Segments for a given session may be sporadic
    • O / T may not necessarily be the “primary” for a given stream
  • Session assignment on GPUs may grow unbalanced
    • Sessions come and go, some may be long-lived, others short-lived
  • Workload varies per session
    • Different transcoding profiles have different performance characteristics, segment lengths, etc
  • Hardware capabilities not necessarily known
    • Would be nice not to manually tune / configure

Need to determine:

  • What might constitute an improved algorithm
  • How to measure / prove its efficacy
  • Success criteria for when to wrap this up

TODOs:

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

Successfully merging a pull request may close this issue.

1 participant