You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds more details documentation about the memory settings that can
and can not be supplied to the Java buildpack and if the setting is likely to
effect the memory weighting in relation to the total memory provided to an
application.
[#78798560]
Copy file name to clipboardExpand all lines: docs/framework-java_opts.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,5 +35,43 @@ from_environment: false
35
35
java_opts: -Xloggc:$PWD/beacon_gc.log -verbose:gc
36
36
```
37
37
38
+
## Memory Settings
39
+
40
+
The following `JAVA_OPTS` are restricted and will cause the application to fail deployment.
41
+
42
+
* `-Xms`
43
+
* `-Xmx`
44
+
* `-Xss`
45
+
* `-XX:MaxMetaspaceSize`
46
+
* `-XX:MaxPermSize`
47
+
* `-XX:MetaspaceSize`
48
+
* `-XX:PermSize`
49
+
50
+
### Allowed Memory Settings
51
+
52
+
Setting any of the allowed memory settings may require a change to the [Memory Weightings]. Where a value is shown it is the default value for that setting.
53
+
54
+
| Argument| Description
55
+
| ------- | -----------
56
+
| `-Xmn size` | The size of the heap for the young generation objects, known as the eden region. This could effect the total heap size [Memory Weightings].
57
+
| `-XX:MaxDirectMemorySize=64m` | Upper limit on the maximum amount of allocatable direct buffer memory. This could effect the [Memory Weightings].
58
+
| `-XX:+UseGCOverheadLimit` | Use a policy that limits the proportion of the VM's time that is spent in GC before an OutOfMemory error is thrown. Performance Options.
59
+
| `-XX:HeapDumpPath=./java_pid<pid>.hprof` | Path to directory or filename for heap dump. Manageable.
60
+
| `-XX:-HeapDumpOnOutOfMemoryError` | Dump heap to file when java.lang.OutOfMemoryError is thrown. Manageable.
61
+
| `-XX:OnError="<cmd args>;<cmd args>"` | Run user-defined commands on fatal error.
62
+
| `-XX:OnOutOfMemoryError="<cmd args>;<cmd args>"` | Run user-defined commands when an OutOfMemoryError is first thrown.
63
+
| `-XX:+UseLargePages` | Use large page memory. For details, see Java Support for Large Memory Pages. Debugging Options
64
+
| `-XX:LargePageSizeInBytes=4m` | Sets the large page size used for the Java heap.
65
+
| `-XX:MaxHeapFreeRatio=70` | Maximum percentage of heap free after GC to avoid shrinking.
66
+
| `-XX:MaxNewSize=size` | Maximum size of new generation (in bytes). Since 1.4, MaxNewSize is computed as a function of NewRatio. This could effect the total heap size [Memory Weightings].
67
+
| `-XX:MinHeapFreeRatio=40` | Minimum percentage of heap free after GC to avoid expansion.
68
+
| `-XX:NewRatio=2` | Ratio of old/new generation heap sizes. 2 is equal to approximately 66%.
69
+
| `-XX:NewSize=2m` | Default size of new generation heap region (in bytes). This could effect the total heap size [Memory Weightings].
70
+
| `-XX:ReservedCodeCacheSize=32m (aka -Xmaxjitcodesize)` - Java 8 Only | Reserved code cache size (in bytes) - maximum code cache size. This could effect the [Memory Weightings].
71
+
| `-XX:SurvivorRatio=8` | Ratio of eden/survivor space size. Solaris only.
72
+
| `-XX:TargetSurvivorRatio=50` | Desired percentage of survivor space used after scavenge.
73
+
| `-XX:ThreadStackSize=512` | Thread Stack Size (in Kbytes). (0 means use default stack size)
0 commit comments