Skip to content

x/build: add a "small" builder with limited resources #28388

@mvdan

Description

@mvdan

Starting a new issue from #27739.

We tend to see issues building Go and running the tests if someone's machine has limited resources. For example, in #26867 I reported how go test net OOM'd with a few gigabytes of available memory.

We already have special builders like linux-amd64-noopt, so I propose adding a linux-amd64-small. Alternatively, we could add these qualities to an existing builder like linux-amd64-noopt, like @bradfitz suggested.

Some ideas to start with:

  • limiting the total memory to 4GB
  • limiting the total disk size to 10GB
  • limiting the CPU power, e.g. to dual-core 1GHz

With time, if the builder is stable, we could lower those numbers and add more restrictions, such as:

  • lowering the maximum number of open file descriptors
  • lowering the size of /tmp
  • lowering the maximum number of processes created by the user

/cc @dmitshur @bradfitz @andybons

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buildersx/build issues (builders, bots, dashboards)FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsFixThe path to resolution is known, but the work has not been done.new-builder

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions