Skip to content

Local executors / container engines behave differently #7657

Closed

Description

@JosuaCarl

Problem

Currently, local executors are often behaving differently, despite most containerization engines aligning with Docker CLI options or supporting similar functionalities.

Example: "How are CPUs allocated ?" differs along executors:

All the following containerization engines, which are implemented as local executors, support the --cpu-shares (flexible allocation) and --cpus (fixed allocation) flags but make different use of them, which causes a confusing mix.

Docker

Docker resource constraints - documentation

Implementation (uses --cpu-shares as default, but switch via cpuLimits flag):

if( cpus && cpuLimits )
result << "--cpus ${cpus} "
else if( cpus && !legacy )
result << "--cpu-shares ${cpus * 1024} "

Apptainer & Singularity:

Singularity CPU limits - documentation
Apptainer CPU limits - documentation

Implementation (uses --cpu):

if( resourceLimits ) {
if( cpus )
result << "--cpus ${cpus} "

Podman

Podman CPU shares - documentation

Implementation (uses --cpu-shares):

if( cpus ) {
result << "--cpu-shares ${cpus * 1024} "
}

Suggested solution

Either:

  • Make a class with common options that are handled in the same way
  • or align how the behaviour of each executor independently

Activity

  1. locked and limited conversation to collaborators on Oct 7, 2026
  2. converted this issue into a discussion #7775 on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions