Darren Liu's Blog

Posts Tagged ‘CRM 2011

Learned something new on IIS Compression

leave a comment »

Dynamics CRM is a web app, therefore it leverages IIS. Usually IIS compression is enabled by default since we would like to reduce bandwidth usage and also reduce the page load times. The .aspx files sent by the server to the browser is highly compressed by algorithms such as gzip. IIS 7+ offers the ability to cache not only compressed static files, it also compressed dynamic files. Modern browsers have the ability to decompress the incoming files.

IIS Compression uses the CPU to compress the files, I’ve learned that compression is automatically switch OFF when CPU usage is above 90% for Dynamic file and 100% for Static files. It will automatically switch back ON when the CPU drops back to 50% for both Dynamic and Static files. You can modify these limits in the applicationHost.config file which is normally in the C:\Windows\System32\inetsrv\config folder.

I want to bring this to everyone’s attention because usually during CRM performance testing, we often push the server CPUs to their limits. Please look at your CPU usage on your front end servers to make sure that they don’t hit the IIS compression limits and you will have a more accurate performance test.


Written by darrenliu

03/26/2014 at 4:10 am

Determine the # of Outlook Client Users

leave a comment »

I got another interesting question from my customer today.  How many users configured the CRM Outlook client?  Thanks to my PFE friend, KG, he provided us the SQL query to get that information. 

To get the # of subscription clients in CRM, you may execute the query against the [ORGNAME]_MSCRM database below.

select distinct MachineName from SubscriptionClients

Written by darrenliu

10/01/2013 at 4:10 pm

Posted in CRM, Outlook Client

Tagged with ,

CRM 2011 Performance Tuning Lesson Learned

with 2 comments

Oh well, when it comes to tuning the CRM 2011 application, there are many things we can do.  The project that I am working on for the past two years is finally finished with performance tuning, I like to write down a few things that I learned from the tuning exercise just in case that I need to do it in the future.  Thanks to my friend, Grant Geiszler for sharing some of the information with me.

  1. Infrastructure
    • Reduce network latency, make sure the network routings to the servers are correct.
    • Make sure the SPNs are setup correct between servers and the different service accounts in used.
    • Make sure the IIS AppPool Recycle time is adjusted.
    • Make sure the load balancer are setup correctly using the correct profile.
      • If using F5 load balancer, please review the Deployment Guide provided by F5. The deployment guide is written for Microsoft Dynamics CRM 4.0 however most of the configuration applies to CRM 2011 as well. The profile that we used has the following settings.
        ltm profile tcp pr_irpc_tcp_120min {
        ack-on-push enabled
        bandwidth-delay disabled
        defaults-from tcp
        idle-timeout 7200
        nagle disabled
        proxy-buffer-high 131072
        proxy-buffer-low 98304
        receive-window-size 65535
        send-buffer-size 65535
        slow-start disabled

  2. Customization/Coding Optimization
    • Reduce the # of REST/SOAP calls, consolidate the client-side calls into a server side plug-in.
    • If you are using the REST endpoint to retrieve related information, only return the fields that are needed.  If returning all of the fields from an entity, it’ll drag down the performance because the return page-size.  We have entities storing a lot of data, the return page-size was up to 5MB, after the optimization and only returning the fields that we need, the page-size reduced to KB.
    • Avoid registering too many synchronous plug-ins, try to convert some of the plug-ins to asynchronous when possible.
  3. CRM Optimization
    • Enable authPersistNonNTLM.
    • Enable WCF compression.
    • Turn off IM Presence Functionality if not needed by updating the IsPresenceEnabled field to false in the OrganizationBase table.
    • Add EnableRetrieveMultipleOptimization (value 2) to the registry under HKLM\Software\Microsoft\MSCRM.
    • Add MaxUserPort (value 65534) and TcpTimedWaitDelay (value 30) to the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters.
    • Monitor the AysncOperationBase table.  Schedule a periodic job to clean up the AsyncOperationBase table.  More information on removing the records from the AyncOperationBase table and to schedule a job to clean up the table, please refer to KB 968520.
    • Reschedule the CRM 2011 Maintenance Jobs. By default CRM 2011 creates 6 maintenance jobs which are scheduled to run daily.  Depends on when the CRM Organization is created, the jobs may run when users are in the system.  You may download the CRM 2011 Maintenance Job Editor Tool to reschedule the jobs.  More information on the tool and how to use the tool, the premier team wrote a post on their blog.
  4. SQL 2008 Optimization
    • Set degree of parallelism from 0 to 1. This disables the parallel execution of the simultaneous operations on the SQL server.
    • Turn Read Committed Snapshot On.
    • Configure the TempDB Drive using the SQL best practice.
    • Validate the Max/Min Memory Configuration.
    • Validate Processor Configuration is set to use Normal mode and not fiber mode.

Anyway, I am sure there are many more optimization that you can do to the Outlook client, IE and the client OS. I hope the above tips can give you a head start.

Written by darrenliu

06/13/2012 at 11:58 pm

Posted in CRM, Performance

Tagged with , , , ,

CRM 2011 Import: An existing connection was forcibly closed by the remote host

leave a comment »

We ran into an issue when importing a solution to few of our environments.  The import failed and we received an error message telling us that “An existing connection was forcibly closed by the remote host.”  We have tried so many different approaches to solve this problem: making the solution smaller, updated timeout values, updated the registry key, etc… The problem still remains.  The pattern we saw was that the import failed and times out at exactly 30 minutes. If the import finishes in less than 30 minutes, everything works.

After days of troubleshooting, we found out that the CRM application server only allocated 1 CPU instead of 2.  We increased the number of CPU to 2 and everything works like a charm!  I guess that’s why IG recommended 2 CPUs at a minimum.


Inner Exception: “{Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.”}


Increase the # of CPU on the application server.  2 Minimum.

Written by darrenliu

02/29/2012 at 10:00 pm

Slow Internet Explorer 7 (IE7) Performance

with one comment

I am working on a global Dynamics CRM 2011 project and we are encountering performance issues on Internet Explorer (IE) 7.  I guess there are several options to tackle this problem.

  • Option 1: If you customer is ok with upgrading all of the users to IE 8 or 9, they will see performance enhancements for sure comparing to IE 7.  However not an ideal option since enterprise customers are not moving as fast as smaller companies on their infrastructure and on the users’ operating system.
  • Option 2: Update 2 IE settings and add a registry key to the user’s machine, I can’t believe what I am seeing.  CRM 2011 performs extremely well after the changes.  Here’s what I did.
    1. Change the Internet Explorer settings
      • Navigate to Tools | General | Tabs (Settings).
      • Unselect Enable Quick Tabs.
      • Select Let Internet Explorer decide how pop-ups should open.
      • Click OK and then restart the browser.
    2. Add the following registry key (by default, IE only has 2 connections)
      • Click Run  | Regedit.
      • Navigate to hkeycurrentuser\software\microsoft\windows\currentversion\internetsettings.
      • Add new DWORD MaxConnectionPerServer with Decimal value of 10.
      • Add new DWORD MaxConnectionsPer1_0Server with Decimal value of 10.
      • Close Regedit.

Thanks to my buddy, Jim Wang, for the great tips!

Written by darrenliu

02/22/2012 at 3:29 am

Chance to Get a free e-Copy of our CRM book!

with 5 comments

Do you want to read our book for free?  Our publisher is giving away two free e-copies of our book, Microsoft Dynamics CRM 2011 New Features,  if you tell us one or more of features that make you want to own this book in the comments section below (on this post).  Two of the individuals who have the best reason will get a free e-book. 

Please make sure you provide me your contact information so I can get in touch with you.

Thank you for your support!


Darren Liu

Written by darrenliu

02/08/2012 at 1:41 am

Posted in Book, CRM

Tagged with ,

The CRM Book: Microsoft Dynamics CRM 2011 New Features

leave a comment »

Packt Publishing released the book Microsoft Dynamics CRM 2011 New Features.  This book covers CRM 2011’s new features by walking a person through building an Airline Compensation Management System in CRM.  Jim Wang and I spent many hours on the book past year and now it’s available on Amazon.com.  I hope you can learn something from our book.


Written by darrenliu

11/07/2011 at 7:10 pm

Posted in Book, CRM

Tagged with ,