f

This performance rule tracks buffering of response data.

If the application has large responses that spend a substantial amount of time being buffered, this can create an excessive memory demand, and elevated Cpu overhead due to data copies and elevated GC activity for ASP.NET responses.

This rule tracks the effective "buffering rate", or the memory actively used by buffered responses. This rate is affected by both the total amount of buffered response data, AND the duration it remains buffered before it is flushed to the client.

Diagnostics

The diagnostics for this rule will determine whether you have:

  • Large responses being buffered.

  • Responses remaining buffered for a long time.

  • A high overall buffering rate. This is influenced by both the sizes, duration, and number of buffered response.

We'll then identify the specific portions of your application that are exhibiting buffering behaviors, specifying the urls and application handlers responsible.



You can then also review individual request traces for requests that had particularly large buffered responses or spent the most time buffering. Each request trace provides details on the request execution that can assist with further analysis.

NOTE: You can emit additional debugging information into each request trace by using the LeanSentry ApplicationMonitoring library.

Improving this score

To improve this score, reduce the overall buffered response rate for the application. This will in turn directly reduce memory usage, and likely improve performance.

The best ways to reduce the buffered response rate are to:

  1. Reduce response sizes. Very large responses that are buffered cause the most memory pressure, especially if they take a while to be flushed to the client.

  2. Reduce duration that responses are buffered. The longer the response is buffered, the more pressure it creates, esp. if its an ASP.NET response (because it places additional load on the GC).

  3. Implement streaming sends for large/slow responses. The best way to send larger and/or slower responses is to generate them in part and stream them to the client, avoiding the need to buffer the entire response in memory.


Additional assistance
If you are on the Business plan, additional assistance and proactive guidance may be available. Contact support@leansentry.com to learn more.




More resources


Want to learn the best techniques for managing your IIS web server? Join our how-to newsletter.
Want to get the best tool for troubleshooting and tuning your web apps? .

Build your skills


Get performance best practices straight from our IIS & ASP.NET experts:


How-to newsletter: 1-2 emails/week with expert IIS & ASP.NET tips.