-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
util: increase column's nullBitmap's capacity #12470
util: increase column's nullBitmap's capacity #12470
Conversation
Signed-off-by: H-ZeX <hzx20112012@gmail.com>
/rebuild |
Signed-off-by: H-ZeX <hzx20112012@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #12470 +/- ##
===========================================
Coverage 80.0167% 80.0167%
===========================================
Files 465 465
Lines 107330 107330
===========================================
Hits 85882 85882
Misses 14955 14955
Partials 6493 6493 |
/bench |
1 similar comment
/bench |
/bench/bench/bench/bench |
Signed-off-by: H-ZeX <hzx20112012@gmail.com>
4d3ad5b
to
a00865a
Compare
Signed-off-by: H-ZeX <hzx20112012@gmail.com>
/bench |
1 similar comment
/bench |
/run-all-tests |
/bench |
Benchmark Report
@@ Benchmark Diff @@
================================================================================
--- tidb: 4907685ed298c0efb4f09530cc7bf6c1e2843cd4
+++ tidb: c3aac21a6a9636298757c5160af81af2842476c8
tikv: 57aa7ba9edeb4132ba8bcef8ec916952ad343b0f
pd: 6e22c1c3cc7a266011d0a706a8cbfc2f6329af4a
================================================================================
oltp_update_non_index:
* QPS: 4866.03 ± 0.22% (std=7.41) delta: 0.18% (p=0.410)
* Latency p50: 26.30 ± 0.22% (std=0.04) delta: -0.18%
* Latency p99: 42.45 ± 4.89% (std=1.46) delta: 0.01%
oltp_insert:
* QPS: 4722.02 ± 0.03% (std=1.17) delta: 0.07% (p=0.472)
* Latency p50: 27.10 ± 0.05% (std=0.01) delta: -0.06%
* Latency p99: 49.45 ± 3.17% (std=1.16) delta: 0.49%
oltp_read_write:
* QPS: 15596.42 ± 0.65% (std=66.71) delta: -0.62% (p=0.094)
* Latency p50: 164.79 ± 0.29% (std=0.34) delta: 0.80%
* Latency p99: 326.17 ± 5.31% (std=10.86) delta: 1.87%
oltp_update_index:
* QPS: 4367.49 ± 0.22% (std=6.79) delta: 0.16% (p=0.556)
* Latency p50: 29.31 ± 0.23% (std=0.05) delta: -0.16%
* Latency p99: 55.59 ± 4.10% (std=1.49) delta: 2.00%
oltp_point_select:
* QPS: 42509.41 ± 0.89% (std=237.23) delta: -0.67% (p=0.128)
* Latency p50: 3.01 ± 1.00% (std=0.02) delta: 0.75%
* Latency p99: 9.48 ± 0.90% (std=0.08) delta: 0.91%
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PTAL @qw4990 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Your auto merge job has been accepted, waiting for 12862 |
/run-all-tests |
cherry pick to release-2.1 failed |
cherry pick to release-3.1 failed |
cherry pick to release-3.0 failed |
It seems that, not for sure, we failed to cherry-pick this commit to release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @XuHuaiyu PTAL. |
/run-cherry-picker |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.0 in PR #16141 |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.1 in PR #16142 |
Signed-off-by: H-ZeX hzx20112012@gmail.com
What problem does this PR solve?
nullBitmap
's capThe origin
nullBitmap
's capacity is a little small.When the
cap
param is(x<<3)+y(0<y<8)
, the nullBitMap's len is onlyx
, so the col that it can represent is(x<<3)
, which is small that the column number(x<<3)+y
, then this slice need to be expanded.For example, if there is
8+7=15
col, we need2
bytesnullBitmap
to represent it. But,15>>3
only get1
, so this slice need to be expanded to2
bytes.If the slice expands, the memory usage increased is not little, so I think adding one byte to
nullBitmap
is better and necessary.In
util/chunk/column.go
, there is many patterns like(x+7)>>3
such asWhat is changed and how it works?
x>>3
->((x+7)>>3)
Check List
Tests
existing unit test
Side effects
No.
Related changes
No.
Release note
TODO