DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library
Core Badge
Avatar

Ram Lakshmanan

DZone Core CORE

yCrash - Chief Architect

Joined Mar 2016

https://ycrash.io

About

Want to become Java Performance Expert? Attend my master class: https://ycrash.io/java-performance-training

Stats

Reputation: 5653
Pageviews: 3.5M
Articles: 118
Comments: 13

Expertise

Java Expertise Icon

Java

  • Articles
  • Comments

Articles

article thumbnail
From Symptoms to Solutions: Troubleshooting Java Memory Leaks and OutOfMemoryError
Learn to detect, isolate, and fix Java memory leaks and OutOfMemoryError with practical tips, tools, and heap dump analysis for better performance.
November 18, 2025
· 3,839 Views · 1 Like
article thumbnail
Memory Leak Due To Mutable Keys in Java Collections
Java Collections components (such as Map, List, Set) are used in our applications. When their keys are not properly handled, it will result in a memory leak.
July 15, 2025
· 3,351 Views · 3 Likes
article thumbnail
Memory Leak Due to Uncleared ThreadLocal Variables
ThreadLocal variables in Java, if not cleared, can accumulate in memory, causing an OutOfMemoryError. Learn how to clear them after use to avoid memory leaks.
June 13, 2025
· 4,386 Views · 2 Likes
article thumbnail
Memory Leak Due to Time-Taking finalize() Method
All objects in Java implicitly inherit from java.lang.Object. This class contains multiple methods, which can be overridden in the child class.
May 15, 2025
· 6,048 Views · 2 Likes
article thumbnail
How to Read Thread Dumps Easily and Efficiently
Learn how to capture and analyze thread dumps in Java to troubleshoot performance issues, identify bottlenecks, and optimize your application's performance.
November 19, 2024
· 4,251 Views · 11 Likes
article thumbnail
Effective Methods to Diagnose and Troubleshoot CPU Spikes in Java Applications
In this article, discover a few practical methods to help diagnose and resolve CPU spikes without making changes in your production environment.
November 5, 2024
· 14,006 Views · 12 Likes
article thumbnail
How to Solve OutOfMemoryError: Metaspace
java.lang.OutOfMemoryError: Metaspace is a challenging error to diagnose. Delve into its root causes, potential solutions, and effective diagnostic methods.
September 13, 2024
· 7,618 Views · 6 Likes
article thumbnail
Java Performance Tuning: Adjusting GC Threads for Optimal Results
Find out more about how Garbage Collection (GC) plays an important role in Java’s memory management and helps to reclaim memory that is no longer in use.
August 30, 2024
· 9,837 Views · 4 Likes
article thumbnail
How to Solve OutOfMemoryError: Java Heap Space
Delve into the root causes behind this error, explore potential solutions, and discuss effective diagnostic methods to troubleshoot this problem.
August 6, 2024
· 5,414 Views · 1 Like
article thumbnail
How To Achieve High GC Throughput
In this post, explore a key performance metric studied during garbage collection analysis: garbage collection (GC) throughput.
July 29, 2024
· 5,751 Views · 5 Likes
article thumbnail
Degradation in String Deduplication Performance in Recent Java Versions
String deduplication is an important feature aimed at optimizing memory usage by eliminating duplicate strings from heap memory.
May 7, 2024
· 2,786 Views · 3 Likes
article thumbnail
How To Analyze Node.js Garbage Collection Traces
Explore the process of enabling GC traces, interpreting the trace data, and the right tools and knowledge needed to study the Garbage Collection behavior.
April 25, 2024
· 1,650 Views · 1 Like
article thumbnail
How To Capture Node.js Garbage Collection Traces
Garbage Collection (GC) is a fundamental aspect of memory management in Node.js applications. Explore various methods for capturing GC traces.
April 10, 2024
· 1,923 Views · 1 Like
article thumbnail
Optimizing Robotics Application’s Performance
In this post, we would like to share our real-world experience in optimizing a Java application that was controlling the robots in a warehouse.
March 14, 2024
· 7,052 Views · 1 Like
article thumbnail
Spring RestTemplate to WebClient Causes OutOfMemoryError
Spring Boot is a highly popular framework for Java enterprise applications. We will be analyzing the WebClient crash issues along with how to troubleshoot and fix them.
March 1, 2024
· 11,917 Views · 1 Like
article thumbnail
"Top" Reporting Accurate Metrics Within Containers
“Top” may not accurately report information when executed within a Docker container. This post aims to bring this issue to your attention.
February 20, 2024
· 4,607 Views · 1 Like
article thumbnail
Java NIO: OutOfMemoryError
One of our applications was leveraging this NIO; however, it suffered from frequent ‘java.lang.OutOfMemoryError: Direct buffer memory’ when we were running in Java 11.
January 18, 2024
· 4,469 Views · 14 Likes
article thumbnail
Shenandoah GC Tuning
Shenandoah GC aims to reduce pause times in Java applications by performing garbage collection concurrently with the application threads.
December 13, 2023
· 4,923 Views · 3 Likes
article thumbnail
Java CMS GC Tuning
In this post, we will explore essential CMS JVM arguments, ranging from basic configurations like enabling CMS to advanced options such as compaction and trigger ratios.
December 4, 2023
· 4,177 Views · 1 Like
article thumbnail
Serial GC Tuning
Want to learn about Serial GC tuning? In this post, we will explore techniques to tune Serial GC for enhanced performance specifically.
November 21, 2023
· 3,806 Views · 1 Like
article thumbnail
Exploring the Java ‘hs_err_pid’ File
In this post, we’re about to unravel the enigma of this file. We’ll delve into its purpose, learn how to decipher its contents and explore its vital information.
October 25, 2023
· 6,074 Views · 3 Likes
article thumbnail
Garbage Collection: Unsung Hero
In this post, we embark on a journey to unravel the pivotal role of Garbage Collection analysis and explore seven critical points that underscore its significance.
October 5, 2023
· 4,612 Views · 5 Likes
article thumbnail
How To Aim for High GC Throughput
Explore a key performance metric studied during garbage collection — what it means, its significance in Java applications, and how it impacts overall performance.
September 19, 2023
· 3,807 Views · 2 Likes
article thumbnail
Java Parallel GC Tuning
Parallel garbage collector is one of the oldest Garbage Collection algorithms introduced in JVM to leverage the processing power of modern multi-core systems.
September 8, 2023
· 6,572 Views · 9 Likes
article thumbnail
Diagnose CPU Spikes in a Non-Intrusive Manner
In this post, we are going to discuss a non-intrusive approach (i.e., approach that doesn’t add any noticeable overhead to the application) to diagnose CPU spike.
August 30, 2023
· 4,121 Views · 1 Like
article thumbnail
Java ZGC Algorithm Tuning
ZGC is a specialized garbage collector that focuses on managing large heaps and minimizing pauses in Java applications. Learn more!
August 16, 2023
· 4,034 Views · 3 Likes
article thumbnail
How To Reduce CPU Consumption Caused by Garbage Collection
Delve into 5 effective strategies to help alleviate GC cycle side effects to optimize application performance and mitigate the impact on hosting expenses.
August 8, 2023
· 5,355 Views · 6 Likes
article thumbnail
Is Garbage Collection Consuming High CPU in My Application?
In this article, we will explore a few different approaches to measure the CPU cycles consumed by automatic garbage collection.
July 13, 2023
· 4,667 Views · 3 Likes
article thumbnail
Clear Details on Java Collection ‘Clear()’ API
Several of us might be familiar with the clear () API in the Java collections framework. In this post, let’s discuss what is the purpose of this clear() API?
May 19, 2023
· 5,414 Views · 2 Likes
article thumbnail
Simulating and Troubleshooting Blocked Threads in Scala [Video]
In this series of simulating and troubleshooting performance problems in Scala, let’s discuss how to make threads go into a BLOCKED state.
May 9, 2023
· 3,839 Views · 1 Like

