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

Add zPages Tracez Backend Benchmarks #308

Closed
wants to merge 44 commits into from

Conversation

jajanet
Copy link
Contributor

@jajanet jajanet commented Aug 29, 2020

This PR adds benchmarks for the Tracez span processor and data aggregator. These will be useful if/when deciding to change data structures or algorithms for either to measure how updates affect performance, or if completely changing the components (#184). To run these benchmarks manually, run ./ci/do_ci benchmark. There is also the minor addition of adding the zPages OTel blog post link to the README.

Note: Ext folder restructure (#292) should be merged before this. If the PR is closed instead, then I will update this PR accordingly. Main files of interest are ext/zpages/test/tracez_processor_benchmark.cc and ext/zpages/test/tracez_data_aggregator_benchmark.cc

Benchmark results:

2020-08-27 16:00:16
Running bazel-out/host/bin/ext/zpages/test/tracez_processor_benchmark
Run on (16 X 2300 MHz CPU s)
CPU Caches:
  L1 Data 32K (x8)
  L1 Instruction 32K (x8)
  L2 Unified 256K (x8)
  L3 Unified 46080K (x1)
Load Average: 0.34, 0.74, 0.68
-------------------------------------------------------------------------------------------------------------------------
Benchmark                                                                               Time             CPU   Iterations
-------------------------------------------------------------------------------------------------------------------------
TracezProcessor/BM_MakeRunning/10                                                    1547 ns         1551 ns        93401
TracezProcessor/BM_MakeRunning/1000                                                 56276 ns        56261 ns         2575
TracezProcessor/BM_MakeComplete/10                                                   1697 ns         1691 ns        81091
TracezProcessor/BM_MakeComplete/1000                                                66482 ns        66413 ns         2200
TracezProcessor/BM_GetSpans/10                                                        460 ns          460 ns       294354
TracezProcessor/BM_GetSpans/1000                                                    47150 ns        47147 ns         3075
TracezProcessor/BM_MakeRunningMakeComplete/10/process_time/real_time                37897 ns        49307 ns         3611
TracezProcessor/BM_MakeRunningMakeComplete/1000/process_time/real_time             527765 ns       932603 ns          270
TracezProcessor/BM_MakeRunningGetSpans/10/process_time/real_time                    37725 ns        48781 ns         3692
TracezProcessor/BM_MakeRunningGetSpans/1000/process_time/real_time               39241731 ns     40460891 ns            4
TracezProcessor/BM_GetSpansMakeComplete/10/process_time/real_time                   43535 ns        62757 ns         3304
TracezProcessor/BM_GetSpansMakeComplete/1000/process_time/real_time                876935 ns      1213177 ns          168
TracezProcessor/BM_MakeRunningGetSpansMakeComplete/10/process_time/real_time        56758 ns        88244 ns         2390
TracezProcessor/BM_MakeRunningGetSpansMakeComplete/1000/process_time/real_time   70900559 ns     73093121 ns            2

2020-08-29 01:02:51
Running bazel-out/host/bin/ext/zpages/test/tracez_aggregator_benchmark
Run on (16 X 2300 MHz CPU s)
CPU Caches:
  L1 Data 32K (x8)
  L1 Instruction 32K (x8)
  L2 Unified 256K (x8)
  L3 Unified 46080K (x1)
Load Average: 0.41, 0.48, 0.37
------------------------------------------------------------------------------------
Benchmark                                          Time             CPU   Iterations
------------------------------------------------------------------------------------
TracezAggregator/BM_SingleBucket/10/0/0         3676 ns         3673 ns        37502
TracezAggregator/BM_SingleBucket/10/0/1         4127 ns         4092 ns        34745
TracezAggregator/BM_SingleBucket/1000/0/0     281512 ns       281620 ns          496
TracezAggregator/BM_SingleBucket/1000/0/1     289138 ns       289135 ns          478
TracezAggregator/BM_SingleBucket/10/1/0         3852 ns         3838 ns        36325
TracezAggregator/BM_SingleBucket/10/1/1         4641 ns         4607 ns        30952
TracezAggregator/BM_SingleBucket/1000/1/0     300545 ns       300646 ns          466
TracezAggregator/BM_SingleBucket/1000/1/1     316458 ns       316356 ns          445
TracezAggregator/BM_ManyBuckets/10/0/0        255916 ns       255823 ns         1000
TracezAggregator/BM_ManyBuckets/10/0/1        258721 ns       258482 ns         1000
TracezAggregator/BM_ManyBuckets/1000/0/0     8006454 ns      8006213 ns          100
TracezAggregator/BM_ManyBuckets/1000/0/1     7813492 ns      7812767 ns          100
TracezAggregator/BM_ManyBuckets/10/1/0        275323 ns       275280 ns         1000
TracezAggregator/BM_ManyBuckets/10/1/1        288825 ns       288364 ns         1000
TracezAggregator/BM_ManyBuckets/1000/1/0     8943758 ns      8943816 ns          100
TracezAggregator/BM_ManyBuckets/1000/1/1     9299464 ns      9298766 ns          100

The arguments for the aggregator benchmarks are: number of spans, is_unique, and run_background_query

@jajanet jajanet requested a review from a team August 29, 2020 01:24
@jajanet jajanet changed the title Add zPages Tracez Backend Components Benchmarks Add zPages Tracez Backend Benchmarks Aug 29, 2020
@codecov
Copy link

codecov bot commented Aug 29, 2020

Codecov Report

Merging #308 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #308   +/-   ##
=======================================
  Coverage   94.59%   94.59%           
=======================================
  Files         146      146           
  Lines        6629     6629           
=======================================
  Hits         6271     6271           
  Misses        358      358           
Impacted Files Coverage Δ
...lude/opentelemetry/ext/zpages/latency_boundaries.h 100.00% <ø> (ø)
...de/opentelemetry/ext/zpages/threadsafe_span_data.h 96.87% <ø> (ø)
...ges/include/opentelemetry/ext/zpages/tracez_data.h 100.00% <ø> (ø)
...nclude/opentelemetry/ext/zpages/tracez_processor.h 100.00% <ø> (ø)
ext/zpages/src/tracez_data_aggregator.cc 100.00% <ø> (ø)
ext/zpages/src/tracez_processor.cc 95.23% <ø> (ø)
ext/zpages/test/threadsafe_span_data_test.cc 100.00% <ø> (ø)
ext/zpages/test/tracez_data_aggregator_test.cc 97.34% <ø> (ø)
ext/zpages/test/tracez_processor_test.cc 98.70% <ø> (ø)

@alolita
Copy link
Member

alolita commented Dec 7, 2020

Triaged Dec 7 2020: Deprioritized for now. @maxgolov will take a look as time permits. This is additional functionality so not blocking.

@maxgolov
Copy link
Contributor

maxgolov commented Dec 9, 2020

I'll clone the code from this PR in my branch, clean it up, and re-create since we went too far ahead with this since August 28th.

@jajanet
Copy link
Contributor Author

jajanet commented Dec 9, 2020

@alolita @maxgolov Hey everybody, sorry for leaving this loose end and the delayed response! I just got freed from work/school and won’t be back to school until mid-January, so I’d be happy to fix this up in the next few of weeks if that’s helpful and wanted :))

@maxgolov
Copy link
Contributor

@jajanet - that'd be awesome! Let us know if you hit any roadblocks with the new build changes. I'd be happy to help if you need any assistance with this.

Base automatically changed from master to main January 26, 2021 00:46
@jajanet
Copy link
Contributor Author

jajanet commented Feb 20, 2021

Hi all, sorry for the delay and thanks for your patience!

I looked into fixing this over a weekend a few weeks ago, and ran into a separate issue with zPages that needs to be investigated before this PR can proceed. From poking around, I believe most of the zPages components work perfectly. The trouble appears to be stemming from the zPages HTTP server, as it doesn't correctly serve up data on a webpage anymore. It probably needs changes to fit the base HTTP class better. Another possible fix could be replacing this HTTP server with another one.

I'll close this PR for now to help declutter the number of PRs on the repo, and hopefully can revisit this soon!

@jajanet jajanet closed this Feb 20, 2021
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.

4 participants