-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the race between memory release and task reclaim (#8086)
Summary: There is race between memory release and task reclaim that cause a unnecessary local OOM in Meta internal shadowing test: T1. memory arbitration triggers from a query T2. memory arbitrator find the memory grow request exceeds its the query memory capacity limit so starts to reclaim from this query T3. one or more operators from this query releases a large chunk of memory which has sufficient space to satisfy the memory arbitration request T4. the memory arbitration wait for the task to complete and then reclaim from each of its operator T5. however all the operators have no memory to reclaim (T3 has freed all the reclaimable memory) T6. memory arbitrator found nothing has been reclaimed from this query and fail the memory arbitration request. However, there is free memory after T3. This PR fixes this issue by shrink the query memory pool after the task reclaim pauses the task. Verify with table writer which is the case found in Meta shadowing test. Also improve the memory arbitration logging a bit. Pull Request resolved: #8086 Reviewed By: mbasmanova Differential Revision: D52244993 Pulled By: xiaoxmeng fbshipit-source-id: 846a02ba0580eeff89f2a6b6ffdba82a307b51f0
- Loading branch information
1 parent
aaaa079
commit fa6de06
Showing
4 changed files
with
72 additions
and
4 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