Skip to content

Conversation

@avivkeller
Copy link
Member

Description

This PR adds an article on understanding and tuning Memory in Node.js. It discusses the V8 memory types (Stack and Heap), along with Old vs New space.

CC @nodejs/diagnostics

Validation

After building the package, the article should exist at /learn/diagnostics/memory/understanding-and-tuning-memory

Related Issues

Fixes #7637

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@avivkeller avivkeller added the learn Issues/pr concerning the learn section label Apr 10, 2025
Copilot AI review requested due to automatic review settings April 10, 2025 22:34
@avivkeller avivkeller requested a review from a team as a code owner April 10, 2025 22:34
@vercel
Copy link

vercel bot commented Apr 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Apr 11, 2025 5:59pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • packages/i18n/locales/en.json: Language not supported

@avivkeller
Copy link
Member Author

avivkeller commented Apr 10, 2025

Copy link

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking this on and so quickly. I have some feedback, but overall it's looking good.

I'd also like to see @mcollina's feedback on it.

Copy link

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm finding it difficult to re-review the things I had noted originally because they have been marked as resolved and no longer show up inline in the change set. But I am getting a distinct impression that a predictive text generator was used to address the concerns I raised. I would like to see very clear scenarios in which each setting would be useful, and a discussion about what one can expect when making a change with the setting.

@avivkeller
Copy link
Member Author

I've addressed the conversations in commit 24bcca2. If the examples I included don’t meet your expectations, I’m open to hearing suggestions for improvement.

That said, I find it a bit insulting to have my writing likened to a “predictive text generator.”

@jsumners-nr
Copy link

jsumners-nr commented Apr 11, 2025

I've addressed the conversations in commit 24bcca2.

The commit diff helps, thank you.

If the examples I included don’t meet your expectations, I’m open to hearing suggestions for improvement.

The thing is, I'm not seeing many actual examples. Lines 115 and 119 in the linked change set are highlighting some specific cases, but the others are mainly wordier rephrasings of the original blocks. Like in line 103 of that change set: what constitutes "high throughput" and what is the thing that is "noticeable"? I think the document should assume the reader has a basic grasp on memory concepts, but is by no means an expert and is trying to expand their knowledge through this doc. I think such a reader would be looking for concrete examples along the lines of "in an application that does A, with B requests per second, and generates objects that look like { something } if we change setting X from Y to Z, then we should see [listed changes] in the application and its performance."

That said, I find it a bit insulting to have my writing likened to a “predictive text generator.”

All I can go on is the evidence before me. What I see is as I described: moderate rephrasings of the reviewed blocks of text. That's what I would expect from such a tool.

@avivkeller
Copy link
Member Author

avivkeller commented Apr 11, 2025

Thanks for the additional feedback, e1e3316 should address your review, along with one minor issues that occur when using non-VSCode editors (Seriously, why do half of my editors use fancy punctuation?).

All I can go on is the evidence before me. What I see is as I described: moderate rephrasings of the reviewed blocks of text. That's what I would expect from such a tool.

I'm always rewording things, so that's unrelated to your reviews. I'm sorry if they didn't address your concerns

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions
Copy link
Contributor

Unit Test Coverage Report

Title Lines Statements Branches Functions
@node-core/ui-components Coverage: 95%
95.83% (161/168) 77.86% (102/131) 88.57% (31/35)
@nodejs/website Coverage: 87%
84.7% (493/582) 76.03% (165/217) 86.88% (106/122)
Title Tests Skipped Failures Errors Time
@node-core/ui-components 24 0 💤 0 ❌ 0 🔥 4.742s ⏱️
@nodejs/website 156 0 💤 0 ❌ 0 🔥 6.476s ⏱️

@github-actions
Copy link
Contributor

github-actions bot commented Apr 11, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟠 88 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 99 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 99 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 92 🔗

@ovflowd ovflowd added this pull request to the merge queue Apr 11, 2025
Merged via the queue into main with commit 3ad42c6 Apr 11, 2025
15 checks passed
@ovflowd ovflowd deleted the feat/memory-tuning branch April 11, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

learn Issues/pr concerning the learn section

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add doc detailing how to tune memory settings

6 participants