
Internet Information Services 6.0
Moving now to the application layer of the operating system, one component
that underwent considerable changes with this release is the Internet
Information Service (IIS), which is now available as IIS 6.0. As a security
precaution, IIS, as well as other components of the server that were installed
by default with Windows 2000, is now available as an optional component that can
be installed during server configuration after the core installation process has
completed. The majority of the changes focus on improving the performance and
reliability of the server. In this article, we will only focus on the
architectural changes and not the operational changes.
In IIS 5, there were two isolation options for Web applications running on
the server. An application could run as a process, thereby creating one process
for each application running on the system, or all of the applications could run
as part of a separate process, conserving the amount of resources consumed by
the Web server. This mode of operation is still available with IIS 6, but is not
the default mode and needs to be set explicitly at the server level through the
IIS MMC plug-in. Figure 2 shows the process structure of IIS running in IIS 5
isolation mode. In the example shown, one application is running as part of the
main Web service process, using no isolation at all, and another one is set up
to run as part of the single-pooled process called dllhost.exe.

Figure 2. Process structure of IIS when the server is
configured to run in IIS 5 isolation mode.
IIS 6 introduces the concept of a worker process and a new isolation mode. A
worker process is similar to a unique instance of dllhost.exe that
is used to host one or more applications or sites. Since more than one
application can be assigned to run on a given worker process, IIS 6 uses the
term "application pool" to refer to them. The main inetinfo.exe
process is now a separate, totally isolated process, with no applications
running within its memory space. This increases the reliability of the Web
server itself. In addition, the administrator can now control how many worker
processes are spawned and the assignment of applications to those worker
processes. This makes the configuration very flexible, in that the administrator
can decide how to trade off isolation and reliability in exchange for the amount
of system resources consumed by the Web applications. Figure 3 shows the process
structure of IIS running in the new default isolation mode. The example shows
that there are two worker processes configured, one running a single application
and the second one running multiple applications.

Figure 3. Process structure of IIS when the server is
configured to run in the new isolation mode.
You've probably noticed a third block in the figure, called a Web garden.
When we introduced the term "worker process" earlier in this section, the
explanation indicated that a single worker process forms an application pool to
which Web applications and sites are assigned, but that is not always the case.
When constructing an application pool, the administrator has the option to
decide how many worker processes to assign to the pool. When two or more worker
processes are configured as part of an application pool they form what is
referred to as a Web garden. A Web garden allows an application to
achieve higher scalability, since multiple processes are used to process
requests on its behalf. A Web garden is like a Web farm (in that it aims to
achieve higher scalability), but within the confines of a single server.
Figure 4 shows the new look of the MMC plug-in for IIS. The tree control has
a list of Web sites as before, but now it also includes a list of application
pools. The example shown in the figure has four application pools configured,
with the pool named "Default Application Pool" selected and expanded. Three
applications have been assigned to the Default Application Pool, and the panel
on the right shows the path associated with each of the applications assigned to
this pool. Although we don't show this in the figure, while configuring an
application pool the administrator is given a number of choices that affect the
lifecycle of the worker processes. The administrator can choose how often the
worker processes should be refreshed, to ensure that they are not negatively
impacted by the application (for example, they may be growing in size due to
memory leaks in the applications hosted within them); can decide how long a
worker process should be idle before it is removed from the system; and can also
configure the monitoring of the worker processes by the main inetinfo.exe
process, to ensure that they are restarted if there is a crash due to an
application error.

Figure 4. Illustrates the new look of the MMC plug-in
for IIS.
Before we close the section on IIS, we must bring up another architectural
change that was made to IIS 6 that should result in a considerable performance
boost. If you pay close attention to figures 2 and 3, you will notice that IIS
now communicates with a component that runs within the kernel. That component is
called http.sys, and as its name implies, it is responsible for
handling and dispatching requests to the Web server coming off of the network.
By having this component be part of the kernel, if a request arrives for static
content and that content is already cached in memory, the Web server can respond
immediately to the request without having to make a context switch to user mode.
In addition to this important performance benefit, moving this component to
the kernel totally isolates this basic Web server functionality from any
application code running in user mode that could cause the Web server to crash.
Each application pool created by the administrator has an associated queue in
kernel mode. As requests enter the system, if they cannot be serviced
immediately by the http.sys process, they are dispatched to the
appropriate kernel queue from where they are picked up for processing by one of
the worker processes associated with that application pool.
Command Line Utilities
Another improvement in Windows .NET Server is the release of a large number
of command line utilities for assisting with system management tasks. We are not
going to discuss every single one of them here, but we'll review some of the
more interesting ones.
The logman utility allows you to manage, from the command line,
a performance counter collection task. By passing options, you can specify
whether a new collection is started or whether an existing one is stopped or
deleted. For example, the command:
Logman create counter daily_perf_log -b 7/27/2000 13:00:00 -e 7/27/2000
15:00:00 -r -v mmddhhmm -c "\Processor(_Total)\% Processor Time" "\Memory\Available
bytes" -si 00:15 -o "c:\perflogs\daily_log"
will cause the system monitor to collect the two specified metrics starting
and ending at the given times with a sampling interval of 15 seconds, and store
the output in the file daily_log. The example shown above comes
straight from the page for the logman utility from the
much-enhanced help facility. The relog utility can be used to
resample existing log files and save selected metrics to a new log file. The
typeperf utility allows you to periodically print on the console
the value of certain performance metrics.
The DiskPart utility is a text-mode command interpreter that
allows you to manage disks, partitions, or volumes. Then there are
driverquery for looking at installed drivers and their configuration
properties, prnjobs for managing printer jobs, prncnfg
for managing printers and their configurations, and prnqctl for
starting, stopping and pausing printers. The sc utility comes with
a huge number of options that together provide a complete solution for managing
services on a server from the command line. You can do anything from installing
and starting a service to changing its textual description. Finally, the
tasklist and taskkill utilities will appeal to the Unix fans
in that they allow you to look at the list of running proceses and kill unwanted
ones all from the command line.
Conclusion
In this article, we tried to cover some of the more interesting features of
this new line of server operating systems from Microsoft. Comparing this
transition to that from Windows NT to Windows 2000, it seems like more of an
incremental release than a major new release, despite what you might guess by
the complete change in the naming scheme. The focus of this new release is on
improving the reliability, performance, and security of the server. The
enhancements to the boot process are clearly noticeable, and the new release of
IIS offers lots of new features that are intended to bring out the best of the
built-in .NET Framework that you've been hearing so much about.
Odysseas Pentakalos has
been an independent consultant for 10 years in performance modeling and tuning
of computer systems and in object-oriented design and development.
http://www.oreillynet.com/pub/a/dotnet/2002/05/06/win.html?page=1 |