Skip to content
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

InstantOn adjust heap size with restore machine #18168

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

kangyining
Copy link
Contributor

@kangyining kangyining commented Sep 20, 2023

Adjust heap size for CRIU restore
When we snapshot on a machine with higher physical memory and restore on one
with lower physical memory, the InstantOn JVM heap size will be larger than
a usual JVM run on the restore machine. And the momory usage will be abnormally
higher.

Update the extension with the correct physical memory limit and utilize the
existing softmax mechanism to solve the problem. Note we only update the softmax
if it is smaller than the Xmx size. If it is smaller than the
Xms size, then we upscale the softmx to match with the Xms size.

Related:
#17596

Detailed behavior table:
#18217 (comment)

Signed-off-by: Frank Kang [email protected]

@kangyining
Copy link
Contributor Author

might want to also update OMR side function just for consistency

@kangyining kangyining changed the title InstantOn align heap size with restore machine InstantOn align heap size with restore machine [WIP] Sep 20, 2023
@kangyining kangyining changed the title InstantOn align heap size with restore machine [WIP] [WIP] InstantOn align heap size with restore machine Sep 20, 2023
@kangyining kangyining self-assigned this Sep 20, 2023
@dmitripivkine dmitripivkine added comp:gc criu Used to track CRIU snapshot related work labels Sep 20, 2023
@amicic
Copy link
Contributor

amicic commented Sep 21, 2023

in subject, i'd say 'adjust' is more appropriate then 'align'

@kangyining kangyining changed the title [WIP] InstantOn align heap size with restore machine [WIP] InstantOn adjust heap size with restore machine Sep 21, 2023
@kangyining kangyining changed the title [WIP] InstantOn adjust heap size with restore machine InstantOn adjust heap size with restore machine Sep 22, 2023
@kangyining kangyining force-pushed the restoreMaxHeap branch 2 times, most recently from 65c64c6 to 16546ff Compare September 22, 2023 23:07
@amicic
Copy link
Contributor

amicic commented Sep 25, 2023

add some more info into PR description how we treat a couple of special cases (when we ignore and proceed vs when we fail)

@kangyining
Copy link
Contributor Author

add some more info into PR description how we treat a couple of special cases (when we ignore and proceed vs when we fail)

Updated, please take a look :)

@amicic
Copy link
Contributor

amicic commented Sep 25, 2023

jenkins test sanity aix,win jdk11

@kangyining kangyining force-pushed the restoreMaxHeap branch 3 times, most recently from d3fc950 to 4c1771f Compare November 16, 2023 18:08
runtime/oti/jvminit.h Outdated Show resolved Hide resolved
@amicic
Copy link
Contributor

amicic commented Nov 16, 2023

PR comment should match the commit comment

@kangyining kangyining force-pushed the restoreMaxHeap branch 2 times, most recently from 7f47e5a to 89bc6d3 Compare November 16, 2023 22:58
When we snapshot on a machine with higher physical memory and restore on one
with lower physical memory, the InstantOn JVM heap size will be larger than
a usual JVM run on the restore machine. And the momory usage will be abnormally
higher.

Update the extension with the correct physical memory limit and utilize the
existing softmax mechanism to solve the problem. Note we only update the softmax
if it is smaller than the Xmx size. If it is smaller than the
Xms size, then we upscale the softmx to match with the Xms size.

Related:
eclipse-openj9#17596

Detailed behavior table:
eclipse-openj9#18217 (comment)

Signed-off-by: Frank Kang [email protected]
@amicic
Copy link
Contributor

amicic commented Nov 20, 2023

jenkins test sanity.functional xLinux jdk21

@amicic
Copy link
Contributor

amicic commented Nov 20, 2023

jenkins test sanity win,aix jdk11

@amicic
Copy link
Contributor

amicic commented Nov 21, 2023

1 'elapse time' failure on Windows. Seems unrelated. Merging....

@amicic amicic merged commit 72c7366 into eclipse-openj9:master Nov 21, 2023
8 of 9 checks passed
kangyining added a commit to kangyining/openj9 that referenced this pull request Mar 12, 2024
Add supporting test cases and related testing scripts.

Softmx functionalities: eclipse-openj9#18168

Functional changes: eclipse-openj9#19037
kangyining added a commit to kangyining/openj9 that referenced this pull request Mar 13, 2024
Add supporting test cases and related testing scripts.

Softmx functionalities: eclipse-openj9#18168

Functional changes: eclipse-openj9#19037
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:gc criu Used to track CRIU snapshot related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants