Performance improvements make your applications cruise
Faster performance is a key feature of Microsoft IIS 5.0. To kick IIS into high gear, Microsoft has improved many of IIS's core components, such as the Active Server Pages (ASP) engine. The company also has set IIS 5.0's default performance values at fast, realistic numbers. To make IIS run as fast as possible on your systems, you need to make only a few changes in IIS and Windows 2000 settings.
IIS 5.0's ASP engine is dramatically faster than the ASP engine in IIS 4.0. Microsoft's internal testing shows that applications containing only ASP code can run up to twice as fast on IIS 5.0 as they can on IIS 4.0. This speed improvement means that an ASP application running on IIS 5.0 can support up to twice as many users while delivering the same performance that the application does when it runs on IIS 4.0. If you run IIS 5.0, the difference you'll see in application performance will vary depending on your system's configuration (e.g., number of CPUs, memory size, network configuration).
Much of IIS 5.0's improved performance is due to Win2K's efficiency in using multiple processors. Applications that run on Win2K multiprocessor systems are much faster than applications that run on Windows NT 4.0 multiprocessor systems. Efficient handling of multiple processors improves your ASP application performance, making it easy for you to scale up an application's performance by adding processors. Performance-testing of applications (such as Vertigo Software's Fitch & Mather Stocks 2000FMStocks 2000) that rigorously tests scalability and performance demonstrates that Win2K performance beats NT 4.0's performance. Because IIS 5.0 runs on top of Win2K, Win2K's performance improvements as an application server also speed IIS 5.0.
Other features, such as IIS 5.0's Application Protection and component handling and Win2K's file sharing, also affect IIS 5.0 performance. Let's look at these features and at some specific IIS 5.0 settings with an eye toward maximizing performance.
Application Protection
IIS 5.0's Application Protection lets you run applications in an isolated memory process. This feature can increase stability by keeping application processing isolated from IIS.
The three options for IIS 5.0 Application Protection are Low (IIS Process), Medium (Pooled), and High (Isolated). You can change the Application Protection setting on the Home Directory tab of a Web site's Properties page, as Figure 1 shows, or on the Virtual Directory Properties page. (To reach either Properties page, open Internet Services ManagerISM, right-click the Web site or the Virtual Directory that you want to change, then select Properties.) An ASP application in the Low (IIS Process) protection mode runs in the same process space (i.e., inetinfo.exe) that IIS does. If the application crashes and causes a memory violation of the IIS process or a catastrophic failure of another critical server process, IIS and all other Web applications can crash as well.
When you use the Medium (Pooled) Application Protection setting, your application runs with all other pooled applications in the dllhost.exe process. Like applications in the Low (IIS Process) protection mode, if one of the applications that uses the Medium (Pooled) protection mode crashes, it can cause all applications that run in the same process space to crash.
The High (Isolated) protection setting in IIS 5.0 is similar to IIS 4.0's Run in separate memory space setting. When you use IIS 4.0's setting for an ASP application, the application moves to a separate Microsoft Transaction Server (MTS) package. The application's shift to MTS increases stability by separating the application process from IIS, but the application's performance slows considerably because of the overhead involved in marshaling the MTS out-of-process package.
The Application Protection settings in IIS 5.0 operate differently from IIS 4.0's protection setting, however. When you mark an ASP application as High (Isolated) in IIS 5.0, ISM creates a new COM+ application and moves the ASP application into it. (In Component Services Explorer, the new application name will look something like IIS-{Default Web Site//Root/DNATestProject1KLS}; the last part of the nameDNATestProject1KLSis the application name.) Each high-protection application runs in a separate copy of dllhost.exe, so if the application crashes, it's unlikely to cause other applications to crash.
Applications that run under the Medium (Pooled) or High (Isolated) protection setting in IIS 5.0 show a dramatic performance improvement over the way the same applications perform in IIS 4.0, according to the Microsoft Developer Network (MSDN) article "Leveraging ASP in IIS 5.0" (http://msdn.microsoft.com/workshop/server/asp/server02282000.asp). Author J. D. Meier points out that using IIS 5.0's Medium (Pooled) protection setting typically results in better performance than running an in-process application in IIS 4.0. This improvement means that with IIS 5.0's Medium (Pooled) protection setting, you can move your application to a somewhat isolated environment and still get good performance. Even in the High (Isolated) protection setting, an application will perform better than it would if it were running in process in IIS 4.0.