Want to write articles/new answer to be published in javapedia.net? Send in your article with your name to javatutorials2016@gmail.com!

Prev Next

Java / JDK, JRE, JVM, JIT

Explain CMS Garbage Collector in Java.

Concurrent Mark Sweep (CMS) garbage collector uses multiple threads to scan the heap memory to mark instances for eviction and then sweep the marked instances. CMS garbage collector holds all the application threads in the following two scenarios only,

  • While marking the referenced objects in the tenured generation space.
  • If there is a change in heap memory in parallel while doing the garbage collection.

CMS collector uses more CPU to ensure better application throughput. If we can allocate more CPU for better performance then CMS garbage collector is the preferred choice over the parallel collector.

Turn on the XX:+USeParNewGC JVM argument to use the CMS garbage collector.

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

Java is Platform independent. What is High level language? Is Java a WORA? Features of Java. (or) Java buzzwords. Java is Simple. Interpreted. Java is object oriented. Difference between JDK, JRE and JVM. What is Java? Architectural-neutral. Three flavors of Java. How many types of memory areas are allocated by JVM? What is the latest version of Java? What is Write Once, Run Anywhere (WORA)? What is a Platform? Is Java a pure/fully object oriented language? Secured. What is bytecode? Portable. Robust. Dynamic. High-performance. Multithreaded. Distributed. What is classloader? Types of classloader. What is Heap space in Java? Default heap size in Java. What is Java Memory Model? What are the new features introduced in Java 8? Difference between EAR, JAR and WAR file in J2EE. Explain memory leak in Java. How Garbage collection works in Java? What are the GC roots in Java? Types of memory leaks in Java. How do you diagonise memory leaks in Java? Difference between Stack and Heap memory in Java. Does Java garbage collector cleans both heap and stack memory? Why garbage collection is required in Java? How GC does not affect Java program's performance? Different categories of GC algorithm. List the available GC algorithms in Java. What is the default GC collector in Java 8? What are types of reference in Java? Explain strong reference type in Java. Explain weak reference type in Java. Explain Serial Garbage Collector in Java. Explain Parallel Garbage Collector in Java. Explain CMS Garbage Collector in Java. Explain G1 Garbage Collector in Java. What is soft reference in Java? What is phantom reference in Java? Explain the javap command in Java. What is PermGen in Java? What is metaspace in JDK 1.8? Explain the usage of MetaspaceSize parameter in Java 8. Difference between permgen and metaspace in Java. New features introduced in Java 1.7. How do I load Jars dynamically at runtime? What is synthetic construct in Java? New changes introduced in Java 9. What is jshell tool in Java 9? Difference between Java.exe and Javaw.exe. What is Nashorn in Java8? How do I debug to see when class is loaded in jvm? Explain Class loading subsystem of JVM. Mention Java features designed to improve application security. Mention few security Libraries that Java platform supports. Mention few advanced coding concepts in Java for security considerations.
Show more question and Answers...

Java Identifiers

Comments & Discussions