Reputation: 129
In order to determine java heap size I used the following command:
java -XX:+PrintFlagsFinal -version -h | grep HeapSize
uintx ErgoHeapSizeLimit = 0 {product}
uintx HeapSizePerGCThread = 87241520 {product}
uintx InitialHeapSize := 1586475520 {product}
uintx LargePageHeapSizeThreshold = 134217728 {product}
uintx MaxHeapSize := 25383927808 {product}
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
However, I am unable to understand as to what is meant by ErgoHeapSizeLimit, HeapSizePerGCThread, InitialHeapSize, LargePageHeapSizeThreshold, MaxHeapSize, etc. Can someone please briefly explain these terms. Actually I am a complete novice at java
Actually I need to determine the heap size which my machine can allocate to a process? Because one of my application demands the following parameters: -server, -Xmx16G or better, etc. to be set.
Upvotes: 7
Views: 8670
Reputation: 1856
All the variables are documented here http://techupdates.com/go/884599
ErgoHeapSizeLimit that defaults to 0 means to ignore it. This limit is used if it is smaller than MaxRAM / MaxRAMFraction (fraction); zero means use MaxRAM / MaxRAMFraction [Source. Java Performance: The definitive guide (Scott Oaks, 2014)]
HeapSizePerGCThread: Size of heap (bytes) per GC thread used in calculating the number of GC threads
InitialHeapSize: Initial heap size (in bytes); zero means OldSize + NewSize
LargePageHeapSizeThreshold: Use large pages if max heap is at least this big
MaxHeapSize: Maximum heap size (in bytes)
Upvotes: 0
Reputation: 5245
Take a look here (they were extracted from OpenJDK):
http://jvm-options.tech.xebia.fr/
ErgoHeapSizeLimit: Maximum ergonomically set heap size (in bytes); zero means use MaxRAM / MaxRAMFraction
HeapSizePerGCThread: Size of heap (bytes) per GC thread used in calculating the number of GC threads
InitialHeapSize: Initial heap size (in bytes); zero means OldSize + NewSize
LargePageHeapSizeThreshold: Use large pages if max heap is at least this big
MaxHeapSize: Maximum heap size (in bytes)
Upvotes: 9