Questions tagged [g1gc]

G1 or Garbage First is a generational partially collecting concurrent and parallel garbage collection algorithm. It is targeted for multi-processor machines with large memories and can meet soft realtime requirements with garbage collection (GC) pause time goals. An implementation of the G1 currently ships with the new Java 7 VMS - officially supported from JDK7 update 4.

G1 or "Garbage First" is a generational partially collecting concurrent and parallel garbage collection algorithm. It is targeted for multi-processor machines with large memories and can meet soft realtime requirements with garbage collection (GC) pause time goals.

An implementation of the G1 currently ships with the Java Hotspot 7 VM - officially supported from JDK7 update 4.

Resources

314 questions
4
votes
1 answer

G1's ParallelGCThreads

Recently, I was turning jvm options for getting performance improving up. When I learned the GC option ParallelGCThreads, I got a problem. I think the best value of ParallelGCThreads is the number of logical processors.But on my 32 cores machine,…
4
votes
1 answer

G1 collector taking long young gen (minor gc) pause time after Full GC event

One of my application shows weird GC behavior. Application does young gc (minor GC) at regular intervals with pause time of ~30-50 ms and occasionally does mixed gc with ~100-150 ms this is never problem in healthy running state until jvm or we…
4
votes
1 answer

Java native memory leak with G1 and huge memory

We currently have problems with a java native memory leak. Server is quite big (40cpus, 128GB of memory). Java heap size is 64G and we run a very memory intensive application reading lot of data to strings with about 400 threads and throwing them…
4
votes
2 answers

jstat for G1 Garbage Collector

I am trying to analyze memory usage pattern of Java Process with G1 Garbage Collector using jstat: jstat -gc 60s The output looks like following: S0C S1C S0U S1U EC EU OC OU MC MU CCSC …
Arnab Biswas
  • 4,495
  • 3
  • 42
  • 60
4
votes
1 answer

How to Optimize G1's Pause Time

My JAVA_OPTS is -server -Xms4g -Xmx4g -XX:MaxMetaspaceSize=384m -Xmn2g -Xloggc:/home/admin/logs/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseG1GC -XX:MaxGCPauseMillis=300 I'm satisfied with the frequency of Full GC,and the timespan…
yichudu
  • 165
  • 2
  • 12
4
votes
5 answers

Java - which objects are being garbage collected?

My application has a lot of garbage collection and I would like to analyze that. What I want to see is which objects are being garbage collected. I think that will give me idea where to look for optimization (adding cache or whatever). Is there an…
duduamar
  • 3,816
  • 7
  • 35
  • 54
4
votes
1 answer

Java G1 garbage collector generates Java inconsistencies?

I recently tried to activate the garbage-first garbage collector and evaluate it. As a start I wrote this code, trying to produce an java.lang.OutOfMemoryError: import java.util.ArrayList; import java.util.Date; import java.util.List; public class…
cristi
  • 161
  • 1
  • 2
  • 7
4
votes
1 answer

G1GC remark phase is taking too long

My server application under load some times goes unresponsive and i found the issue to be related to very long "GC Remark". There is no garbage collection tuning implemented. My test server is a 4 core/8 gb/8 GB swap. This is the log output from gc…
Atul Soman
  • 4,612
  • 4
  • 30
  • 45
4
votes
1 answer

Proper G1 GC tuning for sparc T4 8-core

my application is deployed on a weblogic running on Solaris, on a dual SPARC T4 8-core 3.0 GHz. This weblogic instance is using g1 gc and I think it's possible to improve the current configuration: GC_OPTIONS=" -server -XX:ConcGCThreads=4…
César Varona
  • 61
  • 1
  • 6
4
votes
2 answers

High Object Copy times resulting in long garbage collection pauses with G1GC

I have a Java app running in a standalone JVM. The app listens for data on one or more sockets, queues the data, and has scheduled threads pulling the data off the queue and persisting it. The data is wide, over 700 data elements per record,…
4
votes
3 answers

Memory allocation in G1 GC

As I understand when using G1 GC heap is partitioned into a set of equal-sized heap regions. How JVM allocates new objects in the regions? Which region is choosed for the allocation?
Costa Mirkin
  • 947
  • 3
  • 15
  • 39
3
votes
2 answers

java7 G1 Options

I can't find any options relating to how G1 operates. The below two commands no longer work with java7. -XX:+G1ParallelRSetUpdatingEnabled -XX:+G1ParallelRSetScanningEnabled
Slava Markeyev
  • 317
  • 1
  • 4
  • 13
3
votes
1 answer

Sudden increase in G1 old generation committed memory and decrease in Eden size

For some reason, G1 is deciding to increase the committed old generation memory (although the used memory does not increase) and decrease the Eden generation committed memory (consequently the usable space). It seems to be causing a spike in GC's…
Diego Marin Santos
  • 1,923
  • 2
  • 15
  • 29
3
votes
1 answer

Java GC1 doesn't throw OutOfMemory but keeps struggling

I want my app to fails fast in case of insufficient memory, so it can be adjusted and the process restarted. I am running the service with -XX:ParallelGCThreads=8 -XX:GCTimeRatio=19 -XX:ConcGCThreads=2 When heap memory runs out, GC1 keeps…
3
votes
1 answer

Java - CMS vs G1 garbage collector

What's the difference between cms and g1 garbage collector which makes g1 better? Most of places it is said that this is because in G1, heap is divided into regions and then collection of regions are marked as young/old generation and gc runs on few…
user10916892
  • 825
  • 12
  • 33