-
Notifications
You must be signed in to change notification settings - Fork 300
De-prioritize query parsing and planning during warmup process #7223
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
Conversation
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: c3657d448b01a47a013051bb |
This comment has been minimized.
This comment has been minimized.
CI performance tests
|
As a general comment (and not an immediate action item on this PR), it's worth noting that warmup currently happens sequentially, so if there's more than 1 worker it can already not saturate the pool. If parsing is deprioritised, planning will in effect also be deprioritised because everything is in sequence. If we did make warmup work in parallel (which would probably be a good thing), i think it could be better to deprioritise both, but have planning one level more important than parsing in warmup. |
NB: I don't love that I added |
Query planning has to be scheduled at some time even if parsing has to happen first. When a user has set their compute job threads very low we need the planning during warmup to not interfere with serving requests. |
Generally looks great, do we have any existing tests for the query plan warmup that we can extend? |
@BrynCooke I added two tests - one to check that the relative priorities of the compute queue job types are respected, and one to make sure the query plan warm up process works. Let me know if you'd like any additional coverage! |
Was this reverted? I don’t see it happening in the diff |
@SimonSapin The second parse that I removed is here - this was being called after the first parse here. |
This PR lowers the priority of query parsing and planning during the warmup process. This will help reduce the impact of warmup on serving requests.
Open considerations:
I only changed the priority of parsing (not planning). This was for a few reasons - (1) changing the priority of planning will be much more complicated, and (2) I was worried that lowering the planning priority would excessively throttle the warmup and it would take way too long to complete. I'm happy to work on the planning side as well if desired.I received feedback that it would be better to have query planning also be deprioritized, so added that in 95caaa11.
SpecError
, that error will not be inserted into the cache. My suspicion is that skipping the second parsing for all cached queries will outperform the benefit of having theSpecError
cached, but I'm happy to revert that if desired.Fixes #3771
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