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

Allow eBPF map sizes and general buffer size for profiler to be changed via CLI options #54

Merged
merged 10 commits into from
Aug 13, 2024

Conversation

gmarler
Copy link
Collaborator

@gmarler gmarler commented Aug 8, 2024

This PR adds several CLI options to set defaults for and allow modifying the size of most eBPF maps and the perf buffer for the profiler:

  • --mapsize-info prints the eBPF map sizes after they've been created
  • --mapsize-stacks to adjust max number of individual stacks to capture before they are aggregated
  • --mapsize-aggregated-stacks to adjust the max number of unique stacks to be stored after aggregation from the stacks map
  • --mapsize-unwind-info-chunks to adjust the max number of chunks allowed to be in a single shard
  • --mapsize-unwind-tables to adjust the max number of shards allowed
  • --mapsize-rate-limits to adjust when to impose rate limits on incoming profiling data
  • --perf-buffer-bytes to adjust the size of each profiler perf buffer

Also added a config validator for --perf-buffer-bytes, as the value must be a power of 2.

Added tests for the validator function.

@gmarler gmarler requested a review from javierhonduco August 8, 2024 23:43
src/collector.rs Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/profiler.rs Outdated Show resolved Hide resolved
src/profiler.rs Outdated Show resolved Hide resolved
src/profiler.rs Outdated Show resolved Hide resolved
src/profiler.rs Outdated Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
Copy link
Owner

@javierhonduco javierhonduco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just left a comment about the value_is_power_of_two separation, if you could do it I think it would be nicer!

@gmarler gmarler merged commit 81ccb90 into javierhonduco:main Aug 13, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants