-
Notifications
You must be signed in to change notification settings - Fork 743
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
Runtime allocation profiling #44
Comments
I also already thought about something similar, but maybe for the start just some kind of prometheus metric. Collect the different allocation sizes, the maximum memory usage etc. I think based on that we should already be able to create some nice dashboard. |
Hmm... well, yeah, there are essentially two different use cases here: one is monitoring, and this would be something that I think could work well as Prometheus metrics and could even be turned on by default, the other one is actually digging into the details and seeing exactly where, what and why is being allocated, and that would need more detailed allocation logs which would only be enabled on demand. |
Yeah that makes sense. However, I think first having at least some broader view would be a good start. |
I am up for having monitoring as well. The only way that I can get this metric accurately now is to use the Ideally, we should have a prometheus metric that tells you how much memory a block execution consumed per block. You can currently roughly achieve this by enabling The hard and rather noisy part is that we need need to somehow return these allocation amounts, and then pipe it back to prometheus if the call is actually relevant (i.e Looking around the code, it seems like changing the interface of |
Yeah, we intend to refactor the executor interface anyway in the near future so I'll be keeping this issue in mind when working on refactoring it. |
* Bump time from 0.1.42 to 0.2.9 Bumps [time](https://github.com/time-rs/time) from 0.1.42 to 0.2.9. - [Release notes](https://github.com/time-rs/time/releases) - [Changelog](https://github.com/time-rs/time/blob/master/CHANGELOG.md) - [Commits](https://github.com/time-rs/time/commits/v0.2.9) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Update to new API. Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Tomasz Drwięga <tomusdrw@gmail.com>
* Verify header in substrate import queue * No panic for empty block download batch list * FMT
It'd be nice to add some sort of memory allocation/deallocation profiling support for allocations made within the runtime (through the
FreeingBumpHeapAllocator
), and maybe write a script so that the data can be easily exported into something like my Bytehound for analysis.(This could probably be worked around by profiling the native runtime, but that's not ideal since 1) the native runtime is going to go away anyway, 2) it'll be extra noisy so it'd be harder to analyze and 3) it might not exactly match with what happens in an actual WASM runtime considering e.g. the native environment will be 64-bit and WASM is 32-bit, etc.)
The text was updated successfully, but these errors were encountered: