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”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.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”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”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?”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”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”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?”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”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”