I have recently been working on a project that has a very large customization file (VLCF) with over 60 entities and hundreds of custom attributes in it. On a clean virtual CRM environment, the time it takes to do a full clean import (vanilla CRM database, full import, full publish) of these customizations can take a very long time. Recently, I have turned my attention to trying to improve the day-to-day lives of developers that have to sit around and wait as CRM chugs along on this file. I am working on some deep tweaks that in preliminary tests are improving import speeds by over 50% and publish all speeds by 70%! These scripts are not ready for prime time yet, but in the meantime I figured I would share a few easy things you can do to improve your import times by almost 10%.
First here are the baseline results of a “full clean import and publish”:
| Machine Configuration | Full 60 Entity Import All Time |
| Fast Machine Intel E8500 (3.16GHz) 4GBs of RAM Dual Hard Drives (SATA II) Virtual PC 2007 SP1 Guest OS – 1500MB | Import: 4 minutes 35 seconds Publish: 1 minute 20 seconds |
| Slow Machine Intel D930 (3.0GHz) 4GBs of RAM Single Hard Drive (IDE) Virtual PC 2007 SP1 Guest OS – 1500MB | Import: 14 minutes 30 seconds Publish: Not yet tested |
As you can see, even on the latest hardware available this can take a while!
Since the import / publish process is one of the most painful aspects of working with CRM, I spent some time focusing on why it was so slow. First off the import and publish process is very CPU and IO intensive. On my test environment, doing a full import never required the server to use more than 1200MBs of RAM; and so assuming your host and guest OS’s are optimized and your machine has enough RAM; memory is probably not your bottleneck. Because the disk is the a large part of the import bottleneck, anything you can do to make disk IO faster will help. This includes:
- Making sure your HOST and GUEST machines are defragmented
- Storing the VHD and the DIFF / Undo Disk on separate drives
- Make sure neither the HOST or GUEST is paging to virtual memory
- Since the import process grows the CRM database and CRM log files, be sure that the SQL grow settings are set for efficient growth. On my VPC, the default database size was 10MBs and the default Log size was 1MB. Both were set to grow by 10% at a time. Since the import process grows these files to almost 250MBs and 160MBs respectively; the overhead of the growth was putting extra strain on the import.
I pre-allocated the space for the CRM database and the SQL TempDB (it also grows to about 80MBs during an import) and I was able to reduce my import time by ~10% to 4 minutes 15 seconds.
While 10% improvement is good and very easy to get, it is nowhere near enough and so as I mentioned above I did some serious digging and I have found a way to improve the time by 50% or more. Stay tuned for details…
This posting is provided "AS IS" with no warranties, and confers no rights.