-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
135146: sql,tracing: reduce overhead of tracing r=tbg a=tbg The below is almost the result - it also included #135567, which likely needs a bit more discussion, as well as #135682 which merged separately. ``` $ env N=15 T=1000x PKG=./pkg/sql/tests BENCHES=BenchmarkSysbench/SQL/3node/oltp_read_write scripts/bench 3d083fe tracing-opt old new Sysbench/SQL/3node/oltp_read_write-8 5.922m ± 2% 5.629m ± 4% -4.94% (p=0.004 n=15) Sysbench/SQL/3node/oltp_read_write-8 2.544Mi ± 0% 2.399Mi ± 1% -5.70% (p=0.000 n=15) Sysbench/SQL/3node/oltp_read_write-8 18.98k ± 0% 17.46k ± 1% -7.96% (p=0.000 n=15) ``` <details>Alloc profiles<summary>Details</summary> <p> The alloc profiles below were generated with: ``` rm -f *.pb.gz; ./dev bench --ignore-cache --stream-output --bench-mem ./pkg/sql/tests --filter BenchmarkSysbench/SQL/3node/oltp_read_write --test-args '-test.memprofile=after.pb.gz -test.benchtime=10s -test.cpu=8' -- --test_env 'COCKROACH_TESTING_MEM_PROFILES=/Users/tbg/crdb' pprof -http :6060 -lines -base BenchmarkSysbench_SQL_3node_oltp_read_write.allocs.pre.pb.gz after.pb.gz ``` The above prevents setup-related allocations from showing up in the allocation profile. Note that with `sql.txn_stats.sample_rate=0`, the `tracing.` related allocs disappear entirely. We could consider reducing the sample rate by another factor of 10 to `.1%` (from 1%) or to make it more adaptive. There is likely little benefit to sampling very frequent fingerprints at 1%. ![after](https://github.com/user-attachments/assets/869ed6c8-5771-49b8-b653-5c05b6cb4892) ![before](https://github.com/user-attachments/assets/038dab4e-956a-4600-bae2-f44e34bd4e3e) </p> </details> Epic: CRDB-43584 Co-authored-by: Tobias Grieger <[email protected]>
- Loading branch information
Showing
11 changed files
with
50 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters