-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
sql/colexecerror: CatchVectorizedRuntimeError uses an expensive debug.Stack call #123235
Labels
branch-release-24.1
Used to mark GA and release blockers and technical advisories for 24.1
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
GA-blocker
O-support
Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs
T-sql-queries
SQL Queries Team
Comments
rafiss
added
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
O-support
Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs
T-sql-queries
SQL Queries Team
labels
Apr 29, 2024
michae2
added a commit
to michae2/cockroach
that referenced
this issue
Apr 30, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
Apr 30, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
Apr 30, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
Apr 30, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 1, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 1, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 1, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 1, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
yuzefovich
pushed a commit
to yuzefovich/cockroach
that referenced
this issue
May 1, 2024
Informs: cockroachdb#123235 Release note: None
yuzefovich
pushed a commit
to yuzefovich/cockroach
that referenced
this issue
May 1, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
craig bot
pushed a commit
that referenced
this issue
May 1, 2024
122899: roachtest: add node-kill operation r=renatolabs a=itsbilal This change adds a node-kill operation with 4 variants: one that drains and one that doesn't x {SIGKILL, SIGTERM}. Epic: none Release note: None 122918: backupccl: prevent OR from linking in virtual file pointing to empty key space r=dt a=msbutler See individual commits. 123277: colexecerror: avoid debug.Stack in CatchVectorizedRuntimeError r=DrewKimball,petermattis,mgartner,yuzefovich a=michae2 See individual commits for details. Benchmarks before and after the change: ``` │ /tmp/tmp.PrzUglo6GH/bench.catch~3 │ /tmp/tmp.PrzUglo6GH/bench.catch │ │ sec/op │ sec/op vs base │ CatchVectorizedRuntimeError/noError-12 0.4033n ± ∞ ¹ 0.4224n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/expected-12 40831.00n ± ∞ ¹ 98.55n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/storage-12 41302.00n ± ∞ ¹ 99.54n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/contextCanceled-12 40947.00n ± ∞ ¹ 99.78n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/internalWithCode-12 41088.0n ± ∞ ¹ 474.6n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/internal-12 41032.0n ± ∞ ¹ 943.0n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/runtime-12 37.094µ ± ∞ ¹ 1.091µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/noError-12 43.83µ ± ∞ ¹ 43.63µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/expectedWithCode-12 1234.24µ ± ∞ ¹ 48.27µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/expectedAssertion-12 1182.11µ ± ∞ ¹ 88.12µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/internalAssertion-12 1211.83µ ± ∞ ¹ 77.58µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/internalIndexOutOfRange-12 1227.76µ ± ∞ ¹ 82.40µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/internalDivideByZero-12 1224.45µ ± ∞ ¹ 81.01µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/contextCanceled-12 1265.30µ ± ∞ ¹ 44.83µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/noError-12 43.78µ ± ∞ ¹ 42.83µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/expectedWithCode-12 1210.98µ ± ∞ ¹ 48.41µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/expectedAssertion-12 1187.21µ ± ∞ ¹ 84.70µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/internalAssertion-12 1224.62µ ± ∞ ¹ 73.85µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/internalIndexOutOfRange-12 1224.56µ ± ∞ ¹ 81.39µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/internalDivideByZero-12 1259.05µ ± ∞ ¹ 80.63µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/contextCanceled-12 1262.44µ ± ∞ ¹ 47.13µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/noError-12 44.98µ ± ∞ ¹ 43.53µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/expectedWithCode-12 1231.37µ ± ∞ ¹ 48.65µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/expectedAssertion-12 1201.74µ ± ∞ ¹ 97.23µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/internalAssertion-12 1249.63µ ± ∞ ¹ 80.46µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/internalIndexOutOfRange-12 1257.86µ ± ∞ ¹ 77.83µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/internalDivideByZero-12 1251.79µ ± ∞ ¹ 82.22µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/contextCanceled-12 1271.82µ ± ∞ ¹ 51.19µ ± ∞ ¹ ~ (p=1.000 n=1) ² geomean 243.2µ 13.09µ -94.62% ¹ need >= 6 samples for confidence interval at level 0.95 ² need >= 4 samples to detect a difference at alpha level 0.05 │ /tmp/tmp.PrzUglo6GH/bench.catch~3 │ /tmp/tmp.PrzUglo6GH/bench.catch │ │ B/op │ B/op vs base │ CatchVectorizedRuntimeError/noError-12 0.000 ± ∞ ¹ 0.000 ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/expected-12 9834.00 ± ∞ ¹ 32.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/storage-12 8880.00 ± ∞ ¹ 32.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/contextCanceled-12 8840.00 ± ∞ ¹ 40.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internalWithCode-12 9.586Ki ± ∞ ¹ 1.511Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internal-12 10.479Ki ± ∞ ¹ 2.961Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/runtime-12 10.964Ki ± ∞ ¹ 2.656Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/noError-12 81.75Ki ± ∞ ¹ 81.71Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/expectedWithCode-12 143.04Ki ± ∞ ¹ 85.28Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/expectedAssertion-12 362.7Ki ± ∞ ¹ 304.5Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalAssertion-12 304.2Ki ± ∞ ¹ 245.3Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalIndexOutOfRange-12 313.0Ki ± ∞ ¹ 267.2Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalDivideByZero-12 308.3Ki ± ∞ ¹ 260.7Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/contextCanceled-12 128.96Ki ± ∞ ¹ 80.60Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/noError-12 81.21Ki ± ∞ ¹ 81.25Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/expectedWithCode-12 136.02Ki ± ∞ ¹ 84.99Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/expectedAssertion-12 362.0Ki ± ∞ ¹ 302.9Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalAssertion-12 291.4Ki ± ∞ ¹ 244.5Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalIndexOutOfRange-12 317.1Ki ± ∞ ¹ 267.0Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalDivideByZero-12 308.4Ki ± ∞ ¹ 260.4Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/contextCanceled-12 145.34Ki ± ∞ ¹ 81.73Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/noError-12 81.33Ki ± ∞ ¹ 81.24Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedWithCode-12 137.49Ki ± ∞ ¹ 85.05Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedAssertion-12 364.7Ki ± ∞ ¹ 305.8Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalAssertion-12 318.4Ki ± ∞ ¹ 244.5Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalIndexOutOfRange-12 315.8Ki ± ∞ ¹ 265.4Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalDivideByZero-12 310.9Ki ± ∞ ¹ 260.2Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/contextCanceled-12 133.20Ki ± ∞ ¹ 80.53Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ geomean ⁴ -61.19% ⁴ ¹ need >= 6 samples for confidence interval at level 0.95 ² all samples are equal ³ need >= 4 samples to detect a difference at alpha level 0.05 ⁴ summaries must be >0 to compute geomean │ /tmp/tmp.PrzUglo6GH/bench.catch~3 │ /tmp/tmp.PrzUglo6GH/bench.catch │ │ allocs/op │ allocs/op vs base │ CatchVectorizedRuntimeError/noError-12 0.000 ± ∞ ¹ 0.000 ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/expected-12 36.000 ± ∞ ¹ 3.000 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/storage-12 11.000 ± ∞ ¹ 3.000 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/contextCanceled-12 11.000 ± ∞ ¹ 4.000 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internalWithCode-12 35.00 ± ∞ ¹ 37.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internal-12 46.00 ± ∞ ¹ 59.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/runtime-12 58.00 ± ∞ ¹ 51.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/noError-12 838.0 ± ∞ ¹ 838.0 ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/expectedWithCode-12 1110.0 ± ∞ ¹ 950.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/expectedAssertion-12 1.736k ± ∞ ¹ 1.581k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalAssertion-12 1.285k ± ∞ ¹ 1.228k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalIndexOutOfRange-12 1.418k ± ∞ ¹ 1.425k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalDivideByZero-12 1.413k ± ∞ ¹ 1.411k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/contextCanceled-12 880.0 ± ∞ ¹ 865.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/noError-12 836.0 ± ∞ ¹ 836.0 ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/expectedWithCode-12 1012.0 ± ∞ ¹ 949.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/expectedAssertion-12 1.744k ± ∞ ¹ 1.572k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalAssertion-12 1.201k ± ∞ ¹ 1.228k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalIndexOutOfRange-12 1.518k ± ∞ ¹ 1.424k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalDivideByZero-12 1.429k ± ∞ ¹ 1.411k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/contextCanceled-12 993.0 ± ∞ ¹ 865.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/noError-12 838.0 ± ∞ ¹ 837.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedWithCode-12 1038.0 ± ∞ ¹ 951.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedAssertion-12 1.782k ± ∞ ¹ 1.594k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalAssertion-12 1.471k ± ∞ ¹ 1.231k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalIndexOutOfRange-12 1.476k ± ∞ ¹ 1.417k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalDivideByZero-12 1.471k ± ∞ ¹ 1.411k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/contextCanceled-12 960.0 ± ∞ ¹ 867.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ geomean ⁴ -18.86% ⁴ ¹ need >= 6 samples for confidence interval at level 0.95 ² all samples are equal ³ need >= 4 samples to detect a difference at alpha level 0.05 ⁴ summaries must be >0 to compute geomean ``` Fixes: #123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts. Co-authored-by: Drew Kimball <drewk@cockroachlabs.com> 123343: colcontainer: close the file in error cases r=yuzefovich a=yuzefovich This commit fixes a possible file descriptor leak where the disk queue could forget to close the "write file" in some error paths. In particular: - in `rotateFile` we create a fresh file that we store to `writeFile` only after having done some cleanup. Any error during that cleanup would previously leak the new file. - in `Close` if we hit some error before we got to `writeFile.Close`, it could get leaked. Fixes: #122766. Release note: None 123398: roachtest: use correct systemd unit name r=renatolabs a=jbowens Fix a couple roachtests that hardcoded an incorrect systemd unit name. Fixes #123353. Epic: none Release note: none Co-authored-by: Bilal Akhtar <bilal@cockroachlabs.com> Co-authored-by: Michael Butler <butler@cockroachlabs.com> Co-authored-by: Michael Erickson <michae2@cockroachlabs.com> Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com> Co-authored-by: Jackson Owens <jackson@cockroachlabs.com>
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
craig bot
pushed a commit
that referenced
this issue
May 2, 2024
123277: colexecerror: avoid debug.Stack in CatchVectorizedRuntimeError r=DrewKimball,petermattis,mgartner,yuzefovich a=michae2 See individual commits for details. Benchmarks before and after the change: ``` │ /tmp/tmp.PrzUglo6GH/bench.catch~3 │ /tmp/tmp.PrzUglo6GH/bench.catch │ │ sec/op │ sec/op vs base │ CatchVectorizedRuntimeError/noError-12 0.4033n ± ∞ ¹ 0.4224n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/expected-12 40831.00n ± ∞ ¹ 98.55n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/storage-12 41302.00n ± ∞ ¹ 99.54n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/contextCanceled-12 40947.00n ± ∞ ¹ 99.78n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/internalWithCode-12 41088.0n ± ∞ ¹ 474.6n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/internal-12 41032.0n ± ∞ ¹ 943.0n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/runtime-12 37.094µ ± ∞ ¹ 1.091µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/noError-12 43.83µ ± ∞ ¹ 43.63µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/expectedWithCode-12 1234.24µ ± ∞ ¹ 48.27µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/expectedAssertion-12 1182.11µ ± ∞ ¹ 88.12µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/internalAssertion-12 1211.83µ ± ∞ ¹ 77.58µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/internalIndexOutOfRange-12 1227.76µ ± ∞ ¹ 82.40µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/internalDivideByZero-12 1224.45µ ± ∞ ¹ 81.01µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/contextCanceled-12 1265.30µ ± ∞ ¹ 44.83µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/noError-12 43.78µ ± ∞ ¹ 42.83µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/expectedWithCode-12 1210.98µ ± ∞ ¹ 48.41µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/expectedAssertion-12 1187.21µ ± ∞ ¹ 84.70µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/internalAssertion-12 1224.62µ ± ∞ ¹ 73.85µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/internalIndexOutOfRange-12 1224.56µ ± ∞ ¹ 81.39µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/internalDivideByZero-12 1259.05µ ± ∞ ¹ 80.63µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/contextCanceled-12 1262.44µ ± ∞ ¹ 47.13µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/noError-12 44.98µ ± ∞ ¹ 43.53µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/expectedWithCode-12 1231.37µ ± ∞ ¹ 48.65µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/expectedAssertion-12 1201.74µ ± ∞ ¹ 97.23µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/internalAssertion-12 1249.63µ ± ∞ ¹ 80.46µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/internalIndexOutOfRange-12 1257.86µ ± ∞ ¹ 77.83µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/internalDivideByZero-12 1251.79µ ± ∞ ¹ 82.22µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/contextCanceled-12 1271.82µ ± ∞ ¹ 51.19µ ± ∞ ¹ ~ (p=1.000 n=1) ² geomean 243.2µ 13.09µ -94.62% ¹ need >= 6 samples for confidence interval at level 0.95 ² need >= 4 samples to detect a difference at alpha level 0.05 │ /tmp/tmp.PrzUglo6GH/bench.catch~3 │ /tmp/tmp.PrzUglo6GH/bench.catch │ │ B/op │ B/op vs base │ CatchVectorizedRuntimeError/noError-12 0.000 ± ∞ ¹ 0.000 ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/expected-12 9834.00 ± ∞ ¹ 32.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/storage-12 8880.00 ± ∞ ¹ 32.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/contextCanceled-12 8840.00 ± ∞ ¹ 40.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internalWithCode-12 9.586Ki ± ∞ ¹ 1.511Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internal-12 10.479Ki ± ∞ ¹ 2.961Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/runtime-12 10.964Ki ± ∞ ¹ 2.656Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/noError-12 81.75Ki ± ∞ ¹ 81.71Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/expectedWithCode-12 143.04Ki ± ∞ ¹ 85.28Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/expectedAssertion-12 362.7Ki ± ∞ ¹ 304.5Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalAssertion-12 304.2Ki ± ∞ ¹ 245.3Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalIndexOutOfRange-12 313.0Ki ± ∞ ¹ 267.2Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalDivideByZero-12 308.3Ki ± ∞ ¹ 260.7Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/contextCanceled-12 128.96Ki ± ∞ ¹ 80.60Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/noError-12 81.21Ki ± ∞ ¹ 81.25Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/expectedWithCode-12 136.02Ki ± ∞ ¹ 84.99Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/expectedAssertion-12 362.0Ki ± ∞ ¹ 302.9Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalAssertion-12 291.4Ki ± ∞ ¹ 244.5Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalIndexOutOfRange-12 317.1Ki ± ∞ ¹ 267.0Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalDivideByZero-12 308.4Ki ± ∞ ¹ 260.4Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/contextCanceled-12 145.34Ki ± ∞ ¹ 81.73Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/noError-12 81.33Ki ± ∞ ¹ 81.24Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedWithCode-12 137.49Ki ± ∞ ¹ 85.05Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedAssertion-12 364.7Ki ± ∞ ¹ 305.8Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalAssertion-12 318.4Ki ± ∞ ¹ 244.5Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalIndexOutOfRange-12 315.8Ki ± ∞ ¹ 265.4Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalDivideByZero-12 310.9Ki ± ∞ ¹ 260.2Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/contextCanceled-12 133.20Ki ± ∞ ¹ 80.53Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ geomean ⁴ -61.19% ⁴ ¹ need >= 6 samples for confidence interval at level 0.95 ² all samples are equal ³ need >= 4 samples to detect a difference at alpha level 0.05 ⁴ summaries must be >0 to compute geomean │ /tmp/tmp.PrzUglo6GH/bench.catch~3 │ /tmp/tmp.PrzUglo6GH/bench.catch │ │ allocs/op │ allocs/op vs base │ CatchVectorizedRuntimeError/noError-12 0.000 ± ∞ ¹ 0.000 ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/expected-12 36.000 ± ∞ ¹ 3.000 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/storage-12 11.000 ± ∞ ¹ 3.000 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/contextCanceled-12 11.000 ± ∞ ¹ 4.000 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internalWithCode-12 35.00 ± ∞ ¹ 37.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internal-12 46.00 ± ∞ ¹ 59.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/runtime-12 58.00 ± ∞ ¹ 51.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/noError-12 838.0 ± ∞ ¹ 838.0 ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/expectedWithCode-12 1110.0 ± ∞ ¹ 950.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/expectedAssertion-12 1.736k ± ∞ ¹ 1.581k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalAssertion-12 1.285k ± ∞ ¹ 1.228k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalIndexOutOfRange-12 1.418k ± ∞ ¹ 1.425k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalDivideByZero-12 1.413k ± ∞ ¹ 1.411k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/contextCanceled-12 880.0 ± ∞ ¹ 865.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/noError-12 836.0 ± ∞ ¹ 836.0 ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/expectedWithCode-12 1012.0 ± ∞ ¹ 949.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/expectedAssertion-12 1.744k ± ∞ ¹ 1.572k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalAssertion-12 1.201k ± ∞ ¹ 1.228k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalIndexOutOfRange-12 1.518k ± ∞ ¹ 1.424k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalDivideByZero-12 1.429k ± ∞ ¹ 1.411k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/contextCanceled-12 993.0 ± ∞ ¹ 865.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/noError-12 838.0 ± ∞ ¹ 837.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedWithCode-12 1038.0 ± ∞ ¹ 951.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedAssertion-12 1.782k ± ∞ ¹ 1.594k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalAssertion-12 1.471k ± ∞ ¹ 1.231k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalIndexOutOfRange-12 1.476k ± ∞ ¹ 1.417k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalDivideByZero-12 1.471k ± ∞ ¹ 1.411k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/contextCanceled-12 960.0 ± ∞ ¹ 867.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ geomean ⁴ -18.86% ⁴ ¹ need >= 6 samples for confidence interval at level 0.95 ² all samples are equal ³ need >= 4 samples to detect a difference at alpha level 0.05 ⁴ summaries must be >0 to compute geomean ``` Fixes: #123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts. Co-authored-by: Drew Kimball <drewk@cockroachlabs.com> Co-authored-by: Michael Erickson <michae2@cockroachlabs.com>
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
craig bot
pushed a commit
that referenced
this issue
May 2, 2024
123277: colexecerror: avoid debug.Stack in CatchVectorizedRuntimeError r=DrewKimball,petermattis,mgartner,yuzefovich a=michae2 See individual commits for details. Benchmarks before and after the change: ``` │ /tmp/tmp.PrzUglo6GH/bench.catch~3 │ /tmp/tmp.PrzUglo6GH/bench.catch │ │ sec/op │ sec/op vs base │ CatchVectorizedRuntimeError/noError-12 0.4033n ± ∞ ¹ 0.4224n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/expected-12 40831.00n ± ∞ ¹ 98.55n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/storage-12 41302.00n ± ∞ ¹ 99.54n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/contextCanceled-12 40947.00n ± ∞ ¹ 99.78n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/internalWithCode-12 41088.0n ± ∞ ¹ 474.6n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/internal-12 41032.0n ± ∞ ¹ 943.0n ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/runtime-12 37.094µ ± ∞ ¹ 1.091µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/noError-12 43.83µ ± ∞ ¹ 43.63µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/expectedWithCode-12 1234.24µ ± ∞ ¹ 48.27µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/expectedAssertion-12 1182.11µ ± ∞ ¹ 88.12µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/internalAssertion-12 1211.83µ ± ∞ ¹ 77.58µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/internalIndexOutOfRange-12 1227.76µ ± ∞ ¹ 82.40µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/internalDivideByZero-12 1224.45µ ± ∞ ¹ 81.01µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/contextCanceled-12 1265.30µ ± ∞ ¹ 44.83µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/noError-12 43.78µ ± ∞ ¹ 42.83µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/expectedWithCode-12 1210.98µ ± ∞ ¹ 48.41µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/expectedAssertion-12 1187.21µ ± ∞ ¹ 84.70µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/internalAssertion-12 1224.62µ ± ∞ ¹ 73.85µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/internalIndexOutOfRange-12 1224.56µ ± ∞ ¹ 81.39µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/internalDivideByZero-12 1259.05µ ± ∞ ¹ 80.63µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/contextCanceled-12 1262.44µ ± ∞ ¹ 47.13µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/noError-12 44.98µ ± ∞ ¹ 43.53µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/expectedWithCode-12 1231.37µ ± ∞ ¹ 48.65µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/expectedAssertion-12 1201.74µ ± ∞ ¹ 97.23µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/internalAssertion-12 1249.63µ ± ∞ ¹ 80.46µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/internalIndexOutOfRange-12 1257.86µ ± ∞ ¹ 77.83µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/internalDivideByZero-12 1251.79µ ± ∞ ¹ 82.22µ ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=600/contextCanceled-12 1271.82µ ± ∞ ¹ 51.19µ ± ∞ ¹ ~ (p=1.000 n=1) ² geomean 243.2µ 13.09µ -94.62% ¹ need >= 6 samples for confidence interval at level 0.95 ² need >= 4 samples to detect a difference at alpha level 0.05 │ /tmp/tmp.PrzUglo6GH/bench.catch~3 │ /tmp/tmp.PrzUglo6GH/bench.catch │ │ B/op │ B/op vs base │ CatchVectorizedRuntimeError/noError-12 0.000 ± ∞ ¹ 0.000 ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/expected-12 9834.00 ± ∞ ¹ 32.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/storage-12 8880.00 ± ∞ ¹ 32.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/contextCanceled-12 8840.00 ± ∞ ¹ 40.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internalWithCode-12 9.586Ki ± ∞ ¹ 1.511Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internal-12 10.479Ki ± ∞ ¹ 2.961Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/runtime-12 10.964Ki ± ∞ ¹ 2.656Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/noError-12 81.75Ki ± ∞ ¹ 81.71Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/expectedWithCode-12 143.04Ki ± ∞ ¹ 85.28Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/expectedAssertion-12 362.7Ki ± ∞ ¹ 304.5Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalAssertion-12 304.2Ki ± ∞ ¹ 245.3Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalIndexOutOfRange-12 313.0Ki ± ∞ ¹ 267.2Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalDivideByZero-12 308.3Ki ± ∞ ¹ 260.7Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/contextCanceled-12 128.96Ki ± ∞ ¹ 80.60Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/noError-12 81.21Ki ± ∞ ¹ 81.25Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/expectedWithCode-12 136.02Ki ± ∞ ¹ 84.99Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/expectedAssertion-12 362.0Ki ± ∞ ¹ 302.9Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalAssertion-12 291.4Ki ± ∞ ¹ 244.5Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalIndexOutOfRange-12 317.1Ki ± ∞ ¹ 267.0Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalDivideByZero-12 308.4Ki ± ∞ ¹ 260.4Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/contextCanceled-12 145.34Ki ± ∞ ¹ 81.73Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/noError-12 81.33Ki ± ∞ ¹ 81.24Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedWithCode-12 137.49Ki ± ∞ ¹ 85.05Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedAssertion-12 364.7Ki ± ∞ ¹ 305.8Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalAssertion-12 318.4Ki ± ∞ ¹ 244.5Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalIndexOutOfRange-12 315.8Ki ± ∞ ¹ 265.4Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalDivideByZero-12 310.9Ki ± ∞ ¹ 260.2Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/contextCanceled-12 133.20Ki ± ∞ ¹ 80.53Ki ± ∞ ¹ ~ (p=1.000 n=1) ³ geomean ⁴ -61.19% ⁴ ¹ need >= 6 samples for confidence interval at level 0.95 ² all samples are equal ³ need >= 4 samples to detect a difference at alpha level 0.05 ⁴ summaries must be >0 to compute geomean │ /tmp/tmp.PrzUglo6GH/bench.catch~3 │ /tmp/tmp.PrzUglo6GH/bench.catch │ │ allocs/op │ allocs/op vs base │ CatchVectorizedRuntimeError/noError-12 0.000 ± ∞ ¹ 0.000 ± ∞ ¹ ~ (p=1.000 n=1) ² CatchVectorizedRuntimeError/expected-12 36.000 ± ∞ ¹ 3.000 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/storage-12 11.000 ± ∞ ¹ 3.000 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/contextCanceled-12 11.000 ± ∞ ¹ 4.000 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internalWithCode-12 35.00 ± ∞ ¹ 37.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/internal-12 46.00 ± ∞ ¹ 59.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ CatchVectorizedRuntimeError/runtime-12 58.00 ± ∞ ¹ 51.00 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/noError-12 838.0 ± ∞ ¹ 838.0 ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=12/expectedWithCode-12 1110.0 ± ∞ ¹ 950.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/expectedAssertion-12 1.736k ± ∞ ¹ 1.581k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalAssertion-12 1.285k ± ∞ ¹ 1.228k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalIndexOutOfRange-12 1.418k ± ∞ ¹ 1.425k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/internalDivideByZero-12 1.413k ± ∞ ¹ 1.411k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=12/contextCanceled-12 880.0 ± ∞ ¹ 865.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/noError-12 836.0 ± ∞ ¹ 836.0 ± ∞ ¹ ~ (p=1.000 n=1) ² SQLCatchVectorizedRuntimeError/conns=240/expectedWithCode-12 1012.0 ± ∞ ¹ 949.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/expectedAssertion-12 1.744k ± ∞ ¹ 1.572k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalAssertion-12 1.201k ± ∞ ¹ 1.228k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalIndexOutOfRange-12 1.518k ± ∞ ¹ 1.424k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/internalDivideByZero-12 1.429k ± ∞ ¹ 1.411k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=240/contextCanceled-12 993.0 ± ∞ ¹ 865.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/noError-12 838.0 ± ∞ ¹ 837.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedWithCode-12 1038.0 ± ∞ ¹ 951.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/expectedAssertion-12 1.782k ± ∞ ¹ 1.594k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalAssertion-12 1.471k ± ∞ ¹ 1.231k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalIndexOutOfRange-12 1.476k ± ∞ ¹ 1.417k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/internalDivideByZero-12 1.471k ± ∞ ¹ 1.411k ± ∞ ¹ ~ (p=1.000 n=1) ³ SQLCatchVectorizedRuntimeError/conns=600/contextCanceled-12 960.0 ± ∞ ¹ 867.0 ± ∞ ¹ ~ (p=1.000 n=1) ³ geomean ⁴ -18.86% ⁴ ¹ need >= 6 samples for confidence interval at level 0.95 ² all samples are equal ³ need >= 4 samples to detect a difference at alpha level 0.05 ⁴ summaries must be >0 to compute geomean ``` Fixes: #123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts. Co-authored-by: Drew Kimball <drewk@cockroachlabs.com> Co-authored-by: Michael Erickson <michae2@cockroachlabs.com>
blathers-crl bot
pushed a commit
that referenced
this issue
May 2, 2024
Informs: #123235 Release note: None
blathers-crl bot
pushed a commit
that referenced
this issue
May 2, 2024
Fixes: #123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 2, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
michae2
added
GA-blocker
branch-release-24.1
Used to mark GA and release blockers and technical advisories for 24.1
labels
May 2, 2024
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 3, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 3, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 3, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 3, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 6, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 6, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 6, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 6, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 6, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 6, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 6, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 6, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 6, 2024
Informs: cockroachdb#123235 Release note: None
michae2
added a commit
to michae2/cockroach
that referenced
this issue
May 6, 2024
Fixes: cockroachdb#123235 Release note (performance improvement): Make error handling in the vectorized execution engine much cheaper. This should help avoid bad metastable regimes perpetuated by statement timeout handling consuming all CPU time, leading to more statement timeouts.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
branch-release-24.1
Used to mark GA and release blockers and technical advisories for 24.1
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
GA-blocker
O-support
Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs
T-sql-queries
SQL Queries Team
Describe the problem
The usage of
debug.Stack
here is problematic:cockroach/pkg/sql/colexecerror/error.go
Line 41 in 81569be
During a recent customer outage, we captured this profile:
(Full profile available here.)
In the outage, the CRDB behavior was that once CPU usage became high enough, response times started to go up, and execution throughput went down. Notably, the throughput/latency impact is correlated with a large increase in concurrent open transactions. See the support ticket for more details.
The main part of the issue here appears to be that the usage of
debug.Stack
causes lock contention due to the system calls that rely onfutex
.To Reproduce
This can be seen with the
admission-control/tpcc-severe-overload
test. See these notes.Expected behavior
Make the CatchVectorizedRuntimeError less expensive.
There are two main ideas:
ExpectedError
already wraps many errors with a known type:cockroach/pkg/sql/colexecerror/error.go
Lines 202 to 204 in 81569be
InternalError
function could do the same.runtime.Callers
andruntime.CallersFrames
instead ofdebug.Stack
. It should be much cheaper. (See runtime: Stack() calls lock against each other unnecessarily, even when single-goroutine golang/go#56400 for some discussion on whydebug.Stack
is slower.)In addition to these two changes, there might be ways to improve the function even more. We can use this issue to track those ideas as well.
@michae2 has some early benchmark results from making some of these changes.
Jira issue: CRDB-38252
The text was updated successfully, but these errors were encountered: