René's URL Explorer Experiment


Title: High cpu usage for outbound ssl requests after upgrading from v16.15.0 to v18.1.0 · Issue #43128 · nodejs/node · GitHub

Open Graph Title: High cpu usage for outbound ssl requests after upgrading from v16.15.0 to v18.1.0 · Issue #43128 · nodejs/node

X Title: High cpu usage for outbound ssl requests after upgrading from v16.15.0 to v18.1.0 · Issue #43128 · nodejs/node

Description: Version v18.1.0 Platform Linux 5.17.4-arch1-1 #1 SMP PREEMPT Wed, 20 Apr 2022 18:29:28 +0000 x86_64 GNU/Linux Subsystem crypto What steps will reproduce the bug? I have observed this problem in few http clients: axios, got. But looks lik...

Open Graph Description: Version v18.1.0 Platform Linux 5.17.4-arch1-1 #1 SMP PREEMPT Wed, 20 Apr 2022 18:29:28 +0000 x86_64 GNU/Linux Subsystem crypto What steps will reproduce the bug? I have observed this problem in few...

X Description: Version v18.1.0 Platform Linux 5.17.4-arch1-1 #1 SMP PREEMPT Wed, 20 Apr 2022 18:29:28 +0000 x86_64 GNU/Linux Subsystem crypto What steps will reproduce the bug? I have observed this problem in few...

