-
Notifications
You must be signed in to change notification settings - Fork 417
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
Optimize TraceZ Span Processing Speeds #184
Comments
I think you have two problems here that you should reason about in separation:
The lock-free circular buffer would address the second issue. I'm not sure about the details of the proxy/shim approach. |
@pyohannes Thanks for the thorough yet concise explanation! Based on your recommendation, we're opening a couple PRs soon to address this:
I don't know the details behind the proxy/shim approach, but will update the issue accordingly when I get more information |
This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs. |
Closed as inactive. Feel free to reopen if this is still an issue. |
This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs. |
Closing, as zpages is removed, see #2292 |
Is your feature request related to a problem?
For the initial iteration of zPages, more specifically TraceZ, spans are grabbed and temporarily stored using the TraceZ span processor.
The OT C++ span processors interface doesn't store any spans by default, and other current implementations pass the responsibility of ownership to an exporter at most. The TraceZ span processor functionality deviates from these by storing both running and completed spans, keeping references and ownership of them respectively.
The processor's containers are modified whenever a snapshot getter is called or a span starts/ends, which causes potential thread safety issues when the functions are called concurrently since these containers are shared across these functions. When different functions attempt to read/write to the same place in memory simultaneously, this causes a program to crash.
In order to make the span processor thread-safe, lock guards were added at these functions. At a large scale where many spans could be processed at once, this could potentially make TraceZ scale poorly speed-wise.
Describe the solution you'd like
We want to consider solutions that are also fast while being thread-safe. Some proposed solutions include:
Describe alternatives you've considered
Ideally, we also want to reduce contention (how long services query and use the same places in memory). We attempted to do this through copy-on-write and are considering other methods of doing so.
Additional context
The text was updated successfully, but these errors were encountered: