feat: add --memory_profile_out flag for Chonk memory profiling#22145
Open
johnathan79717 wants to merge 2 commits intomerge-train/barretenbergfrom
Open
feat: add --memory_profile_out flag for Chonk memory profiling#22145johnathan79717 wants to merge 2 commits intomerge-train/barretenbergfrom
johnathan79717 wants to merge 2 commits intomerge-train/barretenbergfrom
Conversation
Add tooling to continually assess memory consumption in Chonk proving. The new --memory_profile_out flag on `bb prove` outputs a JSON report with per-circuit polynomial memory breakdown by category (wires, sigmas, selectors, etc.), CRS size, and RSS checkpoints at key proving stages. A Python extraction script converts the JSON into benchmark dashboard entries (stacked charts for polynomial categories, line charts for totals and peak RSS). Integrated into ci_benchmark_ivc_flows.sh. Refs: AztecProtocol/barretenberg#1641
Switch from stacked: to stacked-area: prefix in extract_memory_benchmarks.py so the dashboard renders proper stacked area charts instead of overlaid lines. This requires the corresponding stacked-area chart support in benchmark-page-data.
Open
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
--memory_profile_out <file>flag tobb provethat outputs a JSON report of memory consumption during Chonk provingci_benchmark_ivc_flows.shfor continuous trackingRefs: AztecProtocol/barretenberg#1641
Dashboard change needed
The extraction script uses
extra: "stacked-area:..."which requires a newrenderStackedAreaGraphfunction inbenchmark-page-data/bench/index.html. The change is ready at/mnt/user-data/jonathan/benchmark-page-dataon branchjh/stacked-area-chartand needs to be pushed by someone with access toAztecProtocol/benchmark-page-data. Until then, the memory metrics still appear as individual line charts (graceful fallback).Example output
Test plan
ninja bb,ninja chonk_tests,ninja ultra_honk_tests)deploy_ecdsar1+sponsored_fpcflow: JSON output is valid, all 13 circuits profiled with RSS checkpoints