Opengraph URL: https://github.com/nodejs/node/issues/43128

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"High cpu usage for outbound ssl requests after upgrading from v16.15.0 to v18.1.0","articleBody":"### Version\n\nv18.1.0\n\n### Platform\n\nLinux 5.17.4-arch1-1 #1 SMP PREEMPT Wed, 20 Apr 2022 18:29:28 +0000 x86_64 GNU/Linux\n\n### Subsystem\n\ncrypto\n\n### What steps will reproduce the bug?\n\nI have observed this problem in few http clients: axios, got. But looks like a problem is in node.js itself. \r\n\r\n1. Create a basic http server which produces outbound ssl requests and returns in response result of outbound request. Here is a sample\r\n```js\r\nconst http = require(\"http\");\r\nconst https = require(\"https\");\r\n\r\nconst port = 3000;\r\n\r\nconst handler = (req, res) =\u003e {\r\n  https.get(\"https://server.local\", (response) =\u003e {\r\n    let body = \"\";\r\n\r\n    response.on('data', chunk =\u003e {\r\n      body += chunk;\r\n    });\r\n\r\n    response.on(\"end\", () =\u003e {\r\n      res.statusCode = response.statusCode;\r\n      res.setHeader('Content-Type', 'text/plain');\r\n      res.end(body);\r\n    });\r\n  });\r\n};\r\n\r\nconst server = http.createServer(handler);\r\n\r\nserver.listen(port);\r\n```\r\n2. Start to produce load to server. I'm using `hey`\r\n```\r\nhey -z 1m -c 10 -disable-keepalive \"http://client.local:3000\"\r\n```\r\n3. Observe in CPU profiler for node.js server constantly increasing cpu usage for `SecureContext.init()`. It starts from ~50% and going up to 80%. Amount of requests processed by server, which sends outbound https requests is constantly decreasing.\n\n### How often does it reproduce? Is there a required condition?\n\nAlways reproduces if present outbound ssl requests and node version 18.1.0\n\n### What is the expected behavior?\n\nConstant CPU usage, amount of processed requests is at the same level during time. In node.js v16.15.0 same code in CPU profiler have `SecureContext.init()` with usage of 5-8%. And during load there is no performance degradation.\n\n### What do you see instead?\n\nCPU usage is keeping increasing during time, `SecureContext.init()` starts from ~50% cpu time in profiler and keep growing during time to 80-85%. Amount of requests processed by server is constantly decreasing.\r\n\n\n### Additional information\n\nv18.1.0\r\nBenchmark result - 186 req/s\r\nnode --perf output - https://pastebin.com/wyHPXfMH\r\ncpu profile screenshot\r\n![cpu_profile_v18 1 0](https://user-images.githubusercontent.com/1708854/168877260-03e8c28e-3744-4f40-8869-7bec2ff1ea16.png)\r\n\r\nv16.15.0\r\nBenchmark result - 1184 req/s\r\nnode --perf output - https://pastebin.com/0L0Z01iq\r\ncpu profile screenshot\r\n![cpu_profile_v16 15 0](https://user-images.githubusercontent.com/1708854/168877342-2330d40c-2ef9-4b15-92ff-926e3d41207c.png)\r\n\r\n","author":{"url":"https://github.com/str1ke","@type":"Person","name":"str1ke"},"datePublished":"2022-05-17T17:55:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":18},"url":"https://github.com/43128/node/issues/43128"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c4e827af-1455-9e4b-2181-78bfc314b05a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC520:A06EB:1A4CB27:264ED67:6A4E5990
html-safe-nonce36dbbc58ad1d71bf99da6aae691b13aa5ac8409eb3fd1cc338cd39a9019ee207
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTIwOkEwNkVCOjFBNENCMjc6MjY0RUQ2Nzo2QTRFNTk5MCIsInZpc2l0b3JfaWQiOiI1ODA3MjQ0MDk4OTU2ODQzNDA4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacbb334a6fd14669fd39be125450d27f1d97524a0bf9945f9f8d123eacab6db566
hovercard-subject-tagissue:1238977726
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/43128/issue_layout
twitter:imagehttps://opengraph.githubassets.com/328a5ba9ad968d3f0fc7799f809e93e45f594a3717a9a8c2d098516d46811256/nodejs/node/issues/43128
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/328a5ba9ad968d3f0fc7799f809e93e45f594a3717a9a8c2d098516d46811256/nodejs/node/issues/43128
og:image:altVersion v18.1.0 Platform Linux 5.17.4-arch1-1 #1 SMP PREEMPT Wed, 20 Apr 2022 18:29:28 +0000 x86_64 GNU/Linux Subsystem crypto What steps will reproduce the bug? I have observed this problem in few...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamestr1ke
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release55abf6b50233e48592f2087d3226df604c65feb9
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/issues/43128#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F43128
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F43128
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/43128
Reloadhttps://github.com/nodejs/node/issues/43128
Reloadhttps://github.com/nodejs/node/issues/43128
Please reload this pagehttps://github.com/nodejs/node/issues/43128
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/issues/43128
Notifications https://github.com/login?return_to=%2Fnodejs%2Fnode
Fork 36k https://github.com/login?return_to=%2Fnodejs%2Fnode
Star 118k https://github.com/login?return_to=%2Fnodejs%2Fnode
Code https://github.com/nodejs/node
Issues 1.4k https://github.com/nodejs/node/issues
Pull requests 964 https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality 0 https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Code https://github.com/nodejs/node
Issues https://github.com/nodejs/node/issues
Pull requests https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
High cpu usage for outbound ssl requests after upgrading from v16.15.0 to v18.1.0https://github.com/nodejs/node/issues/43128#top
confirmed-bugIssues with confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
tlsIssues and PRs related to the tls subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22tls%22
https://github.com/str1ke
str1kehttps://github.com/str1ke
on May 17, 2022https://github.com/nodejs/node/issues/43128#issue-1238977726
#1https://github.com/nodejs/node/pull/1
https://pastebin.com/wyHPXfMHhttps://pastebin.com/wyHPXfMH
https://user-images.githubusercontent.com/1708854/168877260-03e8c28e-3744-4f40-8869-7bec2ff1ea16.png
https://pastebin.com/0L0Z01iqhttps://pastebin.com/0L0Z01iq
https://user-images.githubusercontent.com/1708854/168877342-2330d40c-2ef9-4b15-92ff-926e3d41207c.png
confirmed-bugIssues with confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
tlsIssues and PRs related to the tls subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22tls%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.