Skip to content

Max concurrency in containerized environments (most CI pipelines nowadays) #4160

Closed
@breml

Description

@breml

Your feature request related to a problem? Please describe.

By default, golangci-lint uses the number of CPUs for the maximum concurrency. On bare metal environments, this is a sane thing to. But golangci-lint is also run very frequently in containerize environments (most CI pipelines nowadays) where golangci-lint does see the number of CPUs of the host and not the container CPU quota.

Describe the solution you'd like.

https://github.com/uber-go/automaxprocs does provide a solution to automatically adjust the maximum concurrency to the container CPU quota. Therefore I suggest to add this package in order to automatically adjust the max cpu to the container quota. The numbers collected by Uber show, that this overall increases the performance in containerized environments.

Describe alternatives you've considered.

none

Additional context.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions