-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Global memory arbitration optimization (#11262)
Summary: This PR adds global memory arbitration optimization which decouples the frontend memory arbitration request and the backend slow memory arbitration processing. This enables to (1) remove the global locking inside the arbitrator for slow memory arbitration processing; (2) respect e2e memory arbitration time to avoid the potential node level deadlock that has happened in the production in the past; (3) backend optimization such as query level memory reclamation parallelism; (4) more advanced memory arbitration policy such as respect older query than younger when abort to allow the old slow query having a chance to run through and also make a more consistent abort choice across nodes in a distributed execution environment like Prestissimo instead of just relying on a query's current capacity. Will update existing memory design doc reflect the internal change in followup. Shadowed this in Prestissimo batch shadow and LBM stress test for reliability (for LBM stress test, the memory checker gets pushback signal from the jemalloc earlier). For performance measure by taking a spilled heavy query from Prestissimo batch production and running 25 of them in parallel, the landing time (the time of the first query to the end of the last query) has been reduced from 22mins down to 14 mins. The averaged execution time is reduced by half. The speedup is mostly from query level spill parallelism as well as the global locking reduction. The memory arbitration time has been reduced form 40k mins to 17k mins, and the driver queue time has been reduced from 19k mins to 7k mins. This stress test has flakiness but the reduction in memory arbitration wall-time is consistent across runs. Also the total amount of data to spill are also consistent across runs at around 22TB The followup needs to fix the issues on spilling execution path exposed by the stress test. Orri's review patch: P1654857111 Reviewed By: tanjialiang, oerling Differential Revision: D63902323
- Loading branch information
1 parent
f8da123
commit b4f7902
Showing
29 changed files
with
3,530 additions
and
2,662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.