<div dir="ltr"><div class="gmail_quote"><br><div dir="ltr"><p class="MsoNormal">Hi all<span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">I have following doubt about GC phase and can anyone suggest
whether thinking in this direction is right or not ?. <span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">Current observation is that whenever a new is called in JAVA, memory is allocated to that object and cleared with zero. This is similar to “CALLOC”
in C for the requested amount of size. I was testing with SPECJBB and found that
millions of objects are created and GC activity is seen for every 10-15 seconds.
Allocated heap size is around 28 GB. This means 24-26GB of memory is consumed
within 10-15 seconds and millions objects are created in this time window. I
have copied below few lines from GC log file for reference.<span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">2017-08-08T06:30:30.243-0500: 449.366: [GC (Allocation
Failure) [PSYoungGen: 26427392K->890612K(27369472K)]
26634616K->1097837K(29466624K)<wbr>, 0.2550044 secs] [Times: user=3.43 sys=0.00,
real=0.26 secs] <span></span></p>

<p class="MsoNormal">2017-08-08T06:30:44.136-0500: 463.260: [GC (Allocation Failure)
[PSYoungGen: 27318004K->919195K(27369472K)]
27525229K->1126419K(29466624K)<wbr>, 0.2509147 secs] [Times: user=3.32 sys=0.00,
real=0.25 secs] <span></span></p>

<p class="MsoNormal">2017-08-08T06:30:55.167-0500: 474.290: [GC (Allocation
Failure) [PSYoungGen: 27346587K->935445K(27369472K)] 27553811K->1142669K(29466624K)<wbr>,
0.2487470 secs] [Times: user=3.40 sys=0.00, real=0.25 secs] <span></span></p>

<p class="MsoNormal">2017-08-08T06:31:05.805-0500: 484.929: [GC (Allocation
Failure) [PSYoungGen: 27362837K->920059K(27369472K)]
27570061K->1127283K(29466624K)<wbr>, 0.2394722 secs] [Times: user=3.23 sys=0.00,
real=0.24 secs]<span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">Is it good to have bulk zeroing feature/pass in GC where once
sweeping is done then do bulk zero ? If this is done then during allocation
step zeroing is not required as it is done in GC itself. <span></span></p>

<p class="MsoNormal">Not sure how much time GC will take for this. <span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">I may not be the first person to think this way and thought
to ask here. Does JAVA spec allows this (such pass in GC)? if so any pointers
on that. It will help me to understand more.<span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">Thanks</p><p class="MsoNormal">Amit Pawar<span></span></p>
</div>
</div><br><br clear="all"><div><br></div>
</div>