Repository navigation
Conversation
…e executor when the future is ready Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
Benchmarks: Clickbench on NVME 📖Commits: PR How to read Verdict and Engines
Hot runs: geomean 1.009x ➖ · 43 queries × 7 targets (2↑ 7↓)Each cell is develop
Cold runs (first iteration): geomean 1.035x ➖ · 43 queries × 7 targets (5↑ 31↓)
No file size changes detected. |
Benchmarks: TPC-H SF=1 on NVME 📖Commits: PR How to read Verdict and Engines
Hot runs: geomean 1.001x ➖ · 22 queries × 7 targets (0↑ 1↓)Each cell is develop
Cold runs (first iteration): geomean 0.995x ➖ · 22 queries × 7 targets (3↑ 2↓)
No file size changes detected. |
Part of #9062
Every call to the current-thread runtime's
block_onenters smol'sExecutor::run, which registers the calling thread with the executor: a write lock on the executor's shared list of local queues, a new 512-slot queue, and another write lock to deregister on the way out. DuckDB polls each clone of a file'sScanStreamthroughblock_on, and many of those polls are ready at once. A thread that joins a file after its work is all claimed polls a clone that ends immediately, and on a 96-core runner most joins of a file with few parts are of that kind. This PR tests whether that per-entry registration, contended by every DuckDB thread, is what makes the short ClickBench queries slower on CI for both executors.block_on, and the iterator built on it, poll the future once before entering the executor and return directly when it is ready. A future that is not ready is polled again insideExecutor::run, which runs the runtime's tasks while the thread waits, as before. The gate is CI's DuckDB V1 and V2 ClickBench q01, q02, q07 and q26 back to about 1.0 against develop. The kill criterion is no change against #11717's own CI numbers on those queries (V2 1.16, 1.10, 1.11, 1.14; V1 1.30, 1.25, 1.20, 1.11), in which case runtime entry is not the cause and this is closed. #11891 tests the other candidate, bounding how many threads join a file, against the same numbers.Stacked on #11717
🤖 Generated with Claude Code