Improving CRM4 Performance under Windows 2008 using IIS7 Output Caching feature

Hi all,

Web content can be divided into two categories: static content and dynamic content. Static content does not change from request to request. The content that gets returned to the web browser is always the same. Examples of static content include HTML files, JPG or GIF files.

The other is dynamic content. This is the response that gets generated for dynamic content changes with every request. Examples include ASP.NET or PHP content.

There is a big range between these two categories which includes semi-dynamic content. Imagine a dynamic ASP.NET page that executes a database query. There is no reason to execute this query on every request if the underlying database tables change infrequently.

The IIS 7.0 Output Caching feature targets semi-dynamic content. It allows you to cache static responses for dynamic requests and to gain tremendous scalability.

I tried to use this feature on my CRM system and the result was quite good. This was not of course fully tested and I have no idea about the impact it can have on Multi-Org environment (sharing same aspx pages via redirection) and with multiple users of course. You need to TEST!

I’m waiting for your comments on this post to see how it’s going on for you and also if you would have some settings to propose.

Please read this if you want more information about this feature:
https://learn.iis.net/page.aspx/154/iis-7-output-caching/
https://learn.iis.net/page.aspx/380/improving-performance-with-native-output-caching/

Basically what you need to do is this:

1°) Open INETMGR, select Microsoft Dynamics CRM web site.
2°) On the Feature View you will have “Output Caching”, double click on it.
3°) On the Action pane, click on “Edit Feature settings”, make sure both cache and kernel cache are enabled and click OK.

Now you need to add your caching rule for the site, we will start at the Root level.

4°) Still at the Root of the Website under Output Caching, click ADD and set:

File Name Extension: bmp
Check Kernel Mode Caching
File Cache Monitoring: Using file change notifications

Click OK and ADD the same caching rule for css, gif, htc, js and png file extensions.

Add also another rule  slightly different for css.aspx pages. Click ADD and set:

File Name Extension: css.aspx
Check User-Mode Caching
File Cache Monitoring: Using file change notifications
Click Advanced, check Query String Variable(s): lcid

You should see something like this:

Capture

In the end the Output Caching Window shall look like this at the Root of the Website.

Output

5°) Now you can add other rules on the others sub folders of the web site, each time you need to select the folder and double click on Output Caching to add another rule.

Add this:

Folder: _forms
File Name Extension: js.aspx
Check User-Mode Caching
File Cache Monitoring: Using file change notifications
Advanced, Query String: etc,FormType,FormName

Folder: _root
File Name Extension: aspx
Check User-Mode Caching
File Cache Monitoring: Using file change notifications
Advanced, Query String: aspx group,area,subarea,etc,supresslink

Folder: Tools
File Name Extension: aspx
Check Kernel Mode Caching
File Cache Monitoring: Using file change notifications

If you have any problem with this, remove the rules, and/or disable the main feature.

Hope this helps and that you will find it interesting. Please let me know how it goes in your comments.

Benjamin LECOQ