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 additional valid starting VM arguments #954

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tsmock
Copy link

@tsmock tsmock commented Aug 13, 2024

These were introduced in Java 8u191 (2018-10-16).

An important note on MinRAMPercentage: it is only used on ''small'' heap sizes (think <100M). It is primarily used for container applications.

The properties match the following requirements:

  • No " or % character (the double values do not include %)
  • Values include . (0x2E) and 0-9 (0x30-0x39); that is between 0x20 and 0x17E
  • The strings do not include \

While these properties were originally introduced for containers, they are also useful for desktop applications. Of specific note, MaxRAMPercentage is useful for applications that can have a small amount of data in memory to a large amount of data in memory.

Default values:

  • InitialRAMPercentage: 1.5625
  • MinRamPercentage: 50.0
  • MaxRamPercentage: 25.0

These were introduced in Java 8u191 (2018-10-16).

An important note on `MinRAMPercentage`: it is only used on ''small'' heap sizes
(think <100M). It is primarily used for container applications.

The properties match the following requirements:
* No `"` or `%` character (the double values do not include `%`)
* Values include `.` (0x2E) and 0-9 (0x30-0x39); that is between `0x20` and `0x17E`
* The strings do not include `\`

While these properties were originally introduced for containers, they are also
useful for desktop applications. Of specific note, `MaxRAMPercentage` is useful
for applications that can have a _small_ amount of data in memory to a _large_
amount of data in memory.

Default values:
* InitialRAMPercentage: 1.5625
* MinRamPercentage: 50.0
* MaxRamPercentage: 25.0
josmmirror pushed a commit to JOSM/josm that referenced this pull request Sep 9, 2024
This does not currently work for WebStart, see
AdoptOpenJDK/IcedTea-Web#954 .

As noted in the ticket, all supported MS Windows and Apple macOS machines have
4G+ of RAM. Linux machines don't have a baseline, and some have 1G or less. Where
we detect that a machine has <8G of memory in the linux start scripts, we don't
add the JVM parameters.

As a reminder to everyone reading the changelog: just because we ''ask'' for the
ability to use 75% of the system memory doesn't mean we will ''use'' all of that
memory. The JVM ''will'' free up unused memory for the rest of the system.

We additionally set the minimum memory allocation to 256m; while this ''can'' be
lower, that is for minimal amounts of data loaded. A clean JOSM install will use
99mb, for example. But once we add a minimal amount of data and a background
layer, static memory usage goes up to 161mb.

git-svn-id: https://josm.openstreetmap.de/svn/trunk@19215 0c6e7542-c601-0410-84e7-c038aed88b3b
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.

1 participant