bevyengine / bevyengine/bevy

cargo test --workspace results in excessive memory usage

Open
#3,862 0 comments 5 reactions 0 assignees View on GitHub
A-Build-System C-Performance
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

On my machine with 24 vCPUs and 32GiB of RAM, running `cargo test --workspace` consumes all available memory and provokes the OOM killer. In particular, attempting to compile 24 examples at once seems to be too much.

This can be mitigated by passing the `-j` option to `cargo test` with a smaller number of jobs (`-j8` worked for me). The `build.jobs` config value can also control the number of jobs globally. However, the high memory usage seems to be confined to compiling examples -- I can build 24 library crates at once with no issue -- and it seems suboptimal to make all builds slower to avoid problems with examples in particular.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.