Comments

Is Today’s Microservice More Bloated than Yesterday’s Monolith?

Sep 22, 2021 · Ram Lakshmanan

Interesting point of view Shamsul. Thanks.

Is Today’s Microservice More Bloated than Yesterday’s Monolith?

Sep 22, 2021 · Ram Lakshmanan

Good point Robert. It might be a good contents for a new article. Thanks.

Is Today’s Microservice More Bloated than Yesterday’s Monolith?

Sep 22, 2021 · Ram Lakshmanan

Hello Sree! :-) Yes, seen several times tech world runs behind new buzzwords. But also seen only truth to prevail. Seen it several times. In 2000s, during dotcom boom time everyone was running behind EJB (considered as the holy saviour) just to figure out the scalability bottleneck it brings about.

Is Today’s Microservice More Bloated than Yesterday’s Monolith?

Sep 22, 2021 · Ram Lakshmanan

Agree 100% Allen. To save those few lines of straight forward code, these tooling adds considerable run-time overhead (in terms of CPU & memory) also makes troubleshooting far more complex.

Chaos Engineering: Blocked Threads

May 21, 2021 · Ram Lakshmanan

Hello James! Here is the open source code repo: GitHub - ycrash/buggyapp

Try to Avoid -XX:+UseGCLogFileRotation

