Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Introduce resource management/limits #32

@jakubsacha

Description

@jakubsacha

In order to limit resource (CPU) usage on the CI server, it would be beneficial to include a way to set up some limits.

The initial idea is to do it when we build docker-compose in the DockerComposeYamlBuilder:

        $composeConfig[$ciContainerName]['cpu_shares'] = 50;
        $composeConfig[$ciContainerName]['cpu_quota'] = '...';
        $composeConfig[$ciContainerName]['cpu_period'] = '...';

To consider:

  • CPU quota depends on the CI server configuration (it's actually depending even on the node that the given job is executed). We should find a way to make intelligent.
  • there is the nice description here:
    https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt
    what we could do is to detect a number of CPU cores on the given machine and then limit cpu_quota to - let's say 95% of the CPU.
  • we could also make it very static and allow a single job to use not more than the given percentage of the cores on the ci server.
  • if the single stage is executing multiple concurrent jobs we should probably limit them even further to avoid a situation when we burn CPU heavily and that leads to unstable CI server.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions