-
Notifications
You must be signed in to change notification settings - Fork 771
RAM Class: Per-kind segment allocation and sizing #22530
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
Conversation
fyi @tajila |
runtime/vm/createramclass.cpp
Outdated
allocationRequests[RAM_STATICS_FRAGMENT].alignment = sizeof(U_64); | ||
allocationRequests[RAM_STATICS_FRAGMENT].alignedSize = totalStaticSlots * sizeof(UDATA); | ||
allocationRequests[RAM_STATICS_FRAGMENT].address = NULL; | ||
allocationRequests[RAM_STATICS_FRAGMENT].segmentKind = INFREQUENTLY_ACCESSED; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is frequently accessed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the rest is not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. Now, only RAM_STATICS_FRAGMENT
is tagged as FREQUENTLY_ACCESSED
, and the rest are tagged as INFREQUENTLY_ACCESSED
.
const UDATA headersPerSegment = 32; | ||
classAllocationIncrement = sizeof(J9Class) * headersPerSegment; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should alignment be considered here?
const UDATA headersPerSegment = 32; | |
classAllocationIncrement = sizeof(J9Class) * headersPerSegment; | |
UDATA mask = J9_REQUIRED_CLASS_ALIGNMENT - 1; | |
UDATA unitSegment = (sizeof(J9Class) + mask) & ~mask; | |
const UDATA headersPerSegment = 32; | |
classAllocationIncrement = unitSegment * headersPerSegment; |
Introduce distinct segment categories (SUB4G, FREQUENTLY_ACCESSED, INFREQUENTLY_ACCESSED). Separates hot vs. cold J9Class data for better memory efficiency. SUB4G segments are sized in multiples of aligned J9Class headers and tagged with MEMORY_TYPE_RAM_CLASS_SUB4G. Related: eclipse-openj9#20644 Co-authored-by: Nick Kamal <[email protected]> Signed-off-by: Babneet Singh <[email protected]>
jenkins test sanity alinux64 jdk17 |
jenkins test sanity.functional win jdk11 |
jenkins test sanity plinux jdk21 |
jenkins test sanity.functional win jdk11 |
@babsingh While I was tracking an older Liberty multiapp start-up regression I found out that this PR introduces a 21% start-up regression for that app. I confirmed the regression by reverting this commit. I will evaluate other apps as well (acmeairee8 does not seem to be affected). |
@tajila suggested that the fix may be fairly simple, such as increasing the size of sub-4G segments. I have begun drafting profiling changes per RAM class subtype in the javacore, which should help determine how to adjust segment sizes. |
I was chasing a 5% AcmeAir throughput regression when using JITServer and tracked it down to this PR. I don't yet understand how this PR can affect throughput with JITServer. |
Also PMA-raised issue https://github.ibm.com/runtimes/javanext/issues/548 mentions this issue as the regression source... |
Given the large number of regressions I think we should revert this PR for now. |
I am investigating the regressions. Other PRs (JFR and javacore updates) depend on this one, so a full revert is no longer straightforward. We will first spend a few weeks trying to resolve the regressions. If no workaround is found by the deadline given to me, we have a way to revert to the original behavior without rolling back the entire set. |
Introduce distinct segment categories (
SUB4G
,FREQUENTLY_ACCESSED
,INFREQUENTLY_ACCESSED
).Separates hot vs. cold
J9Class
data for better memory efficiency.SUB4G
segments are sized in multiples of alignedJ9Class
headersand tagged with
MEMORY_TYPE_RAM_CLASS_SUB4G
.Related: #20644
Depends on eclipse-omr/omr#7916