Inspect the contents of the Java Metaspace region

The JVM memory consists of regions: Young Generation, Old Generation, and Metaspace. To inspect loaded classes in Metaspace, various methods can be used: -verbose:class (Java 8), -Xlog:class+load (Java 9+), jcmd GC.class_histogram, a programmatic approach, and Heap Dump analysis. Each method provides insights without significant application overhead.

Read MoreInspect the contents of the Java Metaspace region

Troubleshooting Microservice’s OutOfMemoryError: Metaspace

The post discusses a 'java.lang.OutOfMemoryError: Metaspace' issue encountered in a Microservice application. It highlights the significance of the Metaspace memory region, outlines steps for diagnosing the error using garbage collection logs, and identifies a memory leak caused by an outdated third-party library. Upgrading the library resolved the issue.

Read MoreTroubleshooting Microservice’s OutOfMemoryError: Metaspace

JVM c1, c2 compiler thread – high CPU consumption?

The post discusses c1 and c2 compiler threads created by the Java virtual machine to enhance application performance. These threads can sometimes lead to high CPU usage. The article explains differences between the client and server compilers, explains term-related concepts, and offers potential solutions for addressing CPU consumption issues.

Read MoreJVM c1, c2 compiler thread – high CPU consumption?

Java Hashtable, HashMap, ConcurrentHashMap – Performance impact

This post examines the performance characteristics of HashMap, Hashtable, and ConcurrentHashMap through practical examples. It finds that while HashMap is fastest, it is not thread-safe, risking infinite loops. ConcurrentHashMap offers comparable speed with thread safety. Hashtable, however, is significantly slower due to synchronization limiting thread access.

Read MoreJava Hashtable, HashMap, ConcurrentHashMap – Performance impact