Skip to content

[wip] drpc refactor benchmarking playground#167104

Open
shubhamdhama wants to merge 9 commits intocockroachdb:masterfrom
shubhamdhama:work-with-drpc-changes
Open

[wip] drpc refactor benchmarking playground#167104
shubhamdhama wants to merge 9 commits intocockroachdb:masterfrom
shubhamdhama:work-with-drpc-changes

Conversation

@shubhamdhama
Copy link
Copy Markdown
Contributor

No description provided.

@trunk-io

This comment was marked as off-topic.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@shubhamdhama shubhamdhama force-pushed the work-with-drpc-changes branch from c842911 to 73d66c3 Compare March 31, 2026 10:52
@shubhamdhama shubhamdhama requested a review from a team as a code owner March 31, 2026 10:52
@shubhamdhama shubhamdhama removed the request for review from a team March 31, 2026 10:52
@shubhamdhama shubhamdhama added the do-not-merge bors won't merge a PR with this label. label Mar 31, 2026
@shubhamdhama
Copy link
Copy Markdown
Contributor Author

shubhamdhama commented Mar 31, 2026

drpc version: till cockroachdb/drpc#47

> benchdiff --bazel --old (git rev-parse HEAD^) --count 20 --benchtime 1000x ./pkg/sql/tests --run Sysbench/SQ
L/3node/oltp_read_write
old:  c8f3c7b enable DRPC for sysbench
new:  c842911 update dependency
args: benchdiff "--bazel" "--old" "c8f3c7b6bf1bc51c3704482ff6bd05c9630f2bf5" "--count" "20" "--benchtime" "1000x" "./pkg/sql/tests" "--run" "Sysbench/SQL/3node/oltp_read_write"

building benchmark binaries for c8f3c7b: enable DRPC for sysbench [bazel=true] 1/1 \
building benchmark binaries for c842911: update dependency [bazel=true] 1/1 \
name                                           old time/op    new time/op    delta
Sysbench/SQL/3node/oltp_read_write-24            14.7ms ± 4%    13.8ms ± 4%  -5.66%  (p=0.000 n=20+19)
ParallelSysbench/SQL/3node/oltp_read_write-24    1.13ms ± 8%    1.09ms ± 6%  -3.40%  (p=0.003 n=19+17)

name                                           old errs/op    new errs/op    delta
Sysbench/SQL/3node/oltp_read_write-24              0.00           0.00         ~     (all equal)
ParallelSysbench/SQL/3node/oltp_read_write-24      0.01 ±49%      0.01 ±56%    ~     (p=0.679 n=20+20)

name                                           old alloc/op   new alloc/op   delta
Sysbench/SQL/3node/oltp_read_write-24            2.05MB ± 4%    2.02MB ± 3%  -1.57%  (p=0.034 n=18+19)
ParallelSysbench/SQL/3node/oltp_read_write-24    1.93MB ± 5%    1.96MB ± 4%    ~     (p=0.068 n=20+20)

name                                           old allocs/op  new allocs/op  delta
Sysbench/SQL/3node/oltp_read_write-24             8.58k ± 2%     8.49k ± 1%  -0.96%  (p=0.000 n=18+19)
ParallelSysbench/SQL/3node/oltp_read_write-24     7.57k ± 2%     7.59k ± 1%    ~     (p=0.407 n=20+19)

No major performance change was expected yet we are seeing likely because we have remove that "run" business from manageReader and now DRPC is reusing an allocation and never shrinking it back.

@shubhamdhama shubhamdhama force-pushed the work-with-drpc-changes branch 3 times, most recently from de66cfa to 612a1ba Compare April 1, 2026 09:36
@cockroach-teamcity cockroach-teamcity added the X-perf-gain Microbenchmarks CI: Added if a performance gain is detected label Apr 1, 2026
@shubhamdhama shubhamdhama force-pushed the work-with-drpc-changes branch from 848b34b to ae17e9b Compare April 12, 2026 13:16
@shubhamdhama shubhamdhama requested review from a team as code owners April 12, 2026 13:16
@shubhamdhama shubhamdhama requested review from alyshanjahani-crl, golgeek and herkolategan and removed request for a team, alyshanjahani-crl, golgeek and herkolategan April 12, 2026 13:16
@blathers-crl

This comment was marked as low quality.

1 similar comment
@blathers-crl

This comment was marked as resolved.

@blathers-crl

This comment was marked as low quality.

1 similar comment
@blathers-crl

This comment was marked as low quality.

@blathers-crl

This comment was marked as low quality.

1 similar comment
@blathers-crl

This comment was marked as low quality.

@shubhamdhama shubhamdhama force-pushed the work-with-drpc-changes branch from b162a3b to a4625ce Compare April 17, 2026 15:19
@shubhamdhama shubhamdhama removed the X-perf-gain Microbenchmarks CI: Added if a performance gain is detected label Apr 17, 2026
@cockroach-teamcity cockroach-teamcity added the X-perf-gain Microbenchmarks CI: Added if a performance gain is detected label Apr 17, 2026
@shubhamdhama
Copy link
Copy Markdown
Contributor Author

gRPC vs DRPC mux

building benchmark binaries for a4625ce: fixup! fixup! enable DRPC for sysbench [bazel=true] 1/1 |
name                                           old time/op    new time/op    delta
Sysbench/SQL/3node/oltp_read_write-24            13.4ms ± 2%    12.8ms ± 5%   -4.37%  (p=0.000 n=19+20)
ParallelSysbench/SQL/3node/oltp_read_write-24    1.08ms ± 7%    1.07ms ±12%     ~     (p=0.627 n=20+19)

