Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
This change polishes up the submitted documentation.
  • Loading branch information
nebhale committed Nov 20, 2014
1 parent fdf07ad commit d920d76
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions docs/framework-java_opts.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ The framework can be configured by creating or modifying the [`config/java_opts.
| Name | Description
| ---- | -----------
| `from_environment` | Whether to append the value of the `JAVA_OPTS` environment variable to the collection of Java options
| `java_opts` | The Java options to use when running the application. All values are used without modification when invoking the JVM. The options are specified as a single YAML scalar in plain style or enclosed in single or double quotes.
| `java_opts` | The Java options to use when running the application. All values are used without modification when invoking the JVM. The options are specified as a single YAML scalar in plain style or enclosed in single or double quotes.

Any `JAVA_OPTS` from either the config file or environment variables that configure memory options will cause deployment to fail as they're not allowed. Memory options are configured by the buildpack and may not be modified.
Any `JAVA_OPTS` from either the config file or environment variables that configure memory options will cause deployment to fail as they're not allowed. Memory options are configured by the buildpack and may not be modified.

## Example
```yaml
Expand Down Expand Up @@ -53,25 +53,26 @@ Setting any of the allowed memory settings may require a change to the [Memory W

| Argument| Description
| ------- | -----------
| `-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].
| `-XX:MaxDirectMemorySize=64m` | Upper limit on the maximum amount of allocatable direct buffer memory. This could effect the [Memory Weightings].
| `-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.
| `-XX:HeapDumpPath=./java_pid<pid>.hprof` | Path to directory or filename for heap dump. Manageable.
| `-XX:-HeapDumpOnOutOfMemoryError` | Dump heap to file when java.lang.OutOfMemoryError is thrown. Manageable.
| `-XX:OnError="<cmd args>;<cmd args>"` | Run user-defined commands on fatal error.
| `-XX:OnOutOfMemoryError="<cmd args>;<cmd args>"` | Run user-defined commands when an OutOfMemoryError is first thrown.
| `-XX:+UseLargePages` | Use large page memory. For details, see Java Support for Large Memory Pages. Debugging Options
| `-XX:LargePageSizeInBytes=4m` | Sets the large page size used for the Java heap.
| `-XX:MaxHeapFreeRatio=70` | Maximum percentage of heap free after GC to avoid shrinking.
| `-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].
| `-XX:MinHeapFreeRatio=40` | Minimum percentage of heap free after GC to avoid expansion.
| `-XX:NewRatio=2` | Ratio of old/new generation heap sizes. 2 is equal to approximately 66%.
| `-XX:NewSize=2m` | Default size of new generation heap region (in bytes). This could effect the total heap size [Memory Weightings].
| `-XX:ReservedCodeCacheSize=32m (aka -Xmaxjitcodesize)` - Java 8 Only | Reserved code cache size (in bytes) - maximum code cache size. This could effect the [Memory Weightings].
| `-XX:SurvivorRatio=8` | Ratio of eden/survivor space size. Solaris only.
| `-XX:TargetSurvivorRatio=50` | Desired percentage of survivor space used after scavenge.
| `-XX:ThreadStackSize=512` | Thread Stack Size (in Kbytes). (0 means use default stack size)
| `-Xmn <SIZE>` | Maximum size of young generation, known as the eden region. **This could effect the total heap size [Memory Weightings].**
| `-XX:+UseGCOverheadLimit` | Use a policy that limits the proportion of the VM's time that is spent in GC before an `java.lang.OutOfMemoryError` error is thrown.
| `-XX:+UseLargePages` | Use large page memory. For details, see [Java Support for Large Memory Pages].
| `-XX:-HeapDumpOnOutOfMemoryError` | Dump heap to file when `java.lang.OutOfMemoryError` is thrown.
| `-XX:HeapDumpPath=<PATH>` | Path to directory or filename for heap dump.
| `-XX:LargePageSizeInBytes=<SIZE>` | Sets the large page size used for the Java heap.
| `-XX:MaxDirectMemorySize=<SIZE>` | Upper limit on the maximum amount of allocatable direct buffer memory. **This could effect the [Memory Weightings].**
| `-XX:MaxHeapFreeRatio=<RATIO>` | Maximum percentage of heap free after GC to avoid shrinking.
| `-XX:MaxNewSize=<SIZE>` | Maximum size of new generation. Since `1.4`, `MaxNewSize` is computed as a function of `NewRatio`. **This could effect the total heap size [Memory Weightings].**
| `-XX:MinHeapFreeRatio=<RATIO>` | Minimum percentage of heap free after GC to avoid expansion.
| `-XX:NewRatio=<RATIO>` | Ratio of old/new generation sizes. 2 is equal to approximately 66%.
| `-XX:NewSize=<SIZE>` | Default size of new generation. **This could effect the total heap size [Memory Weightings].**
| `-XX:OnError="<CMD ARGS>;<CMD ARGS>"` | Run user-defined commands on fatal error.
| `-XX:OnOutOfMemoryError="<CMD ARGS>;<CMD ARGS>"` | Run user-defined commands when an `java.lang.OutOfMemoryError` is first thrown.
| `-XX:ReservedCodeCacheSize=<SIZE>` | _Java 8 Only_ Maximum code cache size. Also know as `-Xmaxjitcodesize`. **This could effect the [Memory Weightings].**
| `-XX:SurvivorRatio=<RATIO>` | Ratio of eden/survivor space. Solaris only.
| `-XX:TargetSurvivorRatio=<RATIO>` | Desired ratio of survivor space used after scavenge.
| `-XX:ThreadStackSize=<SIZE>` | Thread stack size. (0 means use default stack size).

[Memory Weightings]: jre-open_jdk_jre.md#memory-weightings
[Configuration and Extension]: ../README.md#configuration-and-extension
[`config/java_opts.yml`]: ../config/java_opts.yml
[Configuration and Extension]: ../README.md#configuration-and-extension
[Java Support for Large Memory Pages]: http://www.oracle.com/technetwork/java/javase/tech/largememory-jsp-137182.html
[Memory Weightings]: jre-open_jdk_jre.md#memory-weightings

0 comments on commit d920d76

Please sign in to comment.