Added memory guard in Makefile#803
Open
chrngc wants to merge 1 commit intoopen-edge-platform:3.0-devfrom
Open
Conversation
Contributor
|
is this change tested in current build pipelines to ensure no impact to current CI? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge Checklist
All boxes should be checked before merging the PR
Description
During an event of OOM (out of memory) the build process will be stuck and random processes will be killed. The previous fix for this inconvenience was done by limiting the concurrent build and processing thread. This PR has added a systemctl memory guard into the Makefile to rerun the whole build process in a systemctl scope. Through this method the whole process tree spawned by the Makefile is able to be killed, either by user request or through the systemctl OOM kill process. This addition scans for current available machine memory and add a 2GB buffer, the minimum RAM required is 3GB. When the hard memory limit is reached OOM kill will be initiated and the whole build process tree will be killed.

Any Newly Introduced Dependencies
How Has This Been Tested?
Tested with full build, delta build, make iso, the process is able to be killed during an event of OOM, the whole build process is now able to be killed with systemctl instead of hard resetting the machine.