Skip to content

cgroups enforce test-group sizes without ability to control #26364

Open
@fzakaria

Description

@fzakaria

This is a continuation of a break-out discussion from #26062 (comment)

Relevant parts of the discussion:

I noticed cgroups now also enforce test group sizes; that was surprising to me. I kind of wanted to turn off or change the sizes as we transition to cgroups (so many of our "small" tests exceed the memory limit but could not find an easy way).
I want to still support cgroup limits but just not the test size resource limits.

  1. getLocalResourceUsage includes defaults for test sizes https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/analysis/test/TestTargetProperties.java#L206

  2. this information is passed into the Spawn via https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java#L131

  3. If the mnemonic is set, then the LinuxSandboxSpawnRunner uses the local resource usage https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedSpawnRunner.java#L317

I wanted to support the tags like resources:memory:20 but enabling this also enables the enforcement of the test sizes as per the previous bullet points.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions