[Performance] : Java Thread Dumps - Part1

This is first of a two parts article which talks about: What are thread dumps? When to take thread dumps ? How to take thread dumps ? What is inside a thread dumps ? What to look for in a thread dump? Majority of the systems today are mutlicore and hyper-threaded. Threading at the software level allows us to take advantage of a system’s mutlicores to achieve the desired pace and efficiency of the application operations. Along with pace and efficiency, multi-threading brings its own set of problems w.r.t thread contentions, thread racing, high CPU usage etc. In this write up we will see how to debug these problems by taking thread dumps on java applications. ...

October 22, 2020 · 7 min · Akshay Deshpande

[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

Weekly Bullet #20 – Summary for the week

Hi All, Here are a bunch of Technical / Non-Technical topics that I came across recently and found them very resourceful. Technical: 107+ Coding Interview Problems with Details Solutions. - link “How do I choose the right resource to learn CS fundamentals?” - Some great resource links in the comments - link “Paper Digest” - a site for newly published research papers. Has variety of topic to subscribe for. - link “List of favorite books on CS concepts/theory” - link “Project lovable” - a site for free scientific programming problems. - link A collection of interactive tutorials, guides and quizzes about maths, algorithms, performance, and programming languages. - link Non-Technical : A twitter thread from Sam Altman (chairman of Y combinator) on “How to be successful at your career” - link The Levels.fyi annual report for software engineering compensation - “Highest paying companies of 2019” - link [Recommended] “Be an easy employee to manage’ - a great thread with insightful comments. - link “Yes, It’s All Your Fault: Active vs. Passive Mindsets” - Great read - link An extract from a book I am reading : “There is difference between losing and being beaten. Being beaten means they are better than you. They are faster, stronger and more talented. … But losing means you lost focus. It means you didn’t concentrate on what was essential. To operate at your highest level of contribution requires that you deliberately tune in to what is important in the Here and Now.” ...

January 10, 2020 · 2 min · Akshay Deshpande

Weekly Bullet #19 – Summary for the week

Hi All ! Here are a bunch of Technical / Non-Technical topics that I came across recently and found them very resourceful. Technical: Most popular and highly recommended technical books. The books are segregated in to variety of topics. - link htop explained in depth - link A person who got 7 offers from companies including Google, sharing his experience on how he did it. - link Roadmaps for becoming a Frontend dev, Backend dev or a DevOps expert. - link Interesting visualization of Bubble-sort with Hungarian folk dance. - link How Shopify successfully merges the work of 1000+ developers everyday. - link. Also, there is a discussion with the author of the post here Non-Technical: For the ones who don’t have time for books, here is a way to get a Page per day of classic books delivered to your inbox. - link Although Feynman’s approach for learning is mentioned here so many times, here is another writing on “The Secret algorithm behind learning” - link A tediously accurate model of the solar system which is a unique educational experience that depicts the scale of the universe. - link How to write better emails (double recommended) - link A short quote from a book : “I’m always suspicious of the ones who say everything’s going well. If you think that things are going well, then it’s usually some kind of arrogance. If it’s too easy for you, you just relax. You don’t make a real effort, and therefore you never find out what it is to be fully human.” ...

December 13, 2019 · 2 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

Weekly Bullet #18 – Summary for the week

Hi All! Here is the weekly summary of Technical / Non-Technical topics that I found very resourceful. Technical: A great post on different Linux tracing systems, which can used for Performance debugging, and how they fit together by Julia Evans. - link Author : Julia Evans A talk from “Strange Loop Conference 2018” on “A Practical Look at Performance Theory” by Kavya Joshi - link Becoming a manager is not the only way up the ladder. If you enjoy getting you hands dirty with technology or if you are not a people person, Technical Leadership path is also an option. More thoughts in this great article - link A git resource repository with 30Day code challenge and resources for Algorithms, Data Structures implementation and more. - link List of softwares (for CI/CD, Code quality, Security) that has free tiers for developers. - link Non-Technical: Over 1300 Free Online courses from Top Universities on wide variety of subjects like History, Architecture, Economics etc. - link On the importance of Morning routine by American author Daniel Pink. - link Podcast recommendation - A podcast from Tim Ferriss with Ben Horowitz. Great talk around leadership in technical fields. - link An extract from the book - “A guide to the good life” " You are living in what to your ancestors would have been a dream world. You take for granted things that your ancestors had to live without. " ...

November 8, 2019 · 2 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