I have heard a few of my developer friends say: “Garbage Collection is automatic. So, I do not have to worry about it.“ The first part is true, i.e., “Garbage Collection is automatic” on all modern platforms – Java, .NET, Golang, Python… But the second part i.e., “I don’t have to worry about it.” – may not be true. It is arguable, questionable. Here is my case to showcase the importance of Garbage Collection:Continue reading ““I don’t have to worry about Garbage collection” – Is it true?”
I was surprised to witness the Java Executor behavior – which caused “java.lang.OutOfMemoryError: unable to create new native thread” in our application. I would like to share my surprise (i.e. problem) and resolution to it.Continue reading “Memory Leak in Java executor”
Java applications tend to contain hundreds (sometimes thousands) of threads. The majority of these threads are in WAITING, TIMED_WAITING (i.e., dormant) state, while only a small portion of the threads are actively executing lines of code. So, we were curious to know whether dormant threads consume less memory than active threads.
To figure out an answer to this question, we conducted a small study. Our findings were interesting, thus sharing with you.Continue reading “Java threads – may not be memory efficient?”
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”