Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed an explanation for apparent heap size reduction
    primarykey
    data
    text
    <p>From the GC logs, it appears that the heap size is being reduced across young and old generations after sometime. </p> <p>Below are three entries from the logs.</p> <p>{Heap before gc invocations=5:</p> <p>PSYoungGen total 44800K, used 44180K [0x18220000, 0x1b420000, 0x24a20000)</p> <p>eden space 38400K, 100% used [0x18220000,0x1a7a0000,0x1a7a0000)</p> <p>from space 6400K, 90% used [0x1ade0000,0x1b3853c8,0x1b420000)</p> <p>to space 6400K, 0% used [0x1a7a0000,0x1a7a0000,0x1ade0000)</p> <p>PSOldGen total 51200K, used 16K [0x0ba20000, 0x0ec20000, 0x18220000)</p> <p>object space 51200K, 0% used [0x0ba20000,0x0ba24128,0x0ec20000)</p> <p>PSPermGen total 32768K, used 12417K [0x03a20000, 0x05a20000, 0x0ba20000)</p> <p>object space 32768K, 37% used [0x03a20000,0x046406c0,0x05a20000)</p> <p>1047.599: [GC [PSYoungGen: 44180K->5990K(44032K)] 44197K->6006K(95232K), 0.0046671 secs]</p> <p>Heap after gc invocations=5:</p> <p>PSYoungGen total 44032K, used 5990K [0x18220000, 0x1b5a0000, 0x24a20000)</p> <p>eden space 37632K, 0% used [0x18220000,0x18220000,0x1a6e0000)</p> <p>from space 6400K, 93% used [0x1a7a0000,0x1ad79990,0x1ade0000)</p> <p>to space 7552K, 0% used [0x1ae40000,0x1ae40000,0x1b5a0000)</p> <p>PSOldGen total 51200K, used 16K [0x0ba20000, 0x0ec20000, 0x18220000)</p> <p>object space 51200K, 0% used [0x0ba20000,0x0ba24128,0x0ec20000)</p> <p>PSPermGen total 32768K, used 12417K [0x03a20000, 0x05a20000, 0x0ba20000)</p> <p>object space 32768K, 37% used [0x03a20000,0x046406c0,0x05a20000)</p> <p>}</p> <hr> <p>{Heap before gc invocations=174:</p> <p>PSYoungGen total 9728K, used 9666K [0x18220000, 0x18d30000, 0x24a20000)</p> <p>eden space 8640K, 99% used [0x18220000,0x18a8fa58,0x18a90000)</p> <p>from space 1088K, 94% used [0x18a90000,0x18b910f0,0x18ba0000)</p> <p>to space 1344K, 0% used [0x18be0000,0x18be0000,0x18d30000)</p> <p>PSOldGen total 51200K, used 21113K [0x0ba20000, 0x0ec20000, 0x18220000)</p> <p>object space 51200K, 41% used [0x0ba20000,0x0cebe540,0x0ec20000)</p> <p>PSPermGen total 32768K, used 12611K [0x03a20000, 0x05a20000, 0x0ba20000)</p> <p>object space 32768K, 38% used [0x03a20000,0x04670fa0,0x05a20000)</p> <p>26968.748: [GC [PSYoungGen: 9666K->1271K(9920K)] 30780K->22465K(61120K), 0.0025274 secs]</p> <p>Heap after gc invocations=174:</p> <p>PSYoungGen total 9920K, used 1271K [0x18220000, 0x18d50000, 0x24a20000)</p> <p>eden space 8576K, 0% used [0x18220000,0x18220000,0x18a80000)</p> <p>from space 1344K, 94% used [0x18be0000,0x18d1dd00,0x18d30000)</p> <p>to space 1408K, 0% used [0x18a80000,0x18a80000,0x18be0000)</p> <p>PSOldGen total 51200K, used 21194K [0x0ba20000, 0x0ec20000, 0x18220000)</p> <p>object space 51200K, 41% used [0x0ba20000,0x0ced29e0,0x0ec20000)</p> <p>PSPermGen total 32768K, used 12611K [0x03a20000, 0x05a20000, 0x0ba20000)</p> <p>object space 32768K, 38% used [0x03a20000,0x04670fa0,0x05a20000)</p> <p>}</p> <hr> <p>{Heap before gc invocations=23195:</p> <p>PSYoungGen total 1536K, used 1372K [0x18220000, 0x18440000, 0x24a20000)</p> <p>eden space 896K, 100% used [0x18220000,0x18300000,0x18300000)</p> <p>from space 640K, 74% used [0x183a0000,0x184173e8,0x18440000)</p> <p>to space 640K, 0% used [0x18300000,0x18300000,0x183a0000)</p> <p>PSOldGen total 6272K, used 4627K [0x0ba20000, 0x0c040000, 0x18220000)</p> <p>object space 6272K, 73% used [0x0ba20000,0x0bea4d70,0x0c040000)</p> <p>PSPermGen total 32768K, used 12930K [0x03a20000, 0x05a20000, 0x0ba20000)</p> <p>object space 32768K, 39% used [0x03a20000,0x046c0aa0,0x05a20000)</p> <p>71908.146: [GC [PSYoungGen: 1372K->533K(1536K)] 6000K->5423K(7808K), 0.0107964 secs]</p> <p>Heap after gc invocations=23195:</p> <p>PSYoungGen total 1536K, used 533K [0x18220000, 0x18460000, 0x24a20000)</p> <p>eden space 896K, 0% used [0x18220000,0x18220000,0x18300000)</p> <p>from space 640K, 83% used [0x18300000,0x18385438,0x183a0000)</p> <p>to space 704K, 0% used [0x183b0000,0x183b0000,0x18460000)</p> <p>PSOldGen total 6272K, used 4890K [0x0ba20000, 0x0c040000, 0x18220000)</p> <p>object space 6272K, 77% used [0x0ba20000,0x0bee6868,0x0c040000)</p> <p>PSPermGen total 32768K, used 12930K [0x03a20000, 0x05a20000, 0x0ba20000)</p> <p>object space 32768K, 39% used [0x03a20000,0x046c0aa0,0x05a20000)</p> <p>}</p> <hr> <p>The (relevant) JVM parameters used are as follows :</p> <p>-server</p> <p>-Xms600m</p> <p>-Xss256k</p> <p>-XX:+UseParallelGC</p> <p>-XX:+PrintHeapAtGC</p> <p>-XX:+HeapDumpOnOutOfMemoryError</p> <p>-Xloggc:verbose_gc.log</p> <p>-Djavax.net.debug=none</p> <p>-XX:+PrintGCDetails</p> <p>-XX:+PrintTenuringDistribution</p> <p>-XX:+PrintClassHistogram</p> <p>-Xmx800m</p> <p>-XX:NewRatio=1</p> <p>-XX:CompileThreshold=1500</p> <p>-XX:PermSize=32m</p> <p>-XX:MaxPermSize=128m</p> <p>An assumption that memory was being consumed by too many threads (based on the understanding that stack memory was different from heap memory) was shown to be false with a sample application that simply created new threads, when observed using visual vm (the young and tenured generations filled up). </p> <p>Is there any explanation to this behaviour?</p> <p>Update #1: Correction and Update: The above sample application also included an array object being created with each thread. The array size was a non trivial fraction of the total heap. The issue is observable in JDK 1.5.</p> <p>-R</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload