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

Support multiple measures in MemorySampler #6864

Open
gjoseph92 opened this issue Aug 9, 2022 · 4 comments
Open

Support multiple measures in MemorySampler #6864

gjoseph92 opened this issue Aug 9, 2022 · 4 comments
Labels
diagnostics enhancement Improve existing functionality or make things work better

Comments

@gjoseph92
Copy link
Collaborator

It would be handy to be able to record multiple measures at once in MemorySampler. Particularly, recording process and managed_spilled at the same time gives you a picture of both RAM and disk usage. But also tracking any of the metrics could be nice.

This is easy to do. The one small question is how to structure the DataFrame, which currently has a timeseries index, and one column per sample call. This effectively adds another dimension (measure) to the data, so using an xarray Dataset would actually be nicest here, though we could also just make a DataFrame in tidy format like xarray does.

To be used in coiled/benchmarks#191.

@gjoseph92 gjoseph92 added enhancement Improve existing functionality or make things work better diagnostics labels Aug 9, 2022
@crusaderky
Copy link
Collaborator

I believe #6241 is what you're looking for :)
It's mosty done, it just misses unit tests and docs.

@fjetter
Copy link
Member

fjetter commented Aug 11, 2022

IIUC, this issue is about even more than just memory sampling, isn't it? theoretically we could sample all kinds of metrics and plot them

@crusaderky
Copy link
Collaborator

crusaderky commented Aug 11, 2022

IIUC, this issue is about even more than just memory sampling, isn't it? theoretically we could sample all kinds of metrics and plot them

In theory, yes.
In practice you would need to implement some intelligence when mixing memory and non-memory measures in the same graph, since e.g. you clearly can't make a stacked graph out of them. You'd also need to dynamically change the y axis.
It's possible, but it adds to the complexity of the tool significantly.

This tool was never meant to be fancy.
If we want to write the holy grail of over-time metering, I think we should scrap this entirely and think about something in bokeh IMHO.

@gjoseph92
Copy link
Collaborator Author

I believe #6241 is what you're looking for :)

Yes, it's exactly what I was looking for!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostics enhancement Improve existing functionality or make things work better
Projects
None yet
Development

No branches or pull requests

3 participants