Search

GC easy – Universal Java GC Log Analyser

Author

Ram Lakshmanan

artist + rebel + engineer.

Inspect the contents of the Java Metaspace region

JVM Memory has following regions:

a. Young Generation

b. Old Generation

c. Metaspace

d. Others region

Continue reading “Inspect the contents of the Java Metaspace region”

Java String intern(): Performance impact

java.lang.String#intern() is an interesting function in Java. When used at the right place, it has potential to reduce overall memory consumption of your application by eliminating duplicate strings in your application. To learn how intern() function works, you may refer to this blog. In this post let’s discuss the performance impact of using java.lang.String#intern() function in your application.

Continue reading “Java String intern(): Performance impact”

Java String intern(): Interesting Q & A

intern() is an interesting function in java.lang.String object. intern() function eliminates duplicate string objects from the application and has potential to reduce overall memory consumption of your application. In this post, let’s learn more about this intern() function.

Continue reading “Java String intern(): Interesting Q & A”

Garbage Collection CPU Statistics

When a Garbage Collection event runs, it spends a predominant amount of its time in the Java application layer. It also spends a certain portion of its time in the Operating System/Kernel layer. 

Continue reading “Garbage Collection CPU Statistics”

In which region intern strings are stored?

intern() is an interesting function in java.lang.String object. intern() function eliminates duplicate string objects from the application and has potential to reduce overall memory consumption of your application. To understand how string intern() function works you may refer to this interesting blog. Intern strings are stored in a string pool in the JVM memory. JVM Memory has following regions:

Continue reading “In which region intern strings are stored?”

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”

Best practices: Java memory arguments for Containers

When you are running your Java application in physical servers, you would have been using ‘-Xmx’ JVM argument to specify the Java heap size. If you are porting your application to Containers, you might be wondering how to configure Java heap size in the container’s world? Are there any best practices? In this article, we will discuss the possible JVM arguments that can be used to specify the Java heap size and the best option to choose. 

Continue reading “Best practices: Java memory arguments for Containers”

Powered by WordPress.com.

Up ↑