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
1
vote
1 answer

Continuous CMS Collections Followed By Concurrent Mode Failure

The GC log for my Java application indicates continuous CMS GC followed by a concurrent mode failure stop-the-world collection that reclaims nearly the entire heap. Why are the CMS collections failing to clear the old generation? Why is a…
0
votes
0 answers

Elasticsearch search response pick(latency) occurs when _refresh with G1GC

Our elasticsearch cluster has 3 master nodes and 12 data nodes installed on 2 IDCs. In front of elasticsearch, there is search api server that multisearches three indexes. It shows an average response time of less than 200 ms in normal times. The…
0
votes
0 answers

How to avoid long pauses on Java CMS GC due to swap

I have experienced some Minor GCs on Java CMS GC taking too much time. This generally occurs after some application's idle hours, and takes real time but not user nor cpu time. I've seen that the machine has experienced some peak of memory usage due…
javando
  • 139
  • 1
  • 1
  • 12
0
votes
1 answer

Why does a mark & sweep collector have to stop the world and not run in parallel?

I am reading "The Garbage Collection Handbook: 2nd Edition". In the "Mark-Sweep garbage collection" page, it is mentioned that all mutator threads stop while the collector thread runs. What is the reason? In the marking phase, the collector only…
0
votes
0 answers

CMS-concurrent-sweep taking long time

I have a windows machine running on KVM and I am running a java application (Using CMS GC) on the windows machine. The application was behaving very slow, so I checked the GC logs. The max heap size was 5 GB, but in the gc logs, I could find that…
dVader
  • 15
  • 6
0
votes
1 answer

Single server with multiple JVMs and multiple GC algorithms

I have a single linux application server with 4 JVMs on it. The GC Algorithm that I use on them is CMS. Can i change the GC algorithm of two of those JVMs to G1GC ? Is there any negative impact by doing so ?
0
votes
1 answer

JMV GC logs don't show CMS events

This is a capture of the GC activity: 2016-12-28T08:05:47.072-0800: 53612.476: [Full GC (System.gc()) Before GC: Statistics for BinaryTreeDictionary: ------------------------------------ Total Free Space: 2492815068 Max Chunk Size:…
benji
  • 2,331
  • 6
  • 33
  • 62
0
votes
1 answer

High frequency of CMS tenured phases even when Old/Young gen have ample space

I acknowledge up front that this issue is very similar to: high-number-of-cms-mark/remark-pauses-even-though-old-gen-is-not-half-full and tenured-collection-starting-for-no-apparent-reason. I'm posting because 1. those threads are over 1yr old, and…
kmarx
  • 43
  • 5
0
votes
1 answer

Is it CMS-concurrent-preclean abort causing time consuming execution of CMS-concurrent-sweep?

java -version java version "1.6.0_21" Java(TM) SE Runtime Environment (build 1.6.0_21-b07) Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode) jvm configuration : -server -XX:+DoEscapeAnalysis -XX:+CMSParallelRemarkEnabled …
Steephen
  • 14,645
  • 7
  • 40
  • 47
0
votes
1 answer

High Number of CMS mark remark pauses even though Old gen is not half full

I am trying to understand the cause for high number of CMS marks and remarks(other phases as well) averaging around 700ms even though the old gen is not even half full.Following are the GC configurations and stats from GCViewer. -Xms3g -Xmx3g…
pasupv
  • 11
  • 1
  • 2
-1
votes
2 answers

Java Garbage Collector Allocation Failure

I am running my java application on machine having 8GB Memory and 4 CPU. But after running application for longer period with stress testing, Garbage collector problems are observed as memory is completely full and seems that gc cycles taking longer…
-1
votes
1 answer

Parallel promotion failures... Whats the cause?

I'm running a java program using 3GB heap space. After a while I notice this in the gc logs. Application time: 0.8263100 seconds 2015-03-13T07:24:49.065-0700: 77177.620: [GC Before GC: Statistics for BinaryTreeDictionary: Total Free Space:…
Vishal
  • 1
  • 3
-2
votes
3 answers

CMS Garbage Collection taking too long

One of our customers runs into major performance problems which seem to be caused by long garbage collection runs and I don't know what to do about it... Java version: 1.7.0_67 JVM args: -Xms10240m -Xmx16386m -XX:NewSize=2048m -XX:MaxPermSize=150m…
Gishan
  • 19
  • 5
1 2 3
4