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

kv: add microbenchmarks for replication ac v2 #128034

Closed
Tracked by #123509
kvoli opened this issue Jul 31, 2024 · 2 comments
Closed
Tracked by #123509

kv: add microbenchmarks for replication ac v2 #128034

kvoli opened this issue Jul 31, 2024 · 2 comments
Assignees
Labels
A-replication-admission-control-v2 Related to introduction of replication AC v2 C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team

Comments

@kvoli
Copy link
Collaborator

kvoli commented Jul 31, 2024

Similar to existing micro-benchmarks for v1, introduce a suite of microbenchmarks for replication ac v2.

The microbenchmarks should at a minimum test at the (1) integration and the (2) controller level.

Jira issue: CRDB-40746

Epic CRDB-37515

@kvoli kvoli added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-replication-admission-control-v2 Related to introduction of replication AC v2 labels Jul 31, 2024
@blathers-crl blathers-crl bot added the T-kv KV Team label Jul 31, 2024
@github-project-automation github-project-automation bot moved this to Incoming in KV Aug 28, 2024
sumeerbhola added a commit to sumeerbhola/cockroach that referenced this issue Sep 30, 2024
Make small logging tweaks in rac2 to avoid allocations caused by passing a
value through an interface{}.

On my m1 macbook:
BenchmarkFlowControlV2Basic/v2_enabled_when_leader_level=1         	    4840	    262413 ns/op	   96600 B/op	     267 allocs/op
BenchmarkFlowControlV2Basic/v2_enabled_when_leader_level=2         	    5752	    266266 ns/op	   96621 B/op	     267 allocs/op

RAC2 code isn't visible in the cpu profile and is < 1% of the memory
profile.

Informs cockroachdb#128034

Epic: CRDB-37515

Release note: None
@kvoli
Copy link
Collaborator Author

kvoli commented Oct 1, 2024

Existing v1 benchmark:

craig bot pushed a commit that referenced this issue Oct 1, 2024
131631: kvserver,rac2: add BenchmarkFlowControlV2Basic r=kvoli a=sumeerbhola

Make small logging tweaks in rac2 to avoid allocations caused by passing a value through an interface{}.

On my m1 macbook:
```
BenchmarkFlowControlV2Basic/v2_enabled_when_leader_level=1         	    4840	    262413 ns/op	   96600 B/op	     267 allocs/op
BenchmarkFlowControlV2Basic/v2_enabled_when_leader_level=2         	    5752	    266266 ns/op	   96621 B/op	     267 allocs/op
```

RAC2 code isn't visible in the cpu profile and is < 1% of the memory profile.

Informs #128034

Epic: CRDB-37515

Release note: None

131680: logictest: deflake TestLogic_union r=rafiss a=rafiss

Breaking up the large transaction should help avoid context cancellation errors.

fixes #131324
Release note: None

Co-authored-by: sumeerbhola <[email protected]>
Co-authored-by: Rafi Shamim <[email protected]>
@kvoli
Copy link
Collaborator Author

kvoli commented Oct 7, 2024

Closed by #131631.

See #128033 for further benchmarking.

@kvoli kvoli closed this as completed Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-replication-admission-control-v2 Related to introduction of replication AC v2 C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team
Projects
No open projects
Status: Incoming
Development

No branches or pull requests

2 participants