Skip to content

Optimize run scheduling algorithm for improved CI/CD efficiency #418

@carlfranz

Description

@carlfranz

What would you like to be added:

A more efficient scheduling algorithm for executing runs of Agola.

Why is this needed:

Currently, the runs in Agola are scheduled to be sent to the run-service and executed in the order of arrival. This leads to potential bottlenecks where a project requesting multiple runs can cause significant delays for other projects, even if they have shorter build times.

For example, if Project A takes 10 minutes to build and triggers 3 runs a1, a2, a3 in succession, and Project B takes only 1 minute to build but triggers a single run b1, the execution order is a1, a2, a3, b1. As a result, Project B has to wait for an excessive 30 minutes before being built.

We propose the implementation of a more intelligent scheduling algorithm that optimizes the execution order of runs based on their source and estimated build times. In the given scenario, a more efficient order would be a1, b1, a2, a3, which reduces the wait time for Project B significantly.

This enhancement would greatly improve the overall efficiency and fairness of the build execution process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions