<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ravi Pulle on Medium]]></title>
        <description><![CDATA[Stories by Ravi Pulle on Medium]]></description>
        <link>https://medium.com/@ravi.pulle_93176?source=rss-4b52024894e4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*20pSPurq9ufSP5yephzgWQ.jpeg</url>
            <title>Stories by Ravi Pulle on Medium</title>
            <link>https://medium.com/@ravi.pulle_93176?source=rss-4b52024894e4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 14:00:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ravi.pulle_93176/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Future of Performance Engineering: Automation, Cloud-Native Applications, and User Experience]]></title>
            <link>https://medium.com/@ravi.pulle_93176/the-future-of-performance-engineering-automation-cloud-native-applications-and-user-experience-124b30e2b0b8?source=rss-4b52024894e4------2</link>
            <guid isPermaLink="false">https://medium.com/p/124b30e2b0b8</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[performance-testing]]></category>
            <category><![CDATA[performance-engineering]]></category>
            <category><![CDATA[performance-monitoring]]></category>
            <category><![CDATA[autoscaling]]></category>
            <dc:creator><![CDATA[Ravi Pulle]]></dc:creator>
            <pubDate>Mon, 17 Apr 2023 21:32:08 GMT</pubDate>
            <atom:updated>2023-04-17T22:11:49.864Z</atom:updated>
            <content:encoded><![CDATA[<p>Performance engineering is a critical discipline that helps organizations achieve optimal performance in their software systems. With the increasing reliance on technology and the constant evolution of software, the future of performance engineering looks bright. This article will explore the future of performance engineering, including the latest trends and technologies shaping the industry.</p><p>One critical aspect is identifying the bottlenecks as quickly as possible. It could be CPU, Memory, Disk I/O, Network, OR Database, and scale the system to meet the desired capacity needs. Not only the trends in metrics but there is also a need to identify the code that is driving them and find anti-patterns to make it more automated. This demands processing large volumes of time series and diagnostics data using AI/ML and DL techniques.</p><p>With advancements in hardware accelerators in recent years, with new trends emerging to improve their performance, efficiency, and versatility, such as GPUs, FPGAs, and ASICs, that are designed to accelerate computations, Artificial Intelligence (AI) and Machine Learning (ML) are revolutionizing performance engineering by enabling more intelligent and proactive performance testing and optimization. AI and ML can help performance engineers identify patterns and anomalies in large volumes of performance data and make data-driven decisions to optimize system performance.</p><p>Now, the automation of performance testing, analysis, and optimization is done using advanced tools and with cloud providers offering specialized hardware for compute-intensive workloads without investing in their own hardware. Large amounts of metric, profiling, and diagnostics data can also be efficiently stored in cloud offerings with less spending.</p><p>With the increasing adoption of cloud-native technologies, performance engineering is also evolving to meet the unique demands of these applications. Cloud-native applications are designed to be highly scalable, resilient, and fault-tolerant, and performance engineering practices need to align with these design principles. Deep learning techniques are also used in auto-scaling by predicting future demands of the services.</p><p>Though cloud-native technologies are boosting scaling needs, it is also essential to understand Vertical and Horizontal scaling limitations. From a design point of view, the application should use caching, connection pools, detection, auto-remediation, and better load-balancing techniques and avoid having a monolithic, centralized database, and synchronous I/O for better results.</p><p>DevOps teams need to work closely with performance engineers to ensure that performance testing is integrated into their CI/CD pipelines and that performance issues are identified and resolved early in the development cycle. This collaboration also helps performance engineers better understand the development team’s needs.</p><p>Also, As software applications become more complex and interconnected, performance engineering needs to shift its focus from traditional performance metrics like response time and throughput to the user experience. Performance engineers must understand how end-users interact with the application and how performance impacts their experience. This shift towards user experience also helps organizations align their performance engineering efforts with their business goals by prioritizing performance improvements that directly impact user satisfaction and retention.</p><p>In conclusion, the future of performance engineering is bright and exciting, focusing on automation, cloud-native applications, hardware accelerators, AI and ML, collaboration with DevOps teams, and a shift toward user experience. As organizations continue to rely on software to drive their business processes, performance engineering will become even more critical to ensure optimal performance and user satisfaction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=124b30e2b0b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Low Overhead Continuous Contextual Production Profiling]]></title>
            <link>https://medium.com/@ravi.pulle_93176/low-overhead-continuous-contextual-production-profiling-5a229ec7df3b?source=rss-4b52024894e4------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a229ec7df3b</guid>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[jvm]]></category>
            <category><![CDATA[profiling]]></category>
            <category><![CDATA[continuous-profiling]]></category>
            <category><![CDATA[context-awareness]]></category>
            <dc:creator><![CDATA[Ravi Pulle]]></dc:creator>
            <pubDate>Tue, 21 Mar 2023 20:46:03 GMT</pubDate>
            <atom:updated>2023-04-17T22:59:46.853Z</atom:updated>
            <content:encoded><![CDATA[<p><em>by</em> <em>Ravi Pulle</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ND7kV3GBMyTzsi5qo1pYQ.jpeg" /></figure><p>It is common to investigate performance bottlenecks like CPU and Memory in production applications to find and fix the root causes. To get visibility into the problem, we collect various metrics and logs to monitor resource utilization like CPU, memory, and application-specific latencies. This data collection does not cause any degradation to application performance. Still, unfortunately, this data will not give visibility into operations at the code level, which are the method, socket, thread states, etc. but collecting these profiles introduces overhead on application run time. They also are significantly large to store and visualize. In this blog, we are going to discuss about low overhead high-frequency profilers, attaching application context to profile samples, collecting profiles of tens of thousands of application deployments, efficiently storing and visualizing stacks, a new approach to comparative analysis, aggregation for a more extended period and aggregation of profiles across a large number of similar deployments.</p><p><strong>Why is production profiling critical for root cause analysis?</strong></p><p>The usage patterns of a production environment vary a lot, making it difficult to simulate some of the production incidents in test environments to triage and find root causes. We will not have access to production environments for several reasons (security and trust etc.). Then when an incident happens, we need to narrow down problems incredibly rapidly to unblock customers, which demands production profiling and diagnostics data to be available all the time.</p><p><strong>Selecting a profiler</strong><br><strong>Note</strong>: <em>Though profiling concepts are generic to various languages, we use JVM profiling in this blog for the topic of interest</em>.</p><p>Profilers can provide many data dimensions, and it is impossible to capture all of them due to performance and data constraints. The first step is to identify what we need to analyze production incidents but a minimum of method profiles to detect CPU regressions, socket I/O to analyze network-related issues, monitor deadlocks, and wait and memory profiles.</p><p>Various profiling techniques are available, but they have limitations and must be cautious while solving a given use case. For example, statistical sampling is not entirely accurate but has low application overhead, whereas instrumentation profiling is more accurate but disruptive to application run times. Also, when it comes to Java, some profilers depending on JVM Tool Interface (JVMTI) need to wait for all threads to go to a safe point to be able to collect a stack trace sample, causing application pause time. In contrast, some others that use the HotSpot JVM AsyncGetCallTrace<strong> </strong>interface do not incur safe point bias. It is also essential to consider licensing costs when an open-source profiler is a great fit. Considering the above points, we opted for Java Flight Recorder (JFR) and Async Profiler as they support the sampling profiling technique and have no safe point bias.</p><p>The following are a few observations while evaluating JFR and Async Profiler with an application holding several thousands threads serving requests, a very large heap, and tens of thousands of classes.</p><ul><li>JFR method profiling at 10ms frequency did not show any noticeable application degradation.</li><li>JFR Socket I/O profiling generated too many events with a default 20ms threshold.</li><li>JFR Java native profiling did not show any noticeable application degradation, however it added significant size.</li><li>JFR and Async Profiler both showed application performance degradation while collecting memory profiles, and did not seem fit for continuous production profiling.</li><li>JFR Java Monitor wait/park generated too many events causing data overhead.</li><li>Async Profiler method profiling did not show any noticeable application degradation. However, on-demand agent attachment took a few minutes when many class loading and unloading were present.</li><li>Async Profiler native profiling did not show any noticeable application degradation.</li></ul><p>The results can be different for another application, but a similar evaluation approach is critical to finalize a profiler and what data can be collected without application disruption. After evaluating the pros and cons, the following optimal configuration is used.</p><ul><li>JFR Continuous method profiling at 10ms frequency to analyze CPU regressions.</li><li>JFR Continuous Socket I/O profiling at 200ms threshold (traces any individual socket operation that is taking more than 200 ms).</li><li>JFR Continuous Java native profiling at 10ms frequency, which includes socket sampling (vs. tracing above).</li><li>JFR on-demand live object samples to analyze memory bottlenecks.</li><li>Thread dumps (incur safe point bias) using Jstack once every 1 min to analyze long-running transactions and deadlocks.</li><li>Async profiler on demand for method and native profiles to analyze issues in calls made to the Operating system.</li><li>Async profiler on-demand memory profiling to analyze memory bottlenecks.</li></ul><p><strong>Handling large profile data volumes</strong><br>One of the critical challenges while collecting profiling data is volume. Profiles tend to be very large (5 minutes of collection from a single application resulting few hundred Mb), making it difficult to store, retrieve and visualize at a later time. We solved this problem in three ways, 1. by storing 10 min window aggregated profiles, 2. hashing frame strings and 3. by applying a threshold on the aggregations. The aggregation reduces duplicates, and the threshold will ignore stack traces that occur less than a number that is not considered to be a significant contributor. After several experiments, we devised the data structure shown below and used object serialization to generate aggregated json blobs. The data structure is built with indexes to facilitate faster query abilities, like getting a given stack or navigating the profile. This also helped to reduce profile size by 10 times.</p><p>data structure: (refer open source <a href="https://github.com/salesforce-misc/perfGenie">perfGenie</a> for more implementation, scale and s3 storage details)</p><pre>HotspotBlob{<br>Node trie; // structure to hold paths<br>Long start;// stacktrace sample start time<br>Long end;// stacktrace sample end time<br>Map&lt;Integer, String&gt; nodevalueMap; //node value hash to value<br>Map&lt;Integer, List&lt;StackidTime&gt;&gt; tidMap; //tid and stacktrace sample timeline<br>Map&lt;Integer, List&lt;CustoEvent&gt;&gt; custoevents; //map of pid and list of custom events<br>}<br>Node{<br>int hash; //node frame value hash<br>int sz = 0;//node occurance size<br>int sf = 0;//did the path end at this node?<br>List&lt;Node&gt; nodes; // structure to hold paths<br>Map&lt;Integer, Integer&gt; sm; // index to unique stacktrace, denote start and end of path<br>}<br>StackidTime {<br>Integer hash;<br>Integer time;<br>}<br>TidTime {<br>Integer tid;<br>Integer time;<br>}</pre><p><strong>Attaching application context to profile samples</strong><br>In large monolithic applications, the transactions could be from many features, users, or organizations. It is also critical to narrow down profiles for a specific segment, organization, user, etc., to investigate a given problem. Attaching contextual data (feature, organization or user, etc.) to a profile of profilers collecting samples at high frequency will affect application performance if we try to add context to every sample. To solve this problem, we took an alternative approach and attached context to transaction spans as JFR custom events. Using a post-processing task, the context is attached to each sample by mapping time and thread id to transaction span events. Once samples are associated with the application context, it will be easy to filter them the way we want.</p><p>The following are some of the screen shots of context filtering features available in open source project <a href="https://github.com/salesforce-misc/perfGenie">perfGenie</a></p><p>Context filters support using JFR custom event spans.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bR01f7gu00h5wX4rihA3cA.png" /></figure><p>Profile view for a single request transaction</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EDsNSV-YJpf0JjnrVT7TJg.png" /></figure><p><strong>Comparative analysis</strong><br>CPU and memory profiles collected are visualized in the form of aggregated call tree/ backtrace tree/ flame graph for a given time window. However, these visualization does not provide a timeline of stack trace changes to tell what code path is precisely contributing to CPU or memory spike at a given time. The standard techniques used to find regressions are comparing with a baseline profile and visualizing a tree diff or flame graph diff view which are supported in perfGene. However, a new approach showing the time dimension in profile visualization will help identify any regressions. The project <a href="https://github.com/salesforce-misc/perfGenie">perfGenie</a> has two innovative time-dimension visualizations, river and hotspot surface views, which can help to correlate CPU / Memory trends with profile changes and identify regressions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sYeVu5iBoumSDYEImO0JTg.jpeg" /></figure><p><strong>Aggregation of profiles for a longer period and aggregation of profiles across large number of similar deployments</strong><br>Visualizing profiles for a longer time range and combining a large number of profiles collected from similar deployments is critical to understand the breadth of impact of an application. However, this becomes more challenging when the profile size is too large. The blob structure and the threshold approach helped solve this problem. PerfGene can select multiple hosts and a more extended time range to visualize the profile.</p><p><strong>Conclusion</strong><br>Continuous production profiling is critical to solving a variety of problems in application deployments. The volume of data and visualizations is challenging. However, <a href="https://github.com/salesforce-misc/perfGenie">perfGenie</a> has an optimal solution using compressed blobs, thresholds, and profile visualization with a time dimension.</p><p><strong>What is next? </strong><br>As the profiling solutions evolve, we need zero overhead profiling solutions to understand applications’ CPU and Memory aspects. It will be interesting to see how JFR streaming will help solve some of these challenges. Though the new timeline views permit the identification of regressions, AI correlation models should be explored to automate reducing noise.</p><p><strong>Credits to</strong>: <em>Ravi Pulle, Eric Gross, Laksh Venka, Yuhan and Ajay</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a229ec7df3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>