Runner concurrent assumes all jobs are roughly the same size

Could not find a matching template for generic feedback.

We are using self-hosted runners. In our CICD process, we effectively have three types of jobs (from a performance viewpoint):

  1. Fast and use minimal resources, e.g. setting up build variables used to control flow.
  2. Some memory but are CPU intensive, e.g. compilation of code.
  3. Memory and CPU intensive e.g. unit tests.

A single concurrent value to control the number of jobs being processed is not really optimal. Using the history of the job, it should be possible to create two weighted values for the job to cover CPU load and memory. Therefore the runner can set a max CPU and memory load as separate values and pickup any job that meets the available capacity. This allows for a more efficient use of resources and the number of concurrent jobs to handled to be dynamic based on load. e.g. 5 concurrent jobs might be possible when executing build variables and compiling, but only 2 jobs when running unit tests.