-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heap profiling for memory bottlenecks discovery #113
Comments
I think @ed255 actually did this and saw the place where memory spikes the most (when we hold Evaluation & Coefficient form of all our polynomials). And IIRC, I saw that we can't really avoid that (although we can revisit ofc). @ed255 Can you maybe post a summary here such taht we can trigger a discussion on how/if is worth solving this? |
I used dhat to profile memory usage and make sure that the frontend-backend split didn't increase the memory consumption compared to the legacy halo2. My impressions of the profiler were:
I didn't analyze the profiling results to see which part of halo2 was using more memory, I was only paying attention to the comparison between frontend-backend split and legacy halo2; nevertheless on a different occasion I tried to reason about the biggest source of memory usage from halo2 and here are my conclusions Constants:
Once the circuit is big enough, this is the biggest source of memory usage:
From a discussion with @han0110 , he mentioned that Scroll did a trick to cap the max memory usage by: "computing the evaluations on extended domain and quotient chunk by chunk"; but I don't fully understand this idea 😅 |
Nice write up! I believe the optimization Han mentioned is scroll-tech#28 (comment) |
Working on porting this here! Trying to get good benchmarks to make avaliable with the PR. |
…-hk/dev-fix/double-add-docs Resolve "Add documentation for Double-and-Add"
Superseded by #291 |
Use ad-hoc heap allocation profiling to see how memory is being consumed and how can we optimize it.
See https://docs.rs/dhat/latest/dhat/ docs for more info
The text was updated successfully, but these errors were encountered: