My Performance Notes for Biztalk Server 2006 R2
I want to share some of my notes about Biztalk Server 2006 performance in terms of programming and configuration. This is just a startup and I will try to share my future findings about Biztalk performance in this entry. I also put some related links at the end of the entry for detailed information.
- Change the setting for the %temp% environment variable of Biztalk Server computer to a dedicated, non-system disk.By default, documents that are buffered to the file system during mapping are written to the %temp% directory of the BizTalk Server computer.
- Use VirtualStream class especially for large file processing in your pipeline components. If you use MemoryStream for large files you may have OutOfMemory exceptions. Virtual Stream uses Biztalk’s buffering directory after a threshold value which is specified in object initialization.
- Use 64 bit host instances because of memory constraint of 32 bit hosts. But some of Biztalk Adapters(FTP, POP3, SQL) and BiztalkExplorerOM class doesn’t run in 64-bit mode. You can continue to use 32 bit host instances for the items which don’t run in 64-bit mode but be careful not to process large files on 32-bit host instances. Because a 32 bit host instance process may only grow to 3 ~ 4 GB Max, even your server has more physical memory space. Please also check “Memory Limits for Windows Releases” document.
8 GB of memory should be considered the minimum for 64-bit Windows because generally 64 bit windows require more memory than 32 bit windows. - One of MSDN document says that ”while processing large files minimize the use of maps in orchestrations”, but it’s a disputed suggestion for me. Because as I mentioned previously, some of Biztalk Adapters (like FTP, POP3 and SQL) does not run in 64-bit mode. Let’s say you are doing a large flat file mapping operation in a pipeline component and it is running on an ftp receive location. You should also consider that your flat file size will be much more when it is disassembled to an xml message and that may cause an out of memory exception. To overcome the memory problem you can use a dynamic mapper orchestration which is running on 64 bit host instance and If you are doing your mapping in a pipeline component, you can also call your receive pipeline from the orchestration.
- Configure antivirus software to avoid real-time scanning of BizTalk Server executables and file drops.
- Minimize use of XmlDocument in .net code and orchestration. All message content loaded into memory while processed with XMDocument and instance’s memory usage becomes around 10 times of the original xml message.
When passing xml messages from your orchestration to your .net code use XLANGMessage instead of XmlDocument. You should also use stream approach especially for large files.
// Stream approach
public static void processXLANGMessage( XLANGMessage msg )
{
StreamReader reader = new StreamReader(msg[0].RetriveAs(typeof(Stream));
}
Related Links
- Biztalk 2006 Performance Handbook
- How BizTalk Server Processes Large Messages
- Orchestration Performance – From Jon Flanders’ Blog
- Optimizing Operating System Performance
- Finding and Eliminating Bottlenecks
- Optimizing Performance for BizTalk Server
- Troubleshooting BizTalk Server Performance
Related posts:
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
