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

low performance problem in the RoundRobinHandle #37343

Open
yunnysunny opened this issue Feb 13, 2021 · 0 comments
Open

low performance problem in the RoundRobinHandle #37343

yunnysunny opened this issue Feb 13, 2021 · 0 comments
Labels
cluster Issues and PRs related to the cluster subsystem. performance Issues and PRs related to the performance of Node.js.

Comments

@yunnysunny
Copy link
Contributor

  • Version: 12.20.1
  • Platform: Linux VM-10-6-16-42-17-191 3.10.0-957.12.1.el7.x86_64 deps: update openssl to 1.0.1j #1 SMP Mon Apr 29 14:59:59 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: docker centos 7

What steps will reproduce the bug?

When there are many new tcp handle send to the master process, it first save it in internal array, and find a free worker process to send to. But there is a low performance problem in the RoundRobinHandle. When the array's length exceeds a certain value, the master process would busy to call shift function of array, its CPU percentage will raise up to 100%, but the children workers have low CPU usages in the other hand.

I have generated a CPU flame graph as follows:

image

@Ayase-252 Ayase-252 added performance Issues and PRs related to the performance of Node.js. cluster Issues and PRs related to the cluster subsystem. labels Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cluster Issues and PRs related to the cluster subsystem. performance Issues and PRs related to the performance of Node.js.
Projects
None yet
Development

No branches or pull requests

2 participants