[heap] Implement high_max_heap_size [v8/v8 : main]

0 views
Skip to first unread message

Etienne Pierre-Doray (Gerrit)

unread,
Oct 22, 2025, 2:30:16 PM (21 hours ago) Oct 22
to Michael Lippautz, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, v8-flag...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Etienne Pierre-Doray added 1 comment

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Etienne Pierre-Doray . resolved

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I65313ecb8654d97b23459498799e4f22e75963fd
Gerrit-Change-Number: 7069255
Gerrit-PatchSet: 9
Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Wed, 22 Oct 2025 18:30:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Oct 22, 2025, 3:38:00 PM (20 hours ago) Oct 22
to Etienne Pierre-Doray, Michael Lippautz, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, v8-flag...@chromium.org, v8-re...@googlegroups.com
Attention needed from Etienne Pierre-Doray and Michael Lippautz

Message from chrom...@appspot.gserviceaccount.com

📍 Job mac-m1_mini_2020-perf/jetstream2 complete.

See results at: https://pinpoint-dot-chromeperf.appspot.com/job/10b13548510000

Open in Gerrit

Related details

Attention is currently required from:
  • Etienne Pierre-Doray
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I65313ecb8654d97b23459498799e4f22e75963fd
Gerrit-Change-Number: 7069255
Gerrit-PatchSet: 9
Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Comment-Date: Wed, 22 Oct 2025 19:37:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Oct 22, 2025, 3:38:19 PM (20 hours ago) Oct 22
to Etienne Pierre-Doray, Michael Lippautz, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, v8-flag...@chromium.org, v8-re...@googlegroups.com
Attention needed from Etienne Pierre-Doray and Michael Lippautz

Message from chrom...@appspot.gserviceaccount.com

📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

See results at: https://pinpoint-dot-chromeperf.appspot.com/job/10b3ceb0d10000

Gerrit-Comment-Date: Wed, 22 Oct 2025 19:38:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
3:19 AM (8 hours ago) 3:19 AM
to Etienne Pierre-Doray, Dominik Inführ, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, v8-flag...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ and Etienne Pierre-Doray

Michael Lippautz added 1 comment

File src/heap/heap.cc
Line 424, Patchset 9 (Latest): return AllocatorLimitOnMaxOldGenerationSize(physical_memory);
Michael Lippautz . unresolved

This lacks scaling for 0-8G devices completely? Am I missing something?

Wasn't the suggestion on the bug to have scaled heap from 0-8G with a ceil of 4G (~cage size) for 8G+?

Open in Gerrit

Related details

Attention is currently required from:
  • Dominik Inführ
  • Etienne Pierre-Doray
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I65313ecb8654d97b23459498799e4f22e75963fd
    Gerrit-Change-Number: 7069255
    Gerrit-PatchSet: 9
    Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Oct 2025 07:19:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Etienne Pierre-Doray (Gerrit)

    unread,
    9:49 AM (2 hours ago) 9:49 AM
    to Dominik Inführ, chrom...@appspot.gserviceaccount.com, Michael Lippautz, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, v8-flag...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Dominik Inführ and Michael Lippautz

    Etienne Pierre-Doray added 1 comment

    File src/heap/heap.cc
    Line 424, Patchset 9 (Latest): return AllocatorLimitOnMaxOldGenerationSize(physical_memory);
    Michael Lippautz . unresolved

    This lacks scaling for 0-8G devices completely? Am I missing something?

    Wasn't the suggestion on the bug to have scaled heap from 0-8G with a ceil of 4G (~cage size) for 8G+?

    Etienne Pierre-Doray

    MaxOldGenerationSizeFromPhysicalMemory() is the upper bound used for max heap size.
    The actual computation happens here:
    https://source.chromium.org/chromium/chromium/src/+/main:v8/src/heap/heap.cc;l=349?q=MaxOldGenerationSizeFromPhysicalMemory&ss=chromium

    Which on 64bit is effectively clamp(physical_memory / 2, lower_bound, 4Gb)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dominik Inführ
    • Michael Lippautz
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I65313ecb8654d97b23459498799e4f22e75963fd
    Gerrit-Change-Number: 7069255
    Gerrit-PatchSet: 9
    Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Oct 2025 13:49:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Michael Lippautz (Gerrit)

    unread,
    9:58 AM (2 hours ago) 9:58 AM
    to Etienne Pierre-Doray, Dominik Inführ, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, v8-flag...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Dominik Inführ and Etienne Pierre-Doray

    Michael Lippautz added 2 comments

    Patchset-level comments
    Michael Lippautz . resolved

    Will defer to Dominik here as I won't have time to go through the calling code today.

    File src/heap/heap.cc
    Line 424, Patchset 9 (Latest): return AllocatorLimitOnMaxOldGenerationSize(physical_memory);
    Michael Lippautz . unresolved

    This lacks scaling for 0-8G devices completely? Am I missing something?

    Wasn't the suggestion on the bug to have scaled heap from 0-8G with a ceil of 4G (~cage size) for 8G+?

    Etienne Pierre-Doray

    MaxOldGenerationSizeFromPhysicalMemory() is the upper bound used for max heap size.
    The actual computation happens here:
    https://source.chromium.org/chromium/chromium/src/+/main:v8/src/heap/heap.cc;l=349?q=MaxOldGenerationSizeFromPhysicalMemory&ss=chromium

    Which on 64bit is effectively clamp(physical_memory / 2, lower_bound, 4Gb)

    Michael Lippautz

    Thanks for clarifying.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dominik Inführ
    • Etienne Pierre-Doray
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I65313ecb8654d97b23459498799e4f22e75963fd
    Gerrit-Change-Number: 7069255
    Gerrit-PatchSet: 9
    Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Oct 2025 13:57:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
    Comment-In-Reply-To: Etienne Pierre-Doray <etie...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Dominik Inführ (Gerrit)

    unread,
    10:37 AM (1 hour ago) 10:37 AM
    to Etienne Pierre-Doray, Michael Lippautz, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, v8-flag...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Etienne Pierre-Doray

    Dominik Inführ added 1 comment

    File src/heap/heap.cc
    Line 424, Patchset 9 (Latest): return AllocatorLimitOnMaxOldGenerationSize(physical_memory);
    Michael Lippautz . unresolved

    This lacks scaling for 0-8G devices completely? Am I missing something?

    Wasn't the suggestion on the bug to have scaled heap from 0-8G with a ceil of 4G (~cage size) for 8G+?

    Etienne Pierre-Doray

    MaxOldGenerationSizeFromPhysicalMemory() is the upper bound used for max heap size.
    The actual computation happens here:
    https://source.chromium.org/chromium/chromium/src/+/main:v8/src/heap/heap.cc;l=349?q=MaxOldGenerationSizeFromPhysicalMemory&ss=chromium

    Which on 64bit is effectively clamp(physical_memory / 2, lower_bound, 4Gb)

    Michael Lippautz

    Thanks for clarifying.

    Dominik Inführ

    It feels the heap limits computation is already quite convoluted and we now add an additional branch/flag. Can we shortcut this and move this logic to ResourceConstraints::ConfigureDefaults directly for your case without going through all the other methods anymore?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Etienne Pierre-Doray
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I65313ecb8654d97b23459498799e4f22e75963fd
    Gerrit-Change-Number: 7069255
    Gerrit-PatchSet: 9
    Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Oct 2025 14:37:03 +0000
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages