Skip to content

reporter: Improve stack hashing for better cachability#2994

Open
brancz wants to merge 1 commit intomainfrom
improved-hashing
Open

reporter: Improve stack hashing for better cachability#2994
brancz wants to merge 1 commit intomainfrom
improved-hashing

Conversation

@brancz
Copy link
Member

@brancz brancz commented Oct 16, 2024

Previously we used the internal hashes of traces from within the opentelemetry-ebpf-profiler, however, that hash is the same whether we end up getting full symbols for eg. interpreted frames, which meant that we couldn't safely cache incomplete stacks.

This change introduces a separate hashing mechanism, that hashes the fully symbolized stacks, including whether a frame was symbolized or not, meaning this hash can safely be used to cache those stacks.

A relatively unscientific experiment with a test cluster shows roughly a 40-50% reduction in bytes sent over the wire for servers that perform caching.

Judging by profiling data (or lack thereof), this change does not appear to have any effect on the baseline CPU usage of the agent.

Screenshot 2024-10-16 at 14 00 21

Previously we used the internal hashes of traces from within the
opentelemetry-ebpf-profiler, however, that hash is the same whether we
end up getting full symbols for eg. interpreted frames, which meant that
we couldn't safely cache incomplete stacks.

This change introduces a separate hashing mechanism, that hashes the
fully symbolized stacks, including whether a frame was symbolized or
not, meaning this hash can safely be used to cache those stacks.

A relatively unscientific experiment with a test cluster shows roughly a
40-50% reduction in bytes sent over the wire for servers that perform
caching.

Judging by profiling data (or lack thereof), this change does not appear
to have any effect on the baseline CPU usage of the agent.
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.

1 participant