GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [v26.x] deps: V8: backport 2444c109f4f8 by acburdine · Pull Request #66736 · nodejs/node

Conversation

@acburdine

@acburdine acburdine commented Oct 14, 2026

Copy link
Copy Markdown

Backports v8/v8@2444c10 (https://chromium-review.googlesource.com/c/v8/v8/+/8521518, crbug https://issues.chromium.org/issues/570738027) to v26.x, as suggested in #66692 instead of floating it on main.

Fixes: #66564

Since V8's allocation throughput moved to SmoothedBytesAndDuration, a throughput of exactly 0 made ComputeMutatorUtilizationImpl() report "maximal allocation". Node never allocates on the CppHeap unless node:vm is used, so Heap::HasLowAllocationRate() was never true and the MemoryReducer could only start a GC through its 100 s watchdog. Upstream removed the zero special case, so 0 now counts as the lowest allocation rate.

Changes from the upstream commit:

  • heap.cc, heap.h, gc-tracer.h: applied unchanged.
  • deps/v8/AUTHORS: same line, merged by hand (context drift).
  • test/unittests/heap/gc-tracer-unittest.cc: GCTracer::SampleAllocation() takes 4 counters on V8 14.6 (no external-memory counter), so the two new tests drop that argument; one comment no longer mentions external memory.
  • v8_embedder_string bumped to -node.40.

Verification:

  • make -j8 test on macOS arm64: all pass (3 CA/TLS tests needed NODE_USE_SYSTEM_CA unset in my shell, unrelated to this change).
  • In a linux/amd64 container (V8 14.6's standalone toolchain doesn't build against the current macOS SDK): built deps/v8 and ran unittests/GCTracerTest.* and unittests/MemoryReducer.* (23/23 pass). With the heap.cc change reverted, GCTracerTest.LowAllocationRateWithZeroEmbedderAllocation fails (HasLowAllocationRate() is false); with it, both new tests pass.
  • Same container, the make test-v8 suites (mjsunit, cctest, debugger, inspector, message, preparser): 14,996/14,999 pass. The 3 failures (regress-crbug-1041232, -1104608, -1209152) use --multi-mapped-mock-allocator, whose mremap with old size 0 isn't supported by the x86 emulation the container ran under.

Repro and traces: https://github.com/acburdine/node-memory-reducer-repro. On v24.21.0, time from the end of an allocation burst to the first memory-reducer GC was 100 s / 100 s / 141 s vs 11 s with an earlier, embedder-only version of this fix.

Disclaimer

The investigation, the upstream CL and this backport were prepared with help from an AI coding assistant. The fix was reviewed and approved upstream by the V8 heap team; I reviewed the backport diff, and the verification above was run locally on this branch.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@acburdine
deps: V8: backport 2444c109f4f8
e871630
Original commit message:

    [heap] Treat zero allocation throughput as a low allocation rate

    Since https://crrev.com/c/5935313 allocation throughput is tracked with
    SmoothedBytesAndDuration, which has no lower bound. A sampled throughput
    of exactly 0 -- nothing was allocated, or the smoothed value decayed to
    0 after a long idle period -- made ComputeMutatorUtilizationImpl()
    return a mutator utilization of 0 ("maximal allocation"). For an isolate
    that never allocates on the CppHeap, HasLowAllocationRate() is then
    never true and the MemoryReducer cannot start a GC through its
    low-allocation condition; only the 100s watchdog can. Node.js hits this
    for any process that does not use node:vm.

    Remove the special case. A mutator speed of 0 now yields a mutator
    utilization of 1, i.e. the lowest possible allocation rate. gc_speed is
    either the conservative default or at least 1 byte/ms, so the formula
    stays well defined.

    Bug: 570738027
    Change-Id: I84cd51607df3c31c2f1e02bb2fe258e5506131ce
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8521518
    Reviewed-by: Dominik Inführ <[email protected]>
    Commit-Queue: Dominik Inführ <[email protected]>
    Reviewed-by: Omer Katz <[email protected]>
    Commit-Queue: Omer Katz <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#110599}

Refs: v8/v8@2444c10
Fixes: nodejs#66564
Signed-off-by: Austin Burdine <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. needs-ci PRs that need a full CI run. v26.x Issues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch. v8 engine Issues and PRs related to the V8 dependency. labels Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

  • the guide for first-time contributors
  • the contribution and automation policies
  • the pull request guide
  • the AI use policy
  • the Code of Conduct

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Oct 14, 2026
deps: V8: cherry-pick 2444c109f4f8 #66692
Closed
[v24.x] deps: V8: backport 2444c109f4f8 #66741
Closed
@acburdine

acburdine commented Nov 5, 2026

Copy link
Copy Markdown
Author

hey @inoway46 - friendly ping here 😄 is there anything more I need to do on this PR? (since you mentioned I should retarget my original PR)

inoway46 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@inoway46

inoway46 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

@richardlau Would you be able to take a look when you have a chance? The underlying regression has confirmed production impact (#66564).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TacoRocket TacoRocket mentioned this pull request Nov 8, 2026
Track Node 26 idle memory release after scheduling TacoRocket/tunarr-retuned#231
Open
@aduh95
aduh95 force-pushed the v26.x-staging branch from c2060d3 to e7c0957 Compare November 13, 2026 08:03
@aduh95 aduh95 mentioned this pull request Nov 13, 2026
[v26.x] V8 backports #67452
Merged
aduh95 added a commit to aduh95/node that referenced this pull request Nov 13, 2026
@acburdine @aduh95
deps: V8: backport 2444c109f4f8
8e95e48
Original commit message:

    [heap] Treat zero allocation throughput as a low allocation rate

    Since https://crrev.com/c/5935313 allocation throughput is tracked with
    SmoothedBytesAndDuration, which has no lower bound. A sampled throughput
    of exactly 0 -- nothing was allocated, or the smoothed value decayed to
    0 after a long idle period -- made ComputeMutatorUtilizationImpl()
    return a mutator utilization of 0 ("maximal allocation"). For an isolate
    that never allocates on the CppHeap, HasLowAllocationRate() is then
    never true and the MemoryReducer cannot start a GC through its
    low-allocation condition; only the 100s watchdog can. Node.js hits this
    for any process that does not use node:vm.

    Remove the special case. A mutator speed of 0 now yields a mutator
    utilization of 1, i.e. the lowest possible allocation rate. gc_speed is
    either the conservative default or at least 1 byte/ms, so the formula
    stays well defined.

    Bug: 570738027
    Change-Id: I84cd51607df3c31c2f1e02bb2fe258e5506131ce
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8521518
    Reviewed-by: Dominik Inführ <[email protected]>
    Commit-Queue: Dominik Inführ <[email protected]>
    Reviewed-by: Omer Katz <[email protected]>
    Commit-Queue: Omer Katz <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#110599}

Refs: v8/v8@2444c10
Co-authored-by: Antoine du Hamel <[email protected]>
Reviewed-by: Antoine du Hamel <[email protected]>
PR-URL: nodejs#66736
@legendecas

legendecas commented Nov 13, 2026

Copy link
Copy Markdown
Member

This is released in V8 15.8 so please wait #67070 landing on main first, per backport requirement.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95 added a commit that referenced this pull request Nov 16, 2026
@acburdine @aduh95
deps: V8: backport 2444c109f4f8
f775f92
Original commit message:

    [heap] Treat zero allocation throughput as a low allocation rate

    Since https://crrev.com/c/5935313 allocation throughput is tracked with
    SmoothedBytesAndDuration, which has no lower bound. A sampled throughput
    of exactly 0 -- nothing was allocated, or the smoothed value decayed to
    0 after a long idle period -- made ComputeMutatorUtilizationImpl()
    return a mutator utilization of 0 ("maximal allocation"). For an isolate
    that never allocates on the CppHeap, HasLowAllocationRate() is then
    never true and the MemoryReducer cannot start a GC through its
    low-allocation condition; only the 100s watchdog can. Node.js hits this
    for any process that does not use node:vm.

    Remove the special case. A mutator speed of 0 now yields a mutator
    utilization of 1, i.e. the lowest possible allocation rate. gc_speed is
    either the conservative default or at least 1 byte/ms, so the formula
    stays well defined.

    Bug: 570738027
    Change-Id: I84cd51607df3c31c2f1e02bb2fe258e5506131ce
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8521518
    Reviewed-by: Dominik Inführ <[email protected]>
    Commit-Queue: Dominik Inführ <[email protected]>
    Reviewed-by: Omer Katz <[email protected]>
    Commit-Queue: Omer Katz <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#110599}

Refs: v8/v8@2444c10
Co-authored-by: Antoine du Hamel <[email protected]>
Reviewed-by: Antoine du Hamel <[email protected]>
PR-URL: #66736
@github-actions github-actions Bot mentioned this pull request Nov 16, 2026
2026-11-16, Version 27.0.0-alpha.0.1.1 (Alpha) #67515
Merged
@aduh95

aduh95 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Landed in 8e95e48

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95 aduh95 closed this Nov 17, 2026
@acburdine

acburdine commented Nov 17, 2026

Copy link
Copy Markdown
Author

@aduh95 Thanks for landing this! A comment on the original PR I opened mentioned that this fix needed to sit for a couple of weeks in a current 26.x release before backporting it to 24.x - is that still the case?

I have a 24.x backport PR in draft currently w/merge conflicts, was planning on holding off fixing it up until 26.x has been out with this fix, but I'm happy to fix it up now if wanted 😄

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95 added a commit that referenced this pull request Nov 19, 2026
@acburdine @aduh95
deps: V8: backport 2444c109f4f8
730b8b6
Original commit message:

    [heap] Treat zero allocation throughput as a low allocation rate

    Since https://crrev.com/c/5935313 allocation throughput is tracked with
    SmoothedBytesAndDuration, which has no lower bound. A sampled throughput
    of exactly 0 -- nothing was allocated, or the smoothed value decayed to
    0 after a long idle period -- made ComputeMutatorUtilizationImpl()
    return a mutator utilization of 0 ("maximal allocation"). For an isolate
    that never allocates on the CppHeap, HasLowAllocationRate() is then
    never true and the MemoryReducer cannot start a GC through its
    low-allocation condition; only the 100s watchdog can. Node.js hits this
    for any process that does not use node:vm.

    Remove the special case. A mutator speed of 0 now yields a mutator
    utilization of 1, i.e. the lowest possible allocation rate. gc_speed is
    either the conservative default or at least 1 byte/ms, so the formula
    stays well defined.

    Bug: 570738027
    Change-Id: I84cd51607df3c31c2f1e02bb2fe258e5506131ce
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8521518
    Reviewed-by: Dominik Inführ <[email protected]>
    Commit-Queue: Dominik Inführ <[email protected]>
    Reviewed-by: Omer Katz <[email protected]>
    Commit-Queue: Omer Katz <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#110599}

Refs: v8/v8@2444c10
Co-authored-by: Antoine du Hamel <[email protected]>
Reviewed-by: Antoine du Hamel <[email protected]>
PR-URL: #66736
@acburdine
acburdine deleted the backport-v8-2444c109f4f8-to-v26.x branch November 20, 2026 02:28
This was referenced Nov 20, 2026
2026-11-30, Version 24.23.0 'Krypton' (LTS) #67663
Open
2026-11-30, Version 26.14.0 'Lithium' (LTS) #67664
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. v26.x Issues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@acburdine @nodejs-github-bot @inoway46 @legendecas @aduh95
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.