-
Notifications
You must be signed in to change notification settings - Fork 608
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
ebpf: allow resizing maps #3181
Conversation
vm image broken down :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this! Seems to work well.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! LGTM
Just to make sure my understanding is correct, that this will double the memory footprint of the map, from 8K (2 * 4bytes key/value * 1024) to 16k.
func (s *session) printDebugInfo() { | ||
_ = level.Debug(s.logger).Log("arch", runtime.GOARCH) | ||
pv, _ := os.ReadFile("/proc/version") | ||
_ = level.Debug(s.logger).Log("/proc/version", pv) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice if this could make into the pyroscope.ebpf to have observable debug infos in Grafana Agent:
Line 279 in 16654fb
func (s *session) DebugInfo() interface{} { |
I think it is a bit more complicated At the map creation it will preallocate max_entries (2048) buckets here Then for each map update it will allocate an element of size In total I am not 100% sure in the math, just looked into the source of hashmap for the first time |
@korniltsev just for my information, will this fix help with this error message from grafana-agent?
|
Yes, it may help, especially if you have a lot of short lived processes. I think this commit is not included in any public release of the grafana-agent/alloy yet though |
address #3148
pids
map fasterpids
map size