-
-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report]: A Large Config Array Uses All System Resources #2431
Comments
I wonder if this is caused by running out of cores or sharing cores across ten builds. When only nine cores of your 10-core CPU are in use it remains fast. Soon as there's not an open core it jumps significantly |
It would make sense, in the project I initially encountered it the entire computer freezes intermittently while at 100% CPU usage |
Not saying this is 100% the case, but in webpack i accidentally ran a parallel build task over module-federation-examples which issues 179 webpack builds at once. My computer froze up and was not able to even exit terminal. Blind guess is that there may need to be a "management" thread for Rust to communicate with JS bindings over. If the CPU is choked it might put some resource limits on Rust-JS transfer as JS, even with multiple processes seems to have a few global limits. Defiantly worth looking into a little deeper, because i can see a NX monorepo trying to build in parallel and we don't want to impact those common use cases. |
@beeequeue I found a workaround and I need your assistance to verify if this works. Inside class MultiCompiler {
constructor(compilers, options) {
options.parallelism = 1; And comment out line 444 if (result) {
node.result = undefined;
// stats.push(result);
} There are two problems at hand:
|
From my testing the only change that is needed is the parallelism option, I set it to Not removing the stats push still seems to work for me. |
This should be fixed by the referenced issues and PRs, feel free to reopen if this is still happening. |
From my quick testing it has not fixed it. |
Do you mind updating your repro so I can take a quick look? |
It had already been updated but I updated it to the latest version again and there's still no difference. Running it locally: Details
|
Relates to #3169 |
The workaround/fix from before still works as well |
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Bump |
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
This is related to the parallelism to the related tasks of the module graph creations. webpack's limit is |
Hi there! Is a there a known workaround for this, so some kind of limit? |
In my repro repo it seems that the issue has been resolved. |
seems we can close this issue now |
System Info
Details
At some point when using an array of configurations (7 when I first encountered it, 10 in the repro repo) the build slows to a crawl, making the build take 10x as long.
Here is how the repro repo build looks on my M1 Mac 64GB:
Reproduce link
https://github.com/BeeeQueue/repro-rspack-config-array
Reproduce Steps
pnpm install
pnpm build
The text was updated successfully, but these errors were encountered: