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

Add information about compressed refs and SOA/LOA #683

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

SueChaplain
Copy link
Contributor

  • add to memory allocation topic
  • link to -Xmx topic for large page guidance
  • update -Xmx to add guidance for large pages

Signed-off-by: SueChaplain [email protected]

@SueChaplain
Copy link
Contributor Author

Jenkins doc stage

@SueChaplain SueChaplain changed the title Add information about compressed refs Add information about compressed refs and SOA/LOA Dec 10, 2020
@SueChaplain
Copy link
Contributor Author

Jenkins doc stage

@SueChaplain SueChaplain force-pushed the comp-refs branch 2 times, most recently from 8bc4d1f to 5bfbd3a Compare December 10, 2020 17:51
@SueChaplain
Copy link
Contributor Author

Jenkins doc stage

@SueChaplain
Copy link
Contributor Author

@dmitripivkine - can you help out here please. I've overwhelmed Aleks with other stuff. The LOA/SOA content is already reviewed/approved, but the compressed refs content needs checking. Staged at https://eclipse.github.io/openj9-docs-staging/683/allocator/

@SueChaplain
Copy link
Contributor Author

Jenkins doc stage

Compressed references are used by default when the maximum Java heap size is in the range 0 - 57 GB on AIX®, Linux®, and Windows® systems. The upper limit is also 57 GB on z/OS® systems that have APAR OA49416
installed (25 GB without APAR OA49416). All GC policies observe these limits except for the [`metronome`](gc.md#metronome-policy) policy, which can only support a heap size of up to 25 GB with compressed references.

When the VM uses compressed references, classes, threads, and monitors are stored in the lowest 4 GB of address space. However, this area of memory is also used by native libraries, the operating system, and for small Java heaps. If you receive native memory `OutOfMemoryError` exceptions when running with compressed references enabled, these errors might result from the lowest 4 GB of address space becoming full. Try specifying a large heap with the [`-Xmx`](xms.md) option, which puts the Java heap into a higher area of address space or using the [`-Xmcrs`](xmcrs.md) option to reserve space in the lowest 4 GB of address space for compressed references.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we can be more specific regarding OOM type: "out of native memory below 4GB bar". If we have description of possible types of OOM the wording should match obviously.


### Compressed references
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be aware that this paragraph might require editing in nearest future with introduction of Compressed/Full 64-bit Mixed build (planned for 0.25 release). This single build is going to replace current "Compressed" and "Large Heap" builds. The running mode "Compressed" or "Full 64-bit" will be selected automatically based on provided command line options.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted @dmitripivkine - thanks. I guess we will have a docs issue for this to ensure it isn't missed.

docs/xms.md Outdated
@@ -51,6 +49,13 @@ If the scavenger is disabled, `-Xms` ≥ `-Xmo`
See [Using -X command-line options](x_jvm_commands.md) for more information about the `<size>` parameter.
See [Default settings for the OpenJ9 VM](openj9_defaults.md) for more about default values.

### Calculating `-Xmx` for large pages

For z/OS&reg; and Linux&reg; on IBM Z&reg;, specifying an object heap size that is a multiple of the page size uses another page of memory. For example, if the page size is 2 GB, setting `-Xmx2G` actually uses 4 GB of memory. To avoid using more memory, make the heap size a little smaller than an integral number of pages by subtracting at least 16 bytes from the value that you set with the `-Xmx` option. The following examples are provided:
Copy link
Contributor

@dmitripivkine dmitripivkine Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure this is obsolete. The 8 bytes tail padding on z platforms has been removed. This entire paragraph is not needed any more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI Object Heap Tail Padding (allocation slightly more memory than requested) is done by performance improvement reason if -Xaggressive option is provided for all platforms. If size of physical page is smaller than 1GB one extra memory page is allocated. If size of physical page is equal or larger than 1GB no extra memory is allocated.

Copy link
Contributor Author

@SueChaplain SueChaplain Dec 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure this is obsolete.

Yes you are right, I didn't spot the tagging in the topic we were referencing. Removing this section and the bullet at the top that replaced the original incorrect reference:

If you are allocating the Java heap with large pages, see also -Xlp and
More effective heap usage using compressed references.

@dmitripivkine
Copy link
Contributor

In general may be make sense to add examples how -Xmcrs can be used to avoid native memory low 4GB bar OOM. It is confusing subject for customers

@SueChaplain SueChaplain requested review from pmhayward and removed request for pshipton and amicic December 17, 2020 11:06
@SueChaplain
Copy link
Contributor Author

@pmhayward - the changed content here has now been reviewed (SOA/LOA by Aleks, compressed refs by Dmitri). Please can you take a quick look and merge if you are happy. There are further structural changes I hope to put in before 0.24, so would like to proceed with these. Thanks.

- add to memory allocation topic
- link to -Xmx topic for large page guidance

Signed-off-by: SueChaplain <[email protected]>
@SueChaplain
Copy link
Contributor Author

Jenkins doc stage

@pmhayward
Copy link
Contributor

LGTM

@pmhayward pmhayward merged commit 52fd179 into eclipse-openj9:master Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants