[Performance] : Flame Graphs

In the previous article we explored the basic capabilities of linux Perf_tool. In this write-up I am trying to extend these capabilities and show how to generate and read Flame Graphs for analyzing the profiles generated with Perf_tool. How to generate Flame Graphs ? To start with, we will need perf_tools linux profiler to capture the profile first. Follow the steps under “How to setup perf tool?” in the previous article. Now if you collect a profile of the CPU using perf_tool setup in the above step, there is a possibility that you might see a lot of symbol link values in the place of Function names. ...

April 26, 2020 · 4 min · Akshay Deshpande

[Performance] : Profiling with linux Perf command-line tool

Most of the Performance Engineers use some sort of profiling tools like Yourkit, Jprofiler or some APM tools like Newrelic, Datadog, Appdynmics etc. Although these tools are easy to use out of the box and help with Observability, they don’t give a complete picture of a Performance problem at occasions. This is where perf Linux profiler comes in handy. This write up is an attempt to explain : - What is perf Linux profiler ? - How to set it up ? - What are its capabilities ? ...

March 15, 2020 · 6 min · Akshay Deshpande

[Performance] : Java's built in diagnostic tool - Jstat

When it comes to Performance Monitoring and analysis, we tend to think of full fledged license tools like Dynatrace, Newrelic, Appdynamics, Yourkit etc. However, if it is a java application which is under diagnosis, java’s built in tools are a good place to start. Java comes with a set of built-in diagnostic tools like - Jconsole, jcmd, jstat, jmap, jstack, jvisualvm, jfr and many more. Each of them help in tackling a kind of problem. For the scope of this article, lets look in to how jstat is useful as diagnostic tools. ...

January 22, 2020 · 3 min · Akshay Deshpande

[Monitoring] - Paging and Swapping in Memory

As a continuation after understanding Virtual Memory in the previous article, this article tries to explain theways to monitor the same. Memory can be looked at with two perspectives: Utilization and Saturation. Utilization tells the memory usage. Checking free/used memory reflects the Utilization. Saturation tells if the memory is used at its full capacity and how the system is using Virtual memory to deal with memory crunch. In other words, if demands for memory exceed the amount of main memory, main memory becomes saturated. The operating system may then free memory by employing paging, swapping, and, on Linux, the OOM killer. Any of these activities is an indicator of main memory saturation. Also, it is important to understand that Paging and Swapping are two different things. More details about the same in the previous article. ...

December 9, 2019 · 4 min · Akshay Deshpande

[Understanding] : Virtual Memory

As a Performance Engineer you will come across Virtual memory very often specially when monitoring or debugging Memory issues. Virtual memory along with below mentioned terminologies are used very loosely across the industry. - Page, Page frame, Page fault, Minor/Major fault, Paging, Swapping etc. This article is an attempt to understand Virtual memory in detail theoretically, in the context of Computer Architecture. What is virtual memory? Virtual memory is not the real memory. It is an abstraction layer provided to each process. It is meant to simplify the software development, leaving the physical memory placement to operating system. To put in very simple terms, the purpose of Virtual memory is to use the hard disk as an extension of RAM, thus increasing the available address space a process can use. Using Virtual memory, system can address more memory than it actually has, and it uses the hard drive to hold the excess. This area on the hard drive is called a page file, because it holds chunks of main memory on the hard drive. ...

November 4, 2019 · 5 min · Akshay Deshpande

[Understanding] : How to read a G1GC log file.

As a Performance Engineer, time and again you will need to look in to GC logs to see how jvm is handling garbage collection. With G1GC being the default gc for java versions 9 & above, one needs to know what the G1GC log actually reads like. To get an understanding of G1GC, here is an in-depth material on it from Oracle tutorials. - link To begin with, there are 50+ jvm parameters for selecting different GC algorithms and customizing them as per requirement. Below link has cheat sheet for all the jvm parameters that you can select from. - PDF ...

October 11, 2019 · 6 min · Akshay Deshpande

[Performance Debugging] : Root causing "Too many open files" issue

Operating system : Linux This is a very straight forward write-up on how to root cause “Too many open files” error seen during high load Performance Testing. This article talks about: The ulimit parameter “open files”, Soft and Hard ulimits What happens when the process overflows the upper limit How to root cause the source of file reference leak. Scenario : During a load test, as the load increased, I was seeing failures in transaction with error “Too many open files”. ...

June 28, 2019 · 4 min · Akshay Deshpande