You may need to tune the Active Server Pages (ASP) queue if ASP scripts make more requests to a Component Object Model (COM) component than the component can handle. All calls made beyond the component's capacity are put into the ASP queue. This is called blocking. Blocking can also occur if threads are waiting for a response from an external resource, such as a
database. When you use ASP under heavy load, the processor utilization should be above 50 percent or an acceptable level.
To get the statistics needed to tune the
ASPProcessorThreadMax metabase property, observe the following System Monitor counters at peak load time using a one-second chart interval:
- Processor:%Processor Time (for each processor)
- Active Server Pages: Requests/Sec
- Active Server Pages: Requests Rejected
- Active Server Pages: Requests Queued
- Web Service: Connections/Sec
Following are some possible scenarios:
- If the Requests Queued counter never increases and the processor(s)
utilization is low, the site has more capacity than currently needed.
- If the Requests Queued counter moves up and down, and the processor(s) are
running below 50 percent, this indicates that some requests are blocking, and
therefore, an increase in the ASPProcessorThreadMax metabase entry may be in
order.
- The Requests Queued counter grows uncontrollably along with CPU
utilization. Check custom or third-party components. A component may have
failed, and ASP is waiting for a response from the component.
- The Requests Queued counter grows and CPU utilization increases to an
unacceptable level. Check the connectivity to databases that ASP is calling.
A slow network connection, a large query, or a slow back-end computer can
cause blocking.
This metabase property specifies the maximum number of worker threads per
processor that IIS creates. Increase the size of
ASPProcessorThreadMax until
the processor utilization meets at least 50 percent or above. The default value
of
ASPProcessorThreadMAx is 25. Microsoft recommends a maximum value of 100.
WARNING: Modifying the metabase incorrectly can cause serious problems that may
require you to reinstall IIS 5.0. Microsoft cannot guarantee that problems
resulting from incorrectly modifying the metabase can be resolved. Modify the
metabase at your own risk.
Run the Adsutil.vbs utility from the <%SYSTEMDRIVE%>\inetpub\adminScripts
directory. To re-configure the
AspProcessorThreadMax metabase property, type the following
command:
adsutil.vbs set w3svc/AspProcessorThreadMax <NewValue>
Where <NewValue> is the number of threads that ASP should use per
processor. This sets the value at the Master WWW Properties level where it
is inherited by all new Web applications and all existing applications that
have not explicitly set a different value for AspProcessorThreadMax.
NOTE:
ASPProcessorThreadMax should not be changed unless blocking is occurring. If the Total Queue Length grows and the Processor Time grows to an unacceptable level, troubleshoot custom components or database connections.