name                                           old errs/op    new errs/op    delta
Sysbench/SQL/3node/oltp_read_write-24              0.00           0.00          ~     (all equal)
ParallelSysbench/SQL/3node/oltp_read_write-24      0.01 ±66%      0.01 ±63%     ~     (p=0.752 n=20+20)

name                                           old alloc/op   new alloc/op   delta
Sysbench/SQL/3node/oltp_read_write-24            2.05MB ± 4%    1.59MB ± 5%  -22.55%  (p=0.000 n=20+19)
ParallelSysbench/SQL/3node/oltp_read_write-24    1.96MB ± 7%    1.60MB ± 8%  -18.43%  (p=0.000 n=20+20)

name                                           old allocs/op  new allocs/op  delta
Sysbench/SQL/3node/oltp_read_write-24             8.51k ± 1%     6.98k ± 1%  -18.02%  (p=0.000 n=20+19)
ParallelSysbench/SQL/3node/oltp_read_write-24     7.61k ± 3%     6.65k ± 2%  -12.60%  (p=0.000 n=19+15)

DRPC vs DRPC mux

> benchdiff --bazel --old 7e4f7fea52 --count 20 --benchtime 1000x ./pkg/sql/tests --run Sysbench/SQL/3node/oltp_read_write
old:  7e4f7fe ENABLE DRPC for sysbench
new:  a4625ce fixup! fixup! enable DRPC for sysbench
args: benchdiff "--bazel" "--old" "7e4f7fea52" "--count" "20" "--benchtime" "1000x" "./pkg/sql/tests" "--run" "Sysbench/SQL/3node/oltp_read_write"

name                                           old time/op    new time/op    delta
Sysbench/SQL/3node/oltp_read_write-24            12.3ms ± 4%    12.9ms ± 1%   +5.09%  (p=0.000 n=20+19)
ParallelSysbench/SQL/3node/oltp_read_write-24     964µs ± 8%    1064µs ± 4%  +10.42%  (p=0.000 n=20+18)

name                                           old errs/op    new errs/op    delta
Sysbench/SQL/3node/oltp_read_write-24              0.00           0.00          ~     (all equal)
ParallelSysbench/SQL/3node/oltp_read_write-24      0.01 ±45%      0.01 ±67%     ~     (p=0.463 n=20+20)

name                                           old alloc/op   new alloc/op   delta
Sysbench/SQL/3node/oltp_read_write-24            1.60MB ± 5%    1.58MB ± 5%     ~     (p=0.265 n=20+20)
ParallelSysbench/SQL/3node/oltp_read_write-24    1.52MB ±10%    1.58MB ± 7%   +4.06%  (p=0.002 n=20+20)

name                                           old allocs/op  new allocs/op  delta
Sysbench/SQL/3node/oltp_read_write-24             6.97k ± 0%     6.96k ± 0%   -0.18%  (p=0.015 n=20+16)
ParallelSysbench/SQL/3node/oltp_read_write-24     6.58k ± 1%     6.60k ± 2%     ~     (p=0.162 n=18+19)

DRPC vs DRPC mux one stream per connection

> benchdiff --bazel --old 7e4f7fea52 --count 20 --benchtime 1000x ./pkg/sql/tests --run Sysbench/SQL/3node/oltp_read_write
old:  7e4f7fe ENABLE DRPC for sysbench
new:  e5ada38 disable mux
args: benchdiff "--bazel" "--old" "7e4f7fea52" "--count" "20" "--benchtime" "1000x" "./pkg/sql/tests" "--run" "Sysbench/SQL/3node/oltp_read_write"

building benchmark binaries for e5ada38: disable mux [bazel=true] 1/1 /
name                                           old time/op    new time/op    delta
ParallelSysbench/SQL/3node/oltp_read_write-24    1.02ms ± 7%    1.08ms ± 6%  +5.17%  (p=0.000 n=20+19)
Sysbench/SQL/3node/oltp_read_write-24            12.9ms ± 3%    13.8ms ± 2%  +6.56%  (p=0.000 n=20+20)

name                                           old errs/op    new errs/op    delta
Sysbench/SQL/3node/oltp_read_write-24              0.00           0.00         ~     (all equal)
ParallelSysbench/SQL/3node/oltp_read_write-24      0.01 ±58%      0.01 ±71%    ~     (p=0.761 n=20+20)

name                                           old alloc/op   new alloc/op   delta
Sysbench/SQL/3node/oltp_read_write-24            1.59MB ± 3%    1.61MB ± 5%    ~     (p=0.050 n=15+20)
ParallelSysbench/SQL/3node/oltp_read_write-24    1.52MB ± 8%    1.58MB ± 7%  +4.05%  (p=0.006 n=20+20)

name                                           old allocs/op  new allocs/op  delta
Sysbench/SQL/3node/oltp_read_write-24             6.99k ± 2%     7.03k ± 1%    ~     (p=0.057 n=20+20)
ParallelSysbench/SQL/3node/oltp_read_write-24     6.58k ± 2%     6.57k ± 2%    ~     (p=0.381 n=18+20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge bors won't merge a PR with this label. X-perf-gain Microbenchmarks CI: Added if a performance gain is detected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants