Skip to content
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]: Rspack's Rust worker scheduling is uneven #9424

Open
zhouxinyong opened this issue Feb 21, 2025 · 1 comment
Open

[Bug]: Rspack's Rust worker scheduling is uneven #9424

zhouxinyong opened this issue Feb 21, 2025 · 1 comment
Labels
pending triage The issue/PR is currently untouched.

Comments

@zhouxinyong
Copy link

System Info

System:
OS: macOS 14.6.1
CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Memory: 2.97 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.18.1 - ~/.nvm/versions/node/v20.18.1/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v20.18.1/bin/yarn
npm: 10.8.2 - ~/.nvm/versions/node/v20.18.1/bin/npm
Browsers:
Chrome: 133.0.6943.99
Firefox: 124.0.2
Safari: 18.3

rspack v1.25

Details

Image

From the above chart, it can be seen that Rspack's Rust worker scheduling is uneven, and the 19 workers are not being fully utilized. Can the thread pool be optimized to improve performance?

Reproduce link

No response

Reproduce Steps

This is an internal project of our company, so I apologize but I cannot provide the repository.

@zhouxinyong zhouxinyong added the pending triage The issue/PR is currently untouched. label Feb 21, 2025
@JSerFeng
Copy link
Contributor

The worker 19 seems to start at seal phase, so you can't see it work at make phase.

If you want to see the scheduling of various processes, it is best to use tools such as samply or instruments, and preferably without a js loader. If there is a js loader, the corresponding rust thread will wait for the js execution, while the js execution will be on the main thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

2 participants