Number/size of G1 regions?

Tim King kingtim at gmail.com
Mon Jul 14 20:45:48 UTC 2014


Thank you Jenny.
That makes sense.
Cheers,
Tim


On Mon, Jul 14, 2014 at 1:41 PM, Yu Zhang <yu.zhang at oracle.com> wrote:

>  Tim,
>
> This is probably due to you did not specify the minimum heap.  With jdk7u40
> java -Xmx24g -XX:+UseG1GC -XX:+PrintFlagsFinal -XX:+PrintGCDetails
> -verbose:gc gives the following:
> Heap
>  garbage-first heap   total 516096K, used 0K [0x00000001fae00000,
> 0x000000021a600000, 0x00000007fae00000)
>   region size 1024K, 1 young (1024K), 0 survivors (0K)
>
> ./java -Xms24g -Xms24g -XX:+UseG1GC -XX:+PrintFlagsFinal
> -XX:+PrintGCDetails -verbose:gc gives:
> Heap
>  garbage-first heap   total 25165824K, used 0K [0x00000001fb000000,
> 0x00000007fb000000, 0x00000007fb000000)
>   region size 8192K, 1 young (8192K), 0 survivors (0K)
>
> If the minimum heap size is not specified in command line, jvm will first
> decide the minimum based on some factors(newSize, oldSize, os allocatable
> memory, ect), then take the average of min and max heap (average heap size)
> to decide the region size.  This region size is decided when jvm starts,
> and would not change if the heap is expanded.
>
> With smaller region size, one impact is you may see a lot of humongous
> objects.  By definition, objects size > 1/2 of the region size.  Also if
> you are seeing time spend in RS related operations, probably due to a lot
> of RS to maintain.
>
> Thanks,
> Jenny
>
> On 7/14/2014 12:45 PM, Tim King wrote:
>
>  Hello all!
> I have a question about the number and size of heap regions we are seeing
> on our JVMs.  We have a 24GB heap, and I am seeing that 24524 1MB regions
> are being allocated.  We are running  JDK 1.7.0_51.
>
>  I read in this article
> http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html that
> "the goal is to have no more than 2048 regions".
>
>  Based on the size of our heap, I am expecting larger region size with
> fewer regions.  Is this something I should be worried about, or is it
> expected and normal? What kind of impact will this have on the performance?
>
>  Thank you,
> Cheers,
> -Tim
>
>  Heap Configuration:
>    MinHeapFreeRatio = 40
>    MaxHeapFreeRatio = 70
>    MaxHeapSize      = 25769803776 (24576.0MB)
>    NewSize          = 1363144 (1.2999954223632812MB)
>    MaxNewSize       = 17592186044415 MB
>    OldSize          = 5452592 (5.1999969482421875MB)
>    NewRatio         = 2
>    SurvivorRatio    = 8
>    PermSize         = 268435456 (256.0MB)
>    MaxPermSize      = 536870912 (512.0MB)
>    G1HeapRegionSize = 1048576 (1.0MB)
>
>  Heap Usage:
> G1 Heap:
>    regions  = 24524
>    capacity = 25715277824 (24524.0MB)
>    used     = 5114734088 (4877.7905349731445MB)
>    free     = 20600543736 (19646.209465026855MB)
>    19.889865172782354% used
> ....
>
>
>
> _______________________________________________
> hotspot-gc-use mailing listhotspot-gc-use at openjdk.java.nethttp://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20140714/099fb508/attachment.html>


More information about the hotspot-gc-use mailing list