I have following doubt about GC phase and can anyone suggest
whether thinking in this direction is right or not ?.
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.
On 24/10/17 07:24, amith pawar wrote:
> 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.
> Not sure how much time GC will take for this.
> 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.
It's called -XX:+ZeroTLAB. See also ReduceBulkZeroing.
It may or may not be effective: zeroing at allocation time is fairly
cache friendly, whereas zeroing when allocating a new TLAB isn't going
to be. Some architectures have cache-missing bulk zeroing, which
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671