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

*: Introduce tracing framework #8981

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

zhongzc
Copy link
Contributor

@zhongzc zhongzc commented Nov 6, 2020

Signed-off-by: zhongzc zhongzc_arch@outlook.com

What problem does this PR solve?

Lack of a mechanism on TiKV to explore tracing results.

Related feature requests: pingcap/tidb#17693
Related TiDB side & usage: pingcap/tidb#19557
Roadmap: pingcap/tidb-dashboard#710

What is changed and how it works?

Display tracing results directly via Jaeger UI.

What's Changed:

  • A trait tracing::Reporter is introduced with its two implementations JaegerReporter and NullReporter:
    • JaegerReporter reports tracing results to a UDP agent asynchronously via a tokio runtime.
    • NullReporter drops all results passed to it.
  • Some configurations are introduced for reporting tracing results:
    • jaeger_thrift_compact_agent: Jaeger agent, commonly set to "127.0.0.1:6831".
    • duration-threshold: the lower limit of duration of an individual procedure to report. A tracing result with a duration less than this value will be discarded.
    • spans-max-length: the upper limit of the number of spans of a tracing result to report. The excess spans will be discarded.
  • A macro requests_to_trace to register requests to trace. If a request is not within this list (i.e. it's not intended to trace), even though lots of spans are left for the request in the codebase, we don't need to pay for it.

Release note

  • TBD

@sre-bot
Copy link
Contributor

sre-bot commented Nov 6, 2020

@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 6, 2020

/bench +sysbench +tpcc +tpch

@sre-bot
Copy link
Contributor

sre-bot commented Nov 6, 2020

The tpcc workload is being maintained...

@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 6, 2020

/bench +sysbench

@sre-bot
Copy link
Contributor

sre-bot commented Nov 6, 2020

@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 6, 2020

/bench +sysbench

1 similar comment
@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 6, 2020

/bench +sysbench

@sre-bot

This comment has been minimized.

@zhongzc zhongzc force-pushed the new-minitrace branch 3 times, most recently from caf42b3 to f227a2b Compare November 9, 2020 06:16
@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 9, 2020

/bench +sysbench

@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 9, 2020

/bench +sysbench +tpch

@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 9, 2020

/run-integration-common-test

@sre-bot

This comment has been minimized.

@sre-bot

This comment has been minimized.

@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 10, 2020

/bench +sysbench +tpch

@zhongzc zhongzc changed the title *: bench tracing *: set up tracing framework Nov 10, 2020
@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 10, 2020

/bench sysbench

@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 10, 2020

/bench sysbench

@sre-bot
Copy link
Contributor

sre-bot commented Nov 10, 2020

Benchmark Report

Run Sysbench Performance Test on VMs

@@                               Benchmark Diff                               @@
================================================================================
tidb: 1702608a6f597a306a601867e195796193c554e0
--- tikv: ad3eb9724f38d7f2c3022ae4c1a30e92cfc35e63
+++ tikv: 52b3d6f38c3f37c0af8dfe86a28300f9d9313721
pd: bf8aa5801cae7f435db979ee0c1be94a7e900e61
================================================================================
oltp_read_write:
    * QPS: 29072.20 ± 0.07% (std=14.42) delta: -1.66% (p=0.000)
    * Latency p50: 89.06 ± 0.07% (std=0.04) delta: 1.69%
    * Latency p99: 153.02 ± 0.00% (std=0.00) delta: 1.82%
            
oltp_point_select:
    * QPS: 93811.21 ± 0.23% (std=166.98) delta: -4.91% (p=0.000)
    * Latency p50: 1.37 ± 0.37% (std=0.01) delta: 5.00%
    * Latency p99: 4.78 ± 0.84% (std=0.04) delta: 4.60%
            
oltp_update_non_index:
    * QPS: 21779.32 ± 0.02% (std=3.18) delta: -6.18% (p=0.000)
    * Latency p50: 5.88 ± 0.21% (std=0.01) delta: 6.67%
    * Latency p99: 11.65 ± 0.00% (std=0.00) delta: 5.53%
            
oltp_update_index:
    * QPS: 16524.06 ± 0.02% (std=2.89) delta: -5.54% (p=0.000)
    * Latency p50: 7.75 ± 0.35% (std=0.02) delta: 5.94%
    * Latency p99: 15.27 ± 0.00% (std=0.00) delta: 4.62%
            

@zhongzc
Copy link
Contributor Author

zhongzc commented Nov 10, 2020

/bench sysbench

@zhongzc zhongzc changed the title *: set up tracing framework *: introduce tracing framework Nov 10, 2020
@zhongzc zhongzc changed the title *: introduce tracing framework *: Introduce tracing framework Nov 10, 2020
Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

trace raftstore

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

trace read

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

config for bench

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

fix test compilation

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

fix test compilation

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

set span id prefix

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

bump minitrace

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

optimize enabling multiple scopes

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

background worker

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

start scopes

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

turn off tracing

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

bench no serialization

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

bump minitrace

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

fix conflict

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

bump minitrace

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

tmp

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

pb + jaeger

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

polish

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

return on demand

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

make test compiled

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>

make test compiled

Signed-off-by: zhongzc <zhongzc_arch@outlook.com>
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

simplify

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
@ti-chi-bot
Copy link
Member

@zhongzc: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
1 similar comment
5 similar comments
@sre-bot
Copy link
Contributor

sre-bot commented Aug 6, 2021

Benchmark Report

> Run Sysbench Performance Test on VMs

@sticnarf
Copy link
Contributor

@zhongzc May I ask is there any update on this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants