PoC: Transcoder - Close idle connections when peak capacity reached
This obsoletes livepeer_bench program. Instead of static number of sessions we will use adaptive resource logic.
This method allows for proper resource usage in runtime. Counting 4K and 360p jobs differently.
Also allows operator to assign T (or card) preference. For example Tesla card with 3 encoder chips can be configured to accept 3times more jobs than Geforce cards on same or different machine.
Transcoder is configured with max number of jobs allowed. On start T creates this number of connections to configured O.
Add capacity tracking code and monitor:
- Decoder usage
- Encoder usage
- Memory usage
Define 3 thresholds for each resource.
In runtime when threshold is reached reduce number of available connections(jobs). This effectively throttles down number of jobs landing on this T. When final threshold is reached all idle connections are closed, keeping current jobs to saturate GPU. When resources are released extra connections will be opened again.
@AlexKordic is this something we can skip for the first iteration (i.e get it working with the more primitive current system for this and then refine afterwards)?