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

Reconsider ebpf map size for off-cpu profiling #320

Open
rockdaboot opened this issue Jan 22, 2025 · 0 comments
Open

Reconsider ebpf map size for off-cpu profiling #320

rockdaboot opened this issue Jan 22, 2025 · 0 comments
Assignees

Comments

@rockdaboot
Copy link
Contributor

rockdaboot commented Jan 22, 2025

Summary

This has been raised at #316 (comment)

Isn't this sizing excessive if we bound it by number of possible PIDs? For example,
if we set off-cpu-threshold to 1000, we'll end up with a map that takes up roughly
4194304*16 = 64MB since we pre-allocate.

Generated off-cpu events are bounded by cores and scheduler call frequency, so for example
we could size this map as: next_pow2(cores*1000*pollInterval) using 1000Hz as an upper
bound estimate of scheduler call frequency which should consume far less memory.

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