Getting Started with Eclipse Jifa

I have been posting multiple videos about the Performance Engineering Series on the QAInsights channel, which will help you to get started with troubleshooting Java applications. In this blog post, we are going to see how you can use Eclipse Jifa to identify potential performance bottlenecks in your Java applications. Let us get started.

Eclipse Jifa

Eclipse Jifa (Java Issue Finder Assistant) is an open-source application to troubleshoot Java applications. The inception phase of Jifa was back in 2020 by Alibaba under the Eclipse Foundation. Developers from Netflix, Alibaba Cloud, and other developers are contributing to the Jifa project.

Creating Mappers Without Creating Underlying Objects in Java

As most Java developers know, putting values in a Java Map (like a HashMap) involves creating a large number of auxiliary objects under the covers. For example, a HashMap with int keys and long values might, for each entry, create a wrapped Integer, a wrapped Long object, and a Node that holds the former values together with a hash value and a link to other potential  Node objects sharing the same hash bucket. Perhaps even more tantalizing is that a wrapped Integer might be created each time the Map is queried! For example, using the Map::get operation.

In this short tutorial, we will devise a way of creating an object-creation-free, light-weighted mapper with rudimentary lookup capability that is suitable for a limited number of associations. The mapper is first created and initialized, whereafter it can be queried. Interestingly, these mappers can also be serialized/deserialized and sent over the wire using Chronicle’s open-source libraries without incurring additional object creation.

CMS Deprecated. Next Steps?

The popular Concurrent Mark Sweep (CMS) GC algorithm is deprecated in JDK 9. According to JEP-291, this decision has been made to reduce the maintenance burden of the GC code base and accelerate new development.

Thus, from Java 9 onwards, if you launch the application with -XX:+UseConcMarkSweepGC (an argument which will activate the CMS GC algorithm), you are going to see below WARNING message:

Key Performance Measurements for App Servers: Cause, Impact, and Resolution

Below are some of the key metrics that need to be monitored during performance testing:

  • CPU utilization
  • Heap memory utilization
  • Number of active/daemon threads
  • Number of classes loaded
  • Server page faults/second
  • Cache hit ratio
  • Active total sessions
  • SSL transactions/second
  • Active/total DB pool connections
  • Application log
  • Load balancing
  • Requests/second

Let's take a look at some of the causes of negative impacts on performance testing and some quick resolutions that will help smooth everything out.

3 GC Techniques to Improve Application Performance

Automated garbage collection (along with the JIT HotSpot Compiler) is one of the most advanced and most valued components of the JVM, but many developers and engineers are far less familiar with Garbage Collection (GC), how it works and how it impacts application performance.

First, what is GC even for? Garbage collection is the memory management process for objects in the heap. As objects are allocated to the heap, they run through a few collection phases – usually rather quickly as the majority of objects in the heap have short lifespans.

Java Performance Optimization

Getting Java apps to run is one thing. But getting them to run fast is another. Performance is a tricky beast in any object-oriented environment, but the complexity of the JVM adds a whole new level of performance-tweaking trickiness — and opportunity. This Refcard covers garbage collection monitoring and tuning, memory leaks, object caching, concurrency, and more.

Deep Dive Into .NET Garbage Collection

Garbage collection, and memory management in general, will be the first and last things to work on. It is the main source of the most obvious performance problems, those that are the quickest to fix but need to be constantly monitored. Many problems are actually caused by an incorrect understanding of the garbage collector’s behavior and expectations. 

You have to think about memory performance just as much as about CPU performance. This is also true for unmanaged code performance, but in .NET it is easier to deal with. Once you understand how GC works, it becomes clear how to optimize your program for its operation. It can give you better overall heap performance in many cases because it deals with allocation and fragmentation better.

Run Faster, Git: The Story of Git Command Slowdown, Branches, and Garbage Collection

Speed up, Git!

My team uses Git for source control. And since we created a bunch of branches for features on the application, we ended up with a ton of branches on our Git repository. While this is not something we cared about initially, the rising number of branches grew rapidly and soon got out of control. This, in turn, resulted in slowing down our Git commands because Git now had to handle the unused branches.

You may also like: Top 20 Git Commands With Examples

This was a challenge that I was interested in solving. In this post, we assess the problems associated with too many Git branches, problem-solving, and a solution to slow Git commands. Let's get started.

Solving Performance Hotspots With Memory Pooling in Go

Solve performance hotspots like solving a puzzle.


You may also like: Optimizing Database Performance and Efficiency

Introduction

Igneous is an unstructured data management company. We move bytes back and forth — that’s what we do. From a low-level programming perspective, we want to touch each byte as few times as possible in order to make things go fast. In a garbage-collected language like Go, that also extends to minimizing how many bytes we allocate for each byte that is moved. One technique at hand for minimizing memory allocations is memory pooling.

Pitfalls in JVM and Docker Defaults

First, there are a lot of articles about JVM and container-awareness:

In this post, I use Java 11, which means the default for garbage collector is supposed to be G1GC! Let's look at the defaults, which are automatically chosen by the JVM depending on memory size and provided CPUs.

Why Your Spark Apps Are Slow Or Failing, Part II: Data Skew and Garbage Collection

The second part of the series “Why Your Spark Apps Are Slow or Failing” follows Part I on memory management and deals with issues that arise with data skew and garbage collection in Spark. Like many performance challenges with Spark, the symptoms increase as the scale of the data handled by the application increases.

What Is Data Skew?

In an ideal Spark application run, when Spark wants to perform a join, for example, join keys would be evenly distributed and each partition that needed processing would be nicely organized. However, real business data is rarely so neat and cooperative. We often end up with less than ideal data organization across the Spark cluster that results in degraded performance due to data skew.

Java: New Developments and Features

Oracle's latest long-term release, Java 11, has been out for several months, Java 12 has just hit the scene, licensing has changed, and MicroProfile is growing. As Java continues to move faster, DZone is committed to educating our readers about the most important new features, why you should move beyond Java 8, how developers are using Java, and more.

How to Tune Garbage Collection in Java

Garbage collection is the mechanism by which the JVM reclaims memory on behalf of the application when it's no longer needed. At a high level, it consists of finding objects that are no longer in use, freeing the memory associated with those objects, and occasionally compacting the heap to prevent memory fragmentation.

The garbage collector performs it's work using one or more threads. But in order to do the job of tracking down object references and moving objects around in memory, it needs to make sure that the application threads are not currently using those objects because if, for example, an application thread is using an object and then the memory location of the object changes due to GC, then bad and unpredictable things could happen. This is why garbage collectors must pause all application threads when performing certain tasks. These pauses are sometimes called Stop-The-World pauses, and the minimization of them is the primary concern of GC tuning, as they can have a huge impact on the performance of a Java application.

Java Garbage Collection Basics

Objects dynamically created using a new operator are deallocated automatically. The technique that accomplishes this is called garbage collection. It works like this: When no references to an object exist, that object is assumed to be no longer needed, and the memory occupied by the object can be reclaimed.

How Does Automatic Garbage Collection Work?

Automatic garbage collection works by looking at heap memory, identifying which objects are being referenced and which are not, and deleting the unused objects. This is widely known as the "Mark and Sweep Algorithm."