Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
gitlab-runner
gitlab-runner
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,039
    • Issues 2,039
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 203
    • Merge Requests 203
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • gitlab-runnergitlab-runner
  • Issues
  • #1582

Closed
Open
Opened Aug 11, 2016 by Andreas Zwinkau@qznc

Limit memory and number of cores for docker runners

I would like to write in my config.toml something like

concurrent = 4
[[runners]]
      executor = "docker"
      [runners.docker]
            core_limit = 1
            memory_limit = 2GB

Assuming the machine has at least 4 cores and 8GB RAM, I get the guarantee that jobs should not affect each other. At least not by starving others of cpu time or running out of memory.

The example above would be to docker run --memory 2g .... The core limit is slightly more difficult, because the runner has to allocate the cores and set the --cpuset-cpus parameter correctly.

This might be a duplicate of #83 (closed)? However, I believe that one is about a runner with all its concurrent jobs together. I want a limit per container/job, which is not hard with docker.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab-runner#1582