Impose a limit on the compilation queue size - #14056
Merged
Merged
Conversation
In corner cases the compilation queue size can grow to tens of thousand of entries. A large compilation queue adds overhead in terms of memory and CPU (inserting an entry requires queue scanning to find the proper place). To avoid these overheads, this commit imposes a limit for the compilation queue size. When the limit is reached, future asynchronous compilation requests for interpreted methods are rejected, and the invocation count for the methods in question is replenished. The rejected methods will continue to run interpreted until their invocation count reaches 0 again. Postponing such compilation requests is not expected to be detrimental to performance because those methods would have waited a very long time in the queue anyway. This compilation queue size limit does not apply to recompilation requests, to JNI methods (which don't use an invocation count) or to synchronous requests which need to be processed as soon as possible. The default value for the compilation queue size limit is set to 5000. This value can be changed with -Xjit:compilationQueueSizeLimit=<NNN> This feature can be disabled by setting a very large value for the compilation queue size limit. Partially addresses issue eclipse-openj9#13807 Signed-off-by: Marius Pirvu <mpirvu@ca.ibm.com>
Contributor
Author
|
jenkins compile all jdk11 |
Contributor
Author
|
jenkins test sanity.functional zlinux jdk17 |
Contributor
Author
|
@dsouzai Please review/merge this PR. Tests have passed. Thanks! |
dsouzai
reviewed
Dec 2, 2021
dsouzai
left a comment
Contributor
There was a problem hiding this comment.
LGTM, except for a question I had.
dsouzai
approved these changes
Dec 2, 2021
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.
In corner cases the compilation queue size can grow to tens of
thousand of entries. A large compilation queue adds overhead in
terms of memory and CPU (inserting an entry requires queue scanning
to find the proper place). To avoid these overheads, this commit
imposes a limit for the compilation queue size. When the limit is
reached, future asynchronous compilation requests for interpreted
methods are rejected, and the invocation count for the methods in
question is replenished. The rejected methods will continue to
run interpreted until their invocation count reaches 0 again.
Postponing such compilation requests is not expected to be detrimental
to performance because those methods would have waited a very
long time in the queue anyway.
This compilation queue size limit does not apply to recompilation
requests, to JNI methods (which don't use an invocation count) or
to synchronous requests which need to be processed as soon as possible.
The default value for the compilation queue size limit is set to 5000.
This value can be changed with -Xjit:compilationQueueSizeLimit=
This feature can be disabled by setting a very large value for the
compilation queue size limit.
Partially addresses issue #13807
Signed-off-by: Marius Pirvu mpirvu@ca.ibm.com