Jul 10, 2020 · Ram Lakshmanan

Hello Yogesh! What is the downside you are seeing to this approach? Created files are unique.

Memory Wasted by Spring Boot Application

Nov 29, 2019 · Ram Lakshmanan

Hello Chandra! You may register here to get desktop trial version: https://heaphero.io/heap-trial-registration.jsp

Memory Wasted by Spring Boot Application

Nov 21, 2019 · Ram Lakshmanan

Richard - appreciate your input. We can't dismiss it as 200mb. It's actually whomping 65% of memory is wasted on this vanilla application. Real business applications will be wasting a lot more than this. If you take an AWS EC2 instance, most likely your applications are saturating memory first before saturating CPU, network or storage on that EC2 instance. Just because memory is getting saturated first, you end up provisioning more and more EC2 instances (while other computing resources i.e. CPU, network, storage are still partially utilized). On the other side of the spectrum, a considerable amount of memory is wasted top to bottom because of inefficient programming practices. If you can make your organization write memory efficient code, you can easily cut-down 50% of Cloud provider bill. Which can be several thousands, millions of dollars depending on the organization.

Memory Wasted by Spring Boot Application

Nov 21, 2019 · Ram Lakshmanan

Hello Manish! Appreciate your input. But please note, we aren't doing any customization or enhancement here. We are just deploying vanilla spring boot framework & their poster child pet clinic application. That by itself is wasting 65% of memory.

Memory Wasted by Spring Boot Application

Nov 21, 2019 · Ram Lakshmanan

Accept our apologies. Now fixed it.

Java Suspended Thread States

May 26, 2016 · Ram Lakshmanan

Hello Jose!

It's not true.

Thread will enter in to BLOCKED state when it’s waiting for a monitor lock to enter a synchronized block/method

On the other hand Thread will enter in to WAITING state when it’s calling one of the following methods:

+ Object#wait() with no timeout

+ Thread#join() with no timeout

+ LockSupport#park()

How to Analyze Java Thread Dumps

May 19, 2016 · Eric Genesky

Excellent article. Very informative, You can also use online tools such as: http://fastthread.io/ - which can analyze thread dumps.

Understanding the Java Garbage Collection Log

May 07, 2016 · Ram Lakshmanan

Hello Irfan!

In this case after this GC event old generation's space increased and didn't decrease. i.e. from 684832k to 699071k. One might wonder how come after GC event old generation space didn't decreas?. It's because all objects in Old generation are actively referenced. Plus objects are young generation are promoted to old generation. Thus old generation size increased. This is very evident if you observe the entire log statement:

a. Young generation space decreased from 116544K to 12164K i.e. there was reduction of 104380k (i.e.116544K - 12164K)

b. Overall heap space decrease from 801376K to 711236K i.e. there was a reduction of 90140k (i.e. 801376K - 711236K)

c. #a - #b i.e. 104380k - 90140k (i.e. 14240k) is the amount of objects that are promoted from Young Generation to Old Generation. You can observe this increase in the Old Generation size reported in the log statement i.e. 684832K->699071K (i.e. 14239k)

You can also upload the logs to http://gceasy.io/ tool, it's going to show you all the details visually, instead of diggin through all the GC log details. Below is couple of screen shot from http://gceasy.io/ tool, generated after parsing the GC logs.




User has been successfully modified

Failed to modify user

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook