Performance Tuning and Production Troubleshooting Archives - Anuj Varma, Hands-On Technology Architect, Clean Air Activist https://www.anujvarma.com/category/technology/performance-testing-troubleshooting/ Production Grade Technical Solutions | Data Encryption and Public Cloud Expert Wed, 22 Jun 2022 22:35:52 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 https://www.anujvarma.com/wp-content/uploads/anujtech.png Performance Tuning and Production Troubleshooting Archives - Anuj Varma, Hands-On Technology Architect, Clean Air Activist https://www.anujvarma.com/category/technology/performance-testing-troubleshooting/ 32 32 Try the ?nocache=1 option https://www.anujvarma.com/try-the-nocache1-option/ https://www.anujvarma.com/try-the-nocache1-option/#respond Wed, 22 Jun 2022 22:35:52 +0000 https://www.anujvarma.com/?p=8994 TO test correct behavior in a browser (e.g. http not redirecting to https…) try adding a ?nocache=1 to your url

The post Try the ?nocache=1 option appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
TO test correct behavior in a browser (e.g. http not redirecting to https…) try adding a ?nocache=1 to your url

The post Try the ?nocache=1 option appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
https://www.anujvarma.com/try-the-nocache1-option/feed/ 0
APM questions to ask https://www.anujvarma.com/apm-questions-to-ask/ https://www.anujvarma.com/apm-questions-to-ask/#respond Mon, 14 May 2018 14:01:00 +0000 http://www.anujvarma.com/?p=5353 — What is the technology stack of the apps being monitored (J2EE, .NET, PHP…)? —  Do we need to look at specific Application metrics – such as Transactions per second, […]

The post APM questions to ask appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
  • — What is the technology stack of the apps being monitored (J2EE, .NET, PHP…)?
  • —  Do we need to look at specific Application metrics – such as Transactions per second, Response times  etc. Are there any known performance issues at this time (slow response times for certain transactions?)
  • — Do we need to configure Infrastructure Host Metrics (Disk, Network, Memory..)?
  • — Do we need to look at Process Level monitoring ?
  • — Ideally, what events should trigger an alert (note that not all events can trigger an alert)?
  • The post APM questions to ask appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    https://www.anujvarma.com/apm-questions-to-ask/feed/ 0
    Performance Monitoring Tools https://www.anujvarma.com/performance-monitoring-tools/ https://www.anujvarma.com/performance-monitoring-tools/#respond Wed, 07 Feb 2018 17:49:17 +0000 http://www.anujvarma.com/?p=5091 A list of performance monitoring tools. Website Monitoring Tools Insping Updown Pingometer Uptime Robot Pingdom Server Monitoring Tools Insping Monitor.us Nagios Core Ganglia Collectd Network Monitoring Tools Nagios Capsa Free […]

    The post Performance Monitoring Tools appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    A list of performance monitoring tools.

    Website Monitoring Tools

    Server Monitoring Tools

    Network Monitoring Tools

    Application Performance Monitoring Tools

    Real User Monitoring Tools

    The post Performance Monitoring Tools appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    https://www.anujvarma.com/performance-monitoring-tools/feed/ 0
    Static code analysis https://www.anujvarma.com/static-code-analysis/ https://www.anujvarma.com/static-code-analysis/#respond Wed, 07 Sep 2016 16:07:54 +0000 http://www.anujvarma.com/?p=4335 Static code analysis helps identify code vulnerabilities (and performance issues) before code makes it to production. Most ‘code coverage’ tools require the full source code (compilable source code) to run […]

    The post Static code analysis appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    Static code analysis helps identify code vulnerabilities (and performance issues) before code makes it to production. Most ‘code coverage’ tools require the full source code (compilable source code) to run analysis. However, some tools such as FxCop can work against compiled code as well.

    Cross Platform – J2EE and .NET Static Code Scan

    1. SonarQube – Free
      HP Fortify –  Paid

    The post Static code analysis appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    https://www.anujvarma.com/static-code-analysis/feed/ 0
    Quick troubleshooting of slow responsiveness on an IIS–SQL Server app https://www.anujvarma.com/quick-troubleshooting-of-slow-responsiveness-on-an-iissql-server-app/ https://www.anujvarma.com/quick-troubleshooting-of-slow-responsiveness-on-an-iissql-server-app/#respond Thu, 11 Feb 2016 17:19:15 +0000 http://www.anujvarma.com/?p=3833 On the very first set of requests – monitor the incoming requests (by running a SQL profiler trace).  In conjunction, on the IIS server, you may need to run a […]

    The post Quick troubleshooting of slow responsiveness on an IIS–SQL Server app appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    On the very first set of requests – monitor the incoming requests (by running a SQL profiler trace).  In conjunction, on the IIS server, you may need to run a few performance counters to monitor the HTTP requests. If all you care about is the total processing time of the HTTP requests, that info is readily available from the IIS log (no perf counters needed). This is available in the time-taken field in IIS 6.0 and IIS 7.0 HTTP logs.

    The post Quick troubleshooting of slow responsiveness on an IIS–SQL Server app appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    https://www.anujvarma.com/quick-troubleshooting-of-slow-responsiveness-on-an-iissql-server-app/feed/ 0
    Some options for load testing web applications https://www.anujvarma.com/some-options-for-load-testing-web-applications/ https://www.anujvarma.com/some-options-for-load-testing-web-applications/#respond Mon, 16 Nov 2015 21:19:05 +0000 http://www.anujvarma.com/?p=3678 These two tools are commonly used for load testing web applications. 1. Fiddler (free) 2. Visual Studio Ultimate – Web Performance Test Editor (comes with VS Ultimate) Fiddler is really […]

    The post Some options for load testing web applications appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    These two tools are commonly used for load testing web applications.

    1. Fiddler (free)

    2. Visual Studio Ultimate – Web Performance Test Editor (comes with VS Ultimate)

    Fiddler is really easy to get started with.  There are several online videos.  Here is a blog post on getting started with Fiddler and load testing

     

    RESOURCES

    1.      Fiddler Download

    2.      Load Testing with Fiddler

     

     

    Visual Studio Performance Test Editor

    The post Some options for load testing web applications appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    https://www.anujvarma.com/some-options-for-load-testing-web-applications/feed/ 0
    How to handle an unresponsive IIS web application https://www.anujvarma.com/how-to-handle-an-unresponsive-iis-web-application/ https://www.anujvarma.com/how-to-handle-an-unresponsive-iis-web-application/#respond Fri, 12 Jun 2015 18:47:00 +0000 http://www.anujvarma.com/?p=3160 SYMPTOMS – IIS is using up a lot of memory – resulting in a slowing down of request processing. Both – single request processing  – as well as throughput (number […]

    The post How to handle an unresponsive IIS web application appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    SYMPTOMS – IIS is using up a lot of memory – resulting in a slowing down of request processing. Both – single request processing  – as well as throughput (number of requests processed /sec) are subsequently slowed down.

    CAUSE  – If your request contains a ‘long-running’ task – and you end up sending multiple such requests to IIS, pretty soon all available threads in IIS are TIED UP processing these requests.

    POSSIBLE SOLUTIONS :

    Web Gardens

    You can assign more than one IIS worker process for a given application pool (this is called a Web Garden). What this does is effectively provide you with more threads to use. You can accomplish the same thing by increasing the maxThreadsPerCPU (set to 0 for max), however, this is probably set as 0 anyway. So your next step is to create multiple worker processes – each of which uses up all the threads it can. Note that this workaround works only if your ‘long running task’ is not CPU intensive. If it is chewing up CPU resources, creating a web garden (more processes that chew up the CPU) will only make the problem worse. For tasks that simply chew up threads – and are not CPU intensive (e.g. Database UPDATES), the WEB GARDEN workaround is an acceptable one.

    IIS 8.0 Onwards

    The first question to ask is – what is your ASP.NET code doing that is causing this slow down? Whatever this long-running request (task) is (in your asp.net code), you can consider moving it to an IIS background worker process.  This is a new feature available in IIS 8.0.

    IIS 7.X

    There are certain configuration parameters that you can utilize to control the number of threads used per IIS worker process . These include the following parameters:

    <system.web>
       <applicationPool maxConcurrentRequestsPerCPU="12" maxConcurrentThreadsPerCPU="0" requestQueueLimit="5000"/>
    </system.web>

    What are some long-running tasks that chew up threads (but not CPU)?

    • Applications that make long running database requests
    • Applications that have  long-running, synchronous requests (transactions)
    • Applications that have  long-running , network intensive transactions

    Overview of Application Pools and Worker Processes

    1. One IIS server may have multiple application pools.
    2. One web application binds to one application pool.
    3. One application pool may have more than one worker process (when Web Garden is enable).
    4. One worker process can have multiple app domains (an asp.net only concept). One app domain lives only in one worker process.
    5. One app domain may have multiple threads. One thread can be shared by different app domains in different time.

    The post How to handle an unresponsive IIS web application appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    https://www.anujvarma.com/how-to-handle-an-unresponsive-iis-web-application/feed/ 0
    Some important server perfmon counters to monitor https://www.anujvarma.com/some-important-server-perf-counters-to-monitor/ https://www.anujvarma.com/some-important-server-perf-counters-to-monitor/#respond Thu, 07 Aug 2014 02:09:23 +0000 http://www.anujvarma.com/?p=2660 http://www.enduria.eu/key-performance-counters-and-their-thresholds-for-windows-server-recommended-by-microsoft/ Some of the more important ones include: Processor: Processor\% Processor Time (This counter is the primary indicator of processor activity. High values many not necessarily be bad. However, if […]

    The post Some important server perfmon counters to monitor appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    http://www.enduria.eu/key-performance-counters-and-their-thresholds-for-windows-server-recommended-by-microsoft/

    Some of the more important ones include:

    Processor:

    Processor\% Processor Time (This counter is the primary indicator of processor activity. High values many not necessarily be bad. However, if the other processor-related counters are increasing linearly such as % Privileged Time or Processor Queue Length, high CPU utilization may be worth investigating)

    • Less than 60% consumed = Healthy
    • 51% – 90% consumed = Monitor or Caution
    • 91% – 100% consumed = Critical or Out of Spec

    \Memory\Available MBytes

    (Available MBytes is the amount of physical memory available to processes running on the computer, in Megabytes, rather than bytes as reported in Memory\Available Bytes. The Virtual Memory Manager continually adjusts the space used in physical memory and on disk to maintain a minimum number of available bytes for the operating system and processes. When available bytes are plentiful, the Virtual Memory Manager lets the working sets of processes grow, or keeps them stable by removing an old page for each new page added. When available bytes are few, the Virtual Memory Manager must trim the working sets of processes to maintain the minimum required)

    • Low on available memory – less than 10% available
    • Very low on available memory – less than 5% available
    • Decreasing trend of 10MB’s per hour. This could indicate a memory leak.

    \Memory\Pages/sec

    (If it is high, then the system is likely running out of memory by trying to page the memory to the disk. Pages/sec is the rate at which pages are read from or written to disk to resolve hard page faults. This counter is a primary indicator of the kinds of faults that cause system-wide delays. It is the sum of Memory\Pages Input/sec and Memory\Pages Output/sec. It is counted in numbers of pages, so it can be compared to other counts of pages, such as Memory\Page Faults/sec, without conversion. It includes pages retrieved to satisfy faults in the file system cache (usually requested by applications) non-cached mapped memory files)

    • High pages/sec – greater than 1000 (If it’s higher than 1000, the system is could be beginning to run out of memory. Consider reviewing the processes to see which processes are taking up the most memory or consider adding more memory)
    • Very high average pages/sec – greater than 2500 (If this is greater than 2500, the system could be experiencing system-wide delays due to insufficient memory. Consider reviewing the processes to see which processes are taking up the most memory or consider adding more memory)
    • Critically high average pages/sec – greater than 5000 (If this is greater than 5000. If so, the system is most likely experiencing delays due to insufficient memory.

    The post Some important server perfmon counters to monitor appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    https://www.anujvarma.com/some-important-server-perf-counters-to-monitor/feed/ 0
    Configuring an authentication header in fiddler https://www.anujvarma.com/configuring-an-authentication-header-in-fiddler/ https://www.anujvarma.com/configuring-an-authentication-header-in-fiddler/#respond Wed, 23 Jul 2014 22:50:22 +0000 http://www.anujvarma.com/?p=2638 Fiddler – Authentication header Click Rules > Customize Rules…. Inside the OnBeforeRequest handler, add oSession.oFlags["x-AutoAuth"] = "domain\\user:password";

    The post Configuring an authentication header in fiddler appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    Fiddler – Authentication header

    1. Click Rules > Customize Rules….
    2. Inside the OnBeforeRequest handler, add
    oSession.oFlags["x-AutoAuth"] = "domain\\user:password";
    

    The post Configuring an authentication header in fiddler appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    https://www.anujvarma.com/configuring-an-authentication-header-in-fiddler/feed/ 0
    Using TTFB to distinguish between server side and client side page load issues https://www.anujvarma.com/using-ttfb-to-distinguish-between-server-side-and-client-side-page-load-issues/ https://www.anujvarma.com/using-ttfb-to-distinguish-between-server-side-and-client-side-page-load-issues/#respond Fri, 06 Dec 2013 17:19:43 +0000 http://www.anujvarma.com/?p=2095 Introduction This is just a quick note to highlight a commonly used web testing metric for making an initial determination of where the source of bottleneck(s ) might be. TTFB […]

    The post Using TTFB to distinguish between server side and client side page load issues appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    Introduction

    This is just a quick note to highlight a commonly used web testing metric for making an initial determination of where the source of bottleneck(s ) might be.

    TTFB

    Most commonly, testers measure the total response time for a web page. This is the total time for the server to respond – and then the page to load (completely) in your browser. While this is useful, it does not tell you how long the server actually took to respond to your request (since it includes BOTH server and CLIENT (browser) side load times).

    To simplify this measurement, another metric called the Time to First Byte (TTFB) is used.  This is JUST the server’s response time – not including the page load time. 

    The significance of TTFB is that it helps us make a quick determination of how fast or slow the server is at handling a single request.

    Server Side Issue / Slowness

    A high TTFB implies a server side problem. If it is taking the server a long time to return the first pieces of data, chances are that there is/are server side bottlenecks.

    Client Side Bloat

    A low TTFB – but a high page load time, would mean there are front-end issues (CSS, images, scripts). This is especially useful since these issues can be easily and quickly addressed (by techniques such as image compression, CSS and javascript compression etc.).

    Free Tools to determine TTFB

    Fiddler

    Using something called a Timeline View in Fiddler, one can see the entire lifecycle of a server’s response (new to fiddler or load testing?). Here is an example of an actual timeline showing both TTFB and total response time (including client side page load time). In this example, the TTFB is relatively short – and the total response time (including page load) is relatively long. This points to a client side bloat (excessive javascript , css and image sizes…). To figure out exactly how large each of these client side pieces are – you can use the other tool listed below – WebPageTest.org.

    Fiddler’s timeline view – showing TTFB and Total Response (including Page Load) time

    ttfb

    WebPageTest.org

    This tool gives detailed information about various pieces of your web page – and how long each took to load. This complete picture is presented in a sequential timeline showing each component’s loading start and end times. Such a view is called a waterfall view. Here is an example of a waterfall view for my website’s home page – anujvarma.com.

    waterfall_view_webpagetest

    Summary

    A metric called the TTFB can be useful in determining slowness of client or server side components. This metric can provide a quick assessment on whether the slowness is server side or client side or both.

    Several free tools (notably Fiddler and WebpageTest.org) provide these metrics. Using waterfall views (timeline views), one gets a detailed breakdown of each component (images, css, js…) and how long each took to load.

    The post Using TTFB to distinguish between server side and client side page load issues appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

    ]]>
    https://www.anujvarma.com/using-ttfb-to-distinguish-between-server-side-and-client-side-page-load-issues/feed/ 0