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

Does the tool support per-cpu array / maps? #220

Closed
raghu-nandan-bs opened this issue Jul 3, 2023 · 6 comments
Closed

Does the tool support per-cpu array / maps? #220

raghu-nandan-bs opened this issue Jul 3, 2023 · 6 comments

Comments

@raghu-nandan-bs
Copy link

raghu-nandan-bs commented Jul 3, 2023

looking at this it seems like reading and processing values from per-cpu arrays/maps are not supported. Can you please confirm if this is correct?

if they are indeed not supported, was it a design decision to not consider per-cpu maps?

@bobrik
Copy link
Contributor

bobrik commented Jul 3, 2023

It is not supported because we didn't need it. I planned to do this eventually.

Do you have a use-case that requires per-cpu maps?

@raghu-nandan-bs
Copy link
Author

Thanks @bobrik

collected data from functions like netif_receive_skb requires that we use per cpu counters so that we dont run into race conditions. I wish we could export this as per-cpu metric... Also, the intention is to track "microburst"s so another problem I'm running into is tracking max per "x" millisecond values over a scrape interval.

Please let me know if you have a solution in mind.

@bobrik
Copy link
Contributor

bobrik commented Jul 3, 2023

It seems like there are two use-cases:

  1. Collect a metric per cpu and export it per cpu.
  2. Collect a metric per cpu, but export it as a combined counter.

It sounds like you want the former. I can see some people wanting the latter, so we should probably support both.

Also, the intention is to track "microburst"s so another problem I'm running into is tracking max per "x" millisecond values over a scrape interval.
Please let me know if you have a solution in mind.

This sounds like an interesting non-trivial example we might want to have in the repo. I don't have a solution for this off the top of my head, but please file a separate issue for this. If you already have a non-ebpf_exporter based solution, it would be good to attach it there for a reference.

@raghu-nandan-bs
Copy link
Author

Thanks for the response @bobrik , will get back

@bobrik
Copy link
Contributor

bobrik commented Jul 4, 2023

Please take a look at #226 for per cpu map support.

@raghu-nandan-bs
Copy link
Author

thanks @bobrik ! will check

@bobrik bobrik closed this as completed Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants