Skip to content

CPU-based Dynamic Parallel Execution #259

@HaasStefan

Description

@HaasStefan

Currently, the PR #232, implementing a concurrency flag to run tasks in parallel has a fixed upper bound for tasks running in parallel. This is also how other JS-focused monorepo tools such as Nx and Turborepo are doing it, but this could be optimized based on CPU and RAM usage.

Especially large monolithic monorepos often have hundreds of small libraries with fast running targets, but a few really large app targets, which eat most of the memory and CPU. Such repos would benefit from dynamic parallelism based on memory and cpu usage, such that it can have a high level of parallelism for small tasks, and can reduce the parallelism for resource intensive targets. This maximizes parallelism without running risk of OOM issues.

Technically this could be achieved by implementing a task queue and a resource watcher that guards pulling from the queue based on resource usage.

For example see:
BuildXL Flags - MaxRamUtilizationPercentage

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions