-
-
Notifications
You must be signed in to change notification settings - Fork 17.3k
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
HTTP Performance regression some release after Node.js 12.16.1 using express #4532
Comments
Thank you very much for the report. Unfortunately I do not have access to macOS Big Sur so hopefully someone who does can help debug where the problem lies. |
@dougwilson No problem, Doug! Unfortunately, I haven’t checked out this issue thoroughly on other platforms, but I suspect it also might be the case on Linux. Will try to check tomorrow, but no guarantees |
Oh, gotcha. Sorry I think I implied that it was specific to running on Big Sur. I can check out Linux as well. The key will be trying to narrow down what is causing the difference; the example about without Express is not even using the same Node.js APIs that Express would be using in the Express example. For example it does not use the progressive header API of Node.js, and it's possible that is where the difference lies. But regardless if the performance changes when changing the Node.js versions, we know it is either in some Node.js API changes or v8 runtime changes. Another approach I would take when looking into it is to determine the specific Node.js version that the perf changes with instead of just a large range. That will greatly help determine what changed as well. |
@dougwilson I completely agree with you regarding the versioning, I'll try to pinpoint the specific version ASAP. |
@dougwilson Update: I have been able to find the first version with the issue: 12.18.1 Under node.js 12.18.0:
Under node.js 12.18.1+:
|
@dougwilson I have also been able to pinpoint the performance issue to lines 35 & 36 in Express's init middleware ( |
I have done more exploration of this issue in nodejs/node#37457 , it is indeed v8 problem |
@schamberg97 Should this be closed then? |
I am not sure, as this is still an issue that will negatively impact Express users. I suppose until v8 guys fix this, this should be open, so that Express community can keep tab on the situation and be kept aware? |
I think this issue now existing still let's user find it, but I am no owner of this repo so I don't really have a say anyway :) |
Hey @schamberg97! I was taking a look at your problem and realised it's with V8 which they are working on. Hence, I am closing this issue as it's a problem with V8 and not Express.js which you already have an issue opened for here. Also, closed issues are still searchable and indexed via search engines, so won't be a problem for anyone trying to search. |
Hey there! I have noticed a bit of a weird performance regression when testing express with wrk on macOS Big Sur.
I have used the following script:
Whenever I have tested this script under node.js 12.16.1, wrk showed that express is able to serve more than ~27000 requests per second. But when I switched to the latest node.js 12 or 14, I have noticed that express is only able to serve around 13000 requests per second.
To check whether it is node.js issue, I have tried another script:
Nonetheless, I haven't managed to find any notable difference. I firmly believe it has to be some sort of node.js issue (could be related to their reworking of http to fix some major bugs, but can't find PR yet). However, since the issue doesn't show with native
http
module, I thought it'd be prudent to file it with express community first.The text was updated successfully, but these errors were encountered: