Search

Fast thread

Universal Java Thread Dump Analyzer

Category

Java Performance

Synchronized method – Boy Friend Threads & Girl Friend Object

The post explains Java's synchronized methods, highlighting how they restrict access to a method by allowing only one thread to execute it at a time, blocking others. It includes an example where multiple threads attempt to access a meeting function with a simulated girlfriend, demonstrating the importance of synchronization in maintaining order in method executions.

Java Fairness

Coming soon! [banner id="4510"]

Java concurrency

coming soon...

Java class loading – performance impact!

The java.lang.ClassLoader#loadClass() API is essential for loading Java classes dynamically, primarily utilized by frameworks and libraries. Frequent calls can degrade performance, causing application unresponsiveness. Solutions include loading classes once at startup and caching instances, which can mitigate threading issues observed during runtime.

Java Hashtable, HashMap, ConcurrentHashMap – Performance impact

This post examines the performance of HashMap, Hashtable, and ConcurrentHashMap through practical examples. It concludes that while HashMap performs best, it lacks thread safety, leading to potential issues. ConcurrentHashMap offers slightly slower performance but is thread-safe, making it a preferable choice for concurrent applications.

How fastThread Resolved Critical Application Downtime Caused by java.util.UUID#randomUUID()

Java developers often use 'java.util.UUID#randomUUID()' to generate UUIDs, but it can hinder application availability due to potential 'entropy' shortages in the operating system. This can lead to multiple threads entering a BLOCKED state, causing application unresponsiveness. Solutions include upgrading RHEL, installing 'haveged,' or using '/dev/urandom' for randomness.

Performance impact of java.lang.System.getProperty()

The 'java.lang.System.getProperty()' API allows Java developers to read system properties but can degrade application performance when used in critical code paths due to synchronization issues. A real-world example shows 189 threads getting blocked, impacting response time. Solutions include upgrading to JDK 11 or caching property values for improved performance.

Overhead added by collecting thread dumps

The thread dump is crucial for diagnosing Java application issues like CPU spikes and memory usage. A study using the Pet Clinic app on AWS EC2 assessed the impact of capturing thread dumps every 5 and 2 minutes. Results indicated no significant overhead on CPU, memory, or response times for either interval.

Video Blog: 7 JVM Arguments of Highly effective applications

The post highlights the complexity of managing over 600 JVM arguments related to garbage collection and memory. It emphasizes seven key arguments across four videos that enhance application performance for Java, Scala, and Jython. Topics include heap size, thread stack size, garbage collection settings, and error handling.

Up ↑