共用方式為


Tuning ASP Metabase Settings

Applies To: Windows Server 2003, Windows Server 2003 with SP1

If your Web server is running ASP applications, you can help optimize server performance by tuning the metabase properties described in this section. You can retrieve and change these properties by using WMI or ADSI, or by directly editing the metabase with a text editor. Changes to most of these properties do not take effect until you restart the WWW service.

AppAllowDebugging

The AppAllowDebugging Metabase Property specifies whether ASP debugging is enabled on the server. When this property is enabled, IIS application threads are serialized; only one thread can execute for each application at one time. Serialized threads adversely affect Web server performance. You should retain the default setting for this property, which is false, on all production servers. Set this property to true only on a test server when you are debugging an application during its deployment phase.

AspBufferingOn

The AspBufferingOn Metabase Property turns on buffering in ASP, so that all output from an application is collected in the ASP output buffer before the buffer is flushed to the client browser (default behavior). If this property is set to false, output from ASP scripts is written to the client browser as the client browser becomes available. Set this property to true on all production Web servers.

AspProcessorThreadMax

The AspProcessorThreadMax Metabase Property specifies the maximum number of worker threads per processor that IIS can create. To find out the maximum number of worker threads that IIS allows per ASP process, multiply this value by the number of processors on your server. If you decrease this value, monitor performance to make sure that the lower thread limit does not degrade performance. If it does, increase the value again.

AspQueueConnectionTestTime

The AspQueueConnectionTestTime Metabase Property specifies the maximum time, in seconds, that a request remains queued before ASP checks to determine whether a client is still connected. If a request is in the queue longer than the queue connection test time, the server checks whether the client is still connected before beginning execution.

This feature can help you handle impatient users who fill up the request queue with numerous attempts at the same page. Often, users do not wait more than a few seconds for ASP pages to process. Although the maximum waiting time varies from user to user, the generally accepted maximum is about 10 seconds; so set a small value — for example, 3 seconds.

This property is useful for making ASP processing efficient only up to the point at which ASP begins to process the script. After the script is running, your application should continue to check for client connection at appropriate times, by using the IsClientConnected method of the ASP built-in Response object. For long-running pages, make cautious use of Response.Flush to ensure that users perceive that the page is still alive and doing productive work.

AspRequestQueueMax

The AspRequestQueueMax Metabase Property specifies the maximum number of ASP requests that are permitted in a queue. The default value is 3,000, but the optimal setting depends on the behavior of the application. If the execution time of the request is very short and the time in the queue is short, it is reasonable to decrease this value.

AspScriptEngineCacheMax

The AspScriptEngineCacheMax Metabase Property specifies the maximum number of scripting engines that ASP pages keep cached in memory (excludes currently running script engines). The default value is 250. Adjust the value according to the type of content in the application. If you are serving thousands of unique pages, server performance might improve if you increase the cache size so that the most frequently requested pages are accessed easily. A hit in the script engine cache means that you can avoid recompiling the template into byte code.

AspScriptFileCacheSize

The AspScriptFileCacheSize Metabase Property specifies the number of precompiled script files that can be stored in the ASP template cache. If you set the property to 4,294,967,295 (unlimited), all requested script files are cached. The default value is 500. Increase the value if you have many ASP pages. Do not set the value of this property to zero, which turns off all ASP caching and can severely impair your servers performance.

AspDiskTemplateCacheDirectory

The AspDiskTemplateCacheDirectory Metabase Property specifies the name of the directory where ASP stores compiled ASP templates to disk when the in-memory cache overflows. If you change the default directory, you must ensure that the identity of the processes running Asp.dll is assigned Full Control permission to the new directory. Typically, the identity of the worker processes running Asp.dll is the LocalSystem or Network Service account. You must specify a local path; ASP template caching fails if this property is set to a Universal Naming Convention (UNC) or mapped network path.

AspSessionTimeout and AspSessionMax

The AspSessionTimeout Metabase Property specifies, in minutes, the default amount of time that a session object is maintained after the last request associated with the object is received. The AspSessionMax Metabase Property specifies the maximum number of concurrent sessions that IIS permits. For applications that take advantage of sessions, you might want to decrease the session timeout in order to reduce server overhead. If decreasing the session timeout causes the number of concurrent sessions to increase too much, you might need to set a lower session maximum.

AspTrackThreadingModel

The AspTrackThreadingModel Metabase Property specifies whether IIS checks the threading model of any components that your application creates. ASP no longer uses this metabase property, although it is still in the metabase to provide compatibility with existing administrative scripts. It is recommended that you retain this property's default value, which is false, to avoid the overhead incurred by the ASP track threading model and to help improve performance of your ASP application.

CacheISAPI

The CacheISAPI Metabase Property indicates whether ISAPI extensions are cached in memory after first use. If the value of this property is true (the default setting), ISAPI extensions, after they are loaded, remain in the cache until the server is stopped. If the value is false, extensions are unloaded from memory after the ISAPI extension is no longer in use.

ISAPI extensions are cached or not cached based on the value of this property when they are loaded into memory. Thus, if this property is changed after an extension is loaded and cached, the change has no effect on that extension until the Web server is restarted.

Although you might temporarily set this property to false to help with debugging, you need to keep this value set to true on all production Web servers. Because the ASP.dll is an ISAPI extension, disabling this property — which requires that every request be reloaded — degrades performance.