Home » Tag Archives: GC

Tag Archives: GC

Elastic infrastructure in practice

java-logo

A couple of weeks ago I got a rare opportunity to get my hands dirty in the infrastructure field. Being an interesting change to my day-to-day hours deep under the hood of the JVM internals, I thought to share the motivation and results with you. Hopefully it serves as an inspiration to similar problem categories out there. Background I will ...

Read More »

HotSpot Incremental Java Garbage Collector

java-logo

In my recent blog post Determining the Active HotSpot Garbage Collector, I described different approaches that can be used to determine the garbage collector that is being used by HotSpot JVM (Java process) when it is not obvious from the command-line arguments (flags) passed to the Java launcher. For significant Java applications, I prefer to explicitly specify the appropriate garbage ...

Read More »

Determining the Active HotSpot Garbage Collector

java-logo

The StackOverflow questions find which type of garbage collector is running, Default Garbage collector for a jvm, How can I see what garbage collector is running by looking at gc logs?, and How to know the current GC strategy of the HotSpot jvm?, and the blog post How to programmatically obtain GC information demonstrate the desire at times to know ...

Read More »

5 Tips for Reducing Your Java Garbage Collection Overhead

java-logo

What are some of the most useful tips for keeping your GC overhead low? With the upcoming-yet-delayed-once-again release of Java 9, the G1 (“Garbage First”) garbage collector is set to become the default collector of the HotSpot JVM. From the serial garbage collector all the way to the CMS collector, the JVM has seen many GC implementations throughout its lifetime, ...

Read More »

What is the fastest Garbage Collector in Java 8?

java-logo

OpenJDK 8 has several Garbage Collector algorithms, such as Parallel GC, CMS and G1. Which one is the fastest? What will happen if the default GC changes from Parallel GC in Java 8 to G1 in Java 9 (as currently proposed)? Let’s benchmark it. Benchmark methodology Run the same code 6 times with a different VM argument (-XX:+UseSerialGC, -XX:+UseParallelGC, -XX:+UseConcMarkSweepGC, ...

Read More »

GC tuning in practice

java-logo

Tuning Garbage Collection is no different from any other performance-tuning activities. Instead of giving in to temptation for tweaking random parts of the application, you need to make sure you understand the current situation and the desired outcome. In general it is as easy as following the following process: State your performance goals Run tests Measure Compare to goals Make ...

Read More »

What is Garbage Collection?

java-logo

The following is an example from our Garbage Collection Handbook which will be published in the forthcoming weeks. In the meanwhile, take your time to get yourself familiar with the basics of the Garbage Collection – this is going to be the very first chapter of the book. At the first sight, garbage collection should be dealing with what the name suggests – finding ...

Read More »

Logging stop-the-world pauses in JVM

java-logo

Different events can cause the JVM to pause all the application threads. Such pauses are called Stop-The-World (STW) pauses. The most common cause for an STW pause to be triggered is garbage collection (example in github) , but different JIT actions (example), biased lock revocation (example), certain JVMTI operations , and many more also require the application to be stopped. ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials