Questions tagged [concurrent-mark-sweep]

Concurrent-mark-sweep is a garbage collection algorithm, known for its use on the Java Virtual Machine, which can reduce stop-the-world times on machines with limited resources.

Concurrent-mark-sweep is a garbage collection algorithm, known for its use on the Java Virtual Machine, which can reduce stop-the-world times on machines with limited resources; this is an attempt to reduce response times related to GC activity.

However, it can result in fragmentation of the old generation, and can fall back to older methods. It is not efficient on large heaps, since the mark phase is dependent on the size of live objects, and the sweep phase can traverse the entire heap.

Under concurrent-mark-sweep, most garbage collection activity is performed concurrently, i.e., while the application threads are running, to keep garbage collection-induced pauses short. This is in contrast to a simple stop-the-world garbage collector which completely halts execution of the program to run a collection cycle.

To enable, use the JVM argument -XX:+UseConcMarkSweepGC .

Resources

58 questions
2
votes
2 answers

Concurrent Mark Sweep Collection occurring not often enough

My application correctly runs correctly on a server with 16 processor and 64 GB of Ram. I have multiple process and I try to limit the maximum heap at 8 Gbyte for my process. My problem is that I have some form of producer-consumer pattern and I…
Edmondo
  • 19,559
  • 13
  • 62
  • 115
1
vote
4 answers

Java ConcurrentMarkSweep garbage collector not happening

Environment Details: OS: Linux RedHat Java: JRE 6 Update 21 I am using following GC setting for my app. -server -d64 -Xms8192m -Xmx8192m -javaagent:lib/instrum.jar -XX\:MaxPermSize=256m -XX\:+UseParNewGC -X\:+ParallelRefProcEnabled…
rontu
  • 63
  • 1
  • 8
1
vote
1 answer

How to cause a very high heap fragmentation in Java 8 HotSpot using CMS GC

I am studying Java8 HotSpot heap fragmentation (on CMS), and I'm struggling to write some code that produces high fragmentation. I've been trying with very large objects without success. Could someone post a code that creates a very high heap…
1
vote
1 answer
1
vote
1 answer

What is the concrete job in "final remark" about CMS?

From plumbr's cookbook, I have seen that what init mark, concurrent mark, concurrent preclean and concurrent abortable preclean do. init mark concurrent mark concurrent preclean But I can't get the real job about the "final remark". Only…
lxyscls
  • 297
  • 1
  • 3
  • 17
1
vote
0 answers

Java CMS - Young Generation GC takes longer and longer

We have an application running on OpenJDK8 that has a high allocation rate (about 80 MB/sec) over the course of the whole day. We noticed that the overall young generation gc times directly references to the occupation of the old generation, and is…
1
vote
0 answers

CMS class unloading took much time

On large load was noticed large GC pause(400ms) for our application. During investigation it turns out, that pause happens on CMS Final Remark and class unloading phase took a lot more time, than other phases(10x-100X): (CMS Final Remark) …
1
vote
2 answers

Is there a way to identify CMS concurrent mode failures over JMX?

So I've been trying to track down a good way to monitor when the JVM might potentially be heading towards an OOM situation. They best way that seems to work with our app is to track back-to-back concurrent mode failures through CMS. This indicates…
Zack
  • 1,181
  • 2
  • 11
  • 26
1
vote
0 answers

Old GC starting immediately after previous collection

I am facing a peculiar problem where Old garbage collection is starting immediately after previous collection. 2018-04-15T13:07:30.028+0530: 51251.379: [GC2018-04-15T13:07:30.028+0530: 51251.379: [ParNew: 277743K->6502K(306688K), 0.0103550 secs]…
user2757415
  • 153
  • 1
  • 15
1
vote
1 answer

How should I tune CMS for my application?

The problem is like this. We are using CMS and experiencing concurrent mode failure (takes about 15 seconds). Using JRE 8. Already using UseCMSInitiatingOccupancyOnly and CMSInitiatingOccupancyFraction (80%). Not using CMSScavengeBeforeRemark. The…
ntysdd
  • 1,206
  • 2
  • 9
  • 19
1
vote
1 answer

CMS-initial-mark is increasing despite the UseCMSInitiatingOccupancyOnly flag and cause concurrent mode failure

CMS-initial-mark starts from 60% (what is expected) and constantly grow despite using: -XX:+UseCMSInitiatingOccupancyOnly and -XX:CMSInitiatingOccupancyFraction=60 Can I ask for a help why is it increasing? Flags: -Xms28g -Xmx28g -XX:PermSize=512m…
1
vote
1 answer

What's the exact use of -XX+UseCMSCompactAtFullCollection?

I understand it tells CMS collector to do a compaction on old gen when a full GC has happened. But I want to confirm if I understand it correctly (pieced together from various sources): A full GC would pause the world, collect and compact the old…
stackoverflower
  • 3,885
  • 10
  • 47
  • 71
1
vote
2 answers

java GC algorithm fine tuning : CMS algorithm alone & combination

Currently I am using a combination of CMS and ParNewGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC As per my understanding, CMS is used for Old Gen GC and UserPareNewGC used for you gen garbage collection. If I pass only CMS as single parameter, …
Ravindra babu
  • 37,698
  • 11
  • 250
  • 211
1
vote
1 answer

Concurrent Mark and sweep algo

Below is what i read & understand about the Concurrent Mark and sweep algo 1) In the initial marking, the GC root objects are marked as alive. During this phase, all threads of the application are suspended. 2) During concurrent marking, the marked…
Sahil Gupta
  • 2,028
  • 15
  • 22
1
vote
0 answers

Understanding how CMSIncrementalMode helps the application

I have two app nodes with same GC configurations except for CMSIncrementalMode. Following are the screen shots from GC Viewer for both the apps with and without CMSIncrementalMode. The app not using CMSIncrementalMode has significantly lower…
pasupv
  • 11
  • 1
  • 2