Search

GC easy – Universal Java GC Log Analyser

Category

Educational – Best Practises

Java Hashtable, HashMap, ConcurrentHashMap – Performance impact

There are a good number of articles that articulate functional differences between HashMap, HashTable and ConcurrentHashMap. This post compares the performance behavior of these data structures through practical examples. If you don’t have patience to read the entire post, here is bottom line: When you confront with the decision of whether to use HashMap or HashTable or ConcurrentHashMap, you can consider using ConcurrentHashMap since it’s thread-safe implementation, without compromise in performance.

Continue reading “Java Hashtable, HashMap, ConcurrentHashMap – Performance impact”

Benefits of setting initial and maximum memory size to the same value

When we launch applications, we specify the initial memory size and maximum memory size. For the applications that run on JVM (Java Virtual Machine), initial and maximum memory size is specified through ‘-Xms’ and ‘-Xmx’ arguments. If Java applications are running on containers, it’s specified through ‘-XX: InitialRAMPercentage’ and ‘-XX: MaxRAMPercentage’ arguments. Most enterprises set the initial memory size to a lower value than the maximum memory size. As opposed to this commonly accepted practice, setting the initial memory size the same as the maximum memory size has certain ‘cool’ advantages. Let’s discuss them in this post.

Continue reading “Benefits of setting initial and maximum memory size to the same value”

Memory leak due to improper exception handling

In this post let’s discuss an interesting memory problem we confronted in the production environment and how we went about solving it. This application would take traffic for a few hours after that it would become unresponsive. It wasn’t clear what was causing the unresponsiveness in the application.

Continue reading “Memory leak due to improper exception handling”

Garbage Collection tuning success story – reducing young gen size

When you tune Garbage collection performance, you are not only improving Garbage collection pause time but also the overall application’s response time and reducing cloud computing cost. Recently we helped to tune the Garbage collection behavior of a popular application. Just by making a minor change, it resulted in a dramatic improvement. Let’s discuss this garbage collection tuning success story in this post.

Continue reading “Garbage Collection tuning success story – reducing young gen size”

How to do GC Log analysis?

Analyzing garbage collection log provides several advantages like: Reduces GC pause time, reduces cloud computing cost, predicts outages, provides effective metrics for capacity planning. To learn about the profound advantages of GC log analysis, please refer to this post. In this post let’s learn how to analyze GC logs?

Continue reading “How to do GC Log analysis?”

Flavors of OutOfMemoryErrors

OutOfMemoryError is a runtime error in Java that occurs when the Java Virtual Machine (JVM) is unable to allocate an object due to insufficient space in the Java heap. The Java Garbage Collector (GC) cannot free up the space required for a new object, which causes the error.

Continue reading “Flavors of OutOfMemoryErrors”

Detect proactively whether application’s memory is under-allocated

 When the application’s memory is under-allocated, it will result in the following side-effects: 

 a. Transactions response time will degrade

 b. CPU consumption will spike up

 c. OutOfMemoryError will be thrown

Only when OutOfMemoryError is thrown, most of us start to look at our application’s memory settings. This is like only when a patient goes to a critical condition; we begin to give treatment :-). 

In this post, let’s discuss how to detect whether your application’s memory is under-allocated or not in a proactive manner.

Continue reading “Detect proactively whether application’s memory is under-allocated”

Interesting Garbage Collection Patterns

As the author of GCeasy – Garbage collection log analysis tool, I get to see few interesting Garbage Collection Patterns again & again. Based on the Garbage collection pattern, you can detect the health and performance characteristics of the application instantly. In this post, let me share few interesting Garbage collection patterns that have intrigued me.

Continue reading “Interesting Garbage Collection Patterns”

Is today’s microservice more bloated than yesterday’s monolith?

I am slightly hesitant to write this post, as it might attract some criticism. Nevertheless, I told myself there is nothing wrong with sharing my point of view (even though it might not be well accepted). I would like to share my personal experience regarding yesterday’s Monolithic and today’s Microservice architecture in this post.

Continue reading “Is today’s microservice more bloated than yesterday’s monolith?”

Powered by WordPress.com.

Up ↑