Skip to content
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

Add memory profiling to benchmarks #462

Closed
sinui0 opened this issue Mar 21, 2024 · 2 comments · Fixed by #658
Closed

Add memory profiling to benchmarks #462

sinui0 opened this issue Mar 21, 2024 · 2 comments · Fixed by #658
Labels
enhancement New feature or request

Comments

@sinui0
Copy link
Member

sinui0 commented Mar 21, 2024

No description provided.

@sinui0 sinui0 added the enhancement New feature or request label Mar 21, 2024
@valo
Copy link
Contributor

valo commented Sep 20, 2024

I believe I can contribute in this. We can use valgrind DHAT (https://valgrind.org/docs/manual/dh-manual.html#dh-manual.overview) tool to profile the memory. Here is the output of running valgrind --tool=dhat ./target/release/examples/interactive:

==110432== Total:     5,142,194,819 bytes in 6,534,290 blocks
==110432== At t-gmax: 515,650,506 bytes in 69,816 blocks
==110432== At t-end:  214,519,160 bytes in 235 blocks
==110432== Reads:     12,516,152,734 bytes
==110432== Writes:    8,497,412,743 bytes

It takes 2 minutes to run the interactive example through this tool, so it adds quite a bit of execution overhead. Given that I think the memory profiling should be an option flag.

Do you think that will be useful? Should I add this as a flag in the benches crate? May be even parse the total counters and add it to the metrics.csv?

Here is the detail profile in a DHAT viewer:

image

@sinui0
Copy link
Member Author

sinui0 commented Sep 24, 2024

Interesting, thanks for looking into this.

Yes it would be helpful to have it as a flag in the benches. To start with we probably just want to measure peak usage for a single configuration.

@heeckhau heeckhau linked a pull request Dec 3, 2024 that will close this issue
@heeckhau heeckhau closed this as completed Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants