IIS-optimized "reprint"

Source: Internet
Author: User
Tags website server website performance metabase
ArticleDirectory
    • Cache Management settings
    • Request and connection management settings
    • IIS Registry Settings
    • IIS metabase
    • IIS workflow options (IIS Admin UI, application pool attributes)
    • Security Socket Layer Adjustment Parameters
    • ISAPI
    • Managed code Adjustment Parameters
    • Other problems affecting IIS Performance
    • NTFS file system settings
    1. IIS Performance Optimization
    2. Is website server performance optimization Guide
    3. IIS 6.0 Optimization

People who manage Internet Information Server (IIS) know that IIS is simple and troublesome. Simply, there is almost no need to worry about installing it. You can select the path and click "Next". The configuration is also relatively simple, as long as you have some nt and network knowledge, follow the instructions to build a decent web site. However, managing IIS is not as simple as you think. After a period of use, administrators often encounter poor server performance. At this time, IIS performance optimization is on the agenda. There are two reasons for poor IIS service performance. One is artificial, that is, the Administrator does not optimize or configure IIS during installation or configuration. The other is objective. As the service type and number of visitors increase, the original hardware configuration of the server cannot meet the requirements. Therefore, the hardware configuration needs to be improved.
Optimize IIS performance in server configuration
1. IIS cache is one of the most important items to consider when optimizing IIS. The server retains a portion of the memory space used as the IIS cache to store objects for future requests. In this way, IIS can retrieve objects from the cache instead of from the hard disk. To adjust the IIS cache capacity, You need to modify the registry. The table items are as follows:

 
\ HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ inetinfo \ Parameters \ memorycachesize

The memorycachesize range is from 0 to 4 GB. The default value is 3072000 (3 MB ). IIS improves system performance by using the cache system handle, directory list, and other common data values. This parameter specifies the memory size allocated to the cache. If the value is 0, it means "no cache is performed ". In this case, the system performance may be reduced. If your server is busy with network communication and has enough memory, you can increase the value. Note that after you modify the registry, you must restart the Registry to make the new value take effect.
2. Make IIS use of the processor for the longest time. The CPU processor capability of the server is always limited. Which application Program If the CPU is used for the longest time, the performance of the processor can be maximized.
(1) On the NT control panel, double-click the System icon.
(2) Click the performance tab.
(3) drag the cursor to the none position under the application's procedural ability, so that all running services, including IIS, can use the processor to reach the maximum time.
3. Set server properties. There is an option in the server attribute that maximizes the total processing capability of network applications. Of course you should choose it. (1) Right-click the network neighbor icon on the desktop and select Properties. (2) Click "service tag ". (3) Click "server" and then press "properties ". (4) select to maximize the total processing capability of network applications. Click OK ." Improve the hardware configuration to optimize the IIS performance. If the above Optimization Configuration does not significantly improve the IIS performance, you may want to improve the server configuration. However, if it is a matter of money, the bosses will not agree easily unless you persuade him by facts. You must first consider what hardware configurations to improve. The following are the related hardware that needs to be considered during IIS optimization: The processor can be upgraded to a faster CPU, and another CPU can be added. But the price is too high (maybe it will change the motherboard or something), which is hard for the boss to accept. Hard Disk: the hard disk space is used by NT and IIS in two ways: one is to simply store data, and the other is to use as virtual memory. If you use the SCSI hard disk of ultra2, the IIS performance can be significantly improved. Network interface card: if the server runs on the enterprise intranet, you can consider upgrading its Nic to a m Nic. This is especially effective when network bandwidth is a bottleneck. Memory: increasing the memory may be the simplest and most effective way to upgrade the system. It is also the preferred hardware upgrade solution recommended by the author. So how do I know the hardware upgrade is required? This is related to the use of performance monitor. I will describe it in other articles. Here is a brief introduction: for example, you can use the performance monitor to track the CPU usage on the server. You can also view the number and frequency of pages that are switched from memory to hard disk. By combining the information with memory usage and other system information, you can obtain a system performance report table. If this information has consistently showed high usage, it indicates that the hardware device should be upgraded. To avoid future headaches, you should pay attention to IIS optimization when installing IIS. For example, to improve performance and save resources, only the required protocols should be run. Many administrators did not pay attention to this. I have seen netbeui, TCP/IP, and IPX protocols installed on a Web Service-only machine. Obviously this is unreasonable. The IIS server should be set as an independent server. Do not let the server bear the extra load required by the domain controller. Imagine: Can the server provide the IIS service while responding to user logon? You can distribute the Page Swap files of the NT Server to multiple physical disks. Note that multiple "physical disks" are not valid when distributed across multiple partitions. In addition, do not place the Page Swap file in the same partition as the Windows NT boot area.
4. Using a disk image or a disk zone set can improve the disk read performance.
5. log records should adopt file records instead of logging to ODBC data sources. In addition, you can increase the memory buffer capacity used to record logs during the recording period to reduce disk activity. The default size of the buffer is 64 KB.
6. It is best to store all the data in a separate partition. Then, run the disk fragment program regularly to ensure that no fragments exist in the partition where the Web server data is stored. Using NTFS helps reduce fragments. I recommend using Norton's speeddisk to quickly sort out NTFS partitions.
7. Although SSL can provide quite reliable encrypted transmission. However, the additional overhead will cause the IIS server to speed down, especially when processing large files. Therefore, you should only perform SSL encryption on directories that do need to be protected.

The Internet Information Server (IIS) that comes with Windows Server is a common tool for setting up website servers. It is simple and troublesome, new users can use IIS to set up a decent web site. However, it is not easy to configure and optimize IIS performance so that the website access performance can reach the optimal state, here I will introduce how to optimize your IIS server step by step.

For the server environment, take iis6.0 of Windows Server 2003 as an example. The client environment is Mozilla Firefox 3.0 and the yslow extension of Yahoo is installed.

Yslow is a firebug-based plug-in released by the Yahoo developer team. It is used to analyze Web pages and rate the pages according to the rules of some high-performance websites. It is helpful for web page performance optimization and tells you that some of them affect the speed of your web pages, it also shows you how to optimize based on certain rules. Our optimization policy for IIS is based on yslow.

Use Firefox with yslow installed to open the target website, click the yslow icon, and click performance, as shown in.

Among them, performance grade is yslow's rating for your website, A (100 points) is the highest, F is the lowest, and how to modify it is listed later, the following uses IIS 6.0 as an example to describe how to optimize website performance.

1. Reduce the number of HTTP requests

This is mainly to modify the websiteCodeTo reduce the number of external images, CSS, JS, and other files, and manually Merge multiple CSS/JavaScript files. You do not need to set IIS.

2. Use CDN

This is free for small websites. Of course, rich people can try to solve the problem of slow response speed when users access the website.

3. Enable content expiration

Enabling content expiration for static files improves access performance. First, the website directory should be reasonably divided. images, CSS, and JavaScript should be placed in a separate directory, and then select a directory in IIS, click Properties-HTTP header, and enable content expiration, you can select 30 days later. In this way, your browser compares the current date with the end date to determine whether to display the cache page or the page requested to be updated from the server, because images, CSS, and JS are usually less changed, they are basically read from the local cache to speed up display.

4. Enable gzip Compression

HTTP compression is used to transfer compressed text content between web servers and browsers. HTTP compression adopts common CompressionAlgorithmSuch as gzip to compress HTML, JavaScript, or CSS files. The biggest advantage of compression is that it reduces the amount of data transmitted over the network and increases the access speed of the client browser.

To use this function, right-click "website"> "properties" and select "service ". Select "compressed static files" in the "HTTP compression" box. We recommend that you set a directory for another disk separately.

Then, in IIS manager, right-click "Web Service extension"-> "Add a new Web Service extension", and enter "httpcompression" in "extension ", add "required file" to c: \ windows \ system32 \ inetsrv \ gzip. DLL, the Windows System directory may vary depending on your installation, select "set extension status to allow ".

Finally, Open c: \ windows \ system32 \ inetsrv \ metabase in the text editor. XML: add the extension name of the static file to be compressed in hcfileextensions. The default value is HTML and TXT files. We recommend that you add JavaScript and CSS files instead of compressed files such as images or ZIP files.

5. Place the style file in the header

This is the basic HTML code style. All CSS files are placed in the header of the HTML page.

6. Put the script file at the end

This is also the basic HTML code style. All JavaScript files are placed at the end of the HTML page.

7. Avoid CSS expressions

This is simple, because most people never use CSS expressions.

8. Use external JavaScript and CSS

Reference all JavaScript and CSS files in the form of external files to make these files accessible to the browser. For more information, see section 3.

9. Reduce DNS queries

The DNS query of a domain name will incur additional access overhead, reducing the number of host domain names of files on the page. The host domain name of a page is kept within 2-4, so that the page loading speed will not be reduced.

10. Compress JavaScript files

Compressing script files and deleting unnecessary characters can improve the loading time. Currently, there are many Javascript file compression tools. Here I have a javascript compression tool on the GUI for download.

11. Avoid redirection

Webpage redirection brings additional operation overhead. Therefore, you must avoid page redirection and jump operations.

12. Delete duplicate scripts

When a page contains the same Javascript file twice, the loading performance is affected. Therefore, you must delete the duplicate script file.

13. Configure etag

This is a confusing question. Theoretically, deleting the server's etag will improve the performance of HTTP requests. However, configuring IIS 6.0 according to the modification method provided by Microsoft does not work, finally, I used a third-party DLL file to implement the etag deletion function through ISAPI.

After the preceding website frontend reconstruction and web server configuration modification, our page structure becomes more standardized, and most of the reconstructed pages will get a good yslow rating, in general, the performance has improved a lot. For end users, they will also feel that the website access speed is much faster and the browsing experience of the website has been improved.

Reference books: high-performance website construction guide-published by e-Industry Publishing House

IIS 6.0 applies the new process model. The kernel-mode HTTP listener (HTTP. sys) receives and sends HTTP requests (or even uses its response cache to satisfy requests ). The working process registers the URL sub-space. http. sys sends the request to the corresponding process (if the application pool is used, the request is sent to the process set ).

Figure 4 shows the differences between IIS 5.0 and IIS 6.0 process models. IIS 5.0 uses WinSock to accept connections on port 80. RequestInetinfoThe process is responsible for receiving, or executing the request within the process, or handing itDLLHOSTProcesses are processed outside the process (for the purpose of isolation ). The response isInetinfoThe process is sent back.

Figure 4 process models of IIS 5.0 and IIS 6.0

The IIS 6.0 process depends on the kernel-mode web driver HTTP. sys. In the new model, HTTP. sys manages connections and Processes requests. Requests may be satisfied through the HTTP. sys cache, or they may be handed over to a working process for further processing (see figure 5 ). You can configure multiple working processes to isolate them with low overhead.

HTTP. sys includes a response cache. When the request matches an entry in the response cache, HTTP. sys directly sends the cache response from the kernel mode. Figure 5 shows how requests are processed through HTTP. sys (Requests may also be forwarded to a worker process for processing ).

 

Figure 5 request processing in IIS 6.0

Because the Web Server includes both kernel-mode components and user-mode components, both components must be adjusted at the same time to achieve optimal performance. Therefore, to adjust IIS 6.0 for a specific load, You need to configure the following content:

· HTTP. sys (kernel-mode driver) and related kernel-mode cache.

· Working process and user mode IIS, including application pool configuration.

In addition, we will discuss other parameters that affect performance later.

Kernel Mode Adjustment

Performance-related HTTP. sys settings can be divided into two types: Cache Management, connection and request management. All Registry settings are saved in the following entries: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ HTTP \ Parameters

If the HTTP service is running, you must stop the service and restart the computer to make the settings take effect.

Cache Management settings

One of the advantages of HTTP. sys is the kernel mode cache. If the response is in the kernel cache, it may be able to fully satisfy an HTTP request in the kernel mode, which can obviously greatly reduce the overhead of CPU processing requests. However, the IIS 6.0 kernel-mode cache is a physical memory-based Cache. Each entry occupies a certain amount of memory space.

Cache entries can only be used to provide benefits. However, an entry occupies physical memory at any time, whether or not it is used. Therefore, you need to evaluate the benefits of caching a project (the request can be satisfied directly from the cache) and its overhead throughout the life cycle (the physical memory needs to be occupied, consider the availability of resources (CPU, physical memory) and workload. HTTP. sys tries to only save useful (frequently accessed) projects in the cache. However, if HTTP is adjusted for a specific workload. sys cache, the performance of the Web server can be improved to a certain extent.

The following are some useful cache settings for HTTP. sys Kernel Mode:

·Urienablecache. Default Value: 1. If it is set to a non-zero value, Kernel Mode Response and segment cache can be enabled. For most workloads, the cache should be enabled. If you want ultra-low response and low cache utilization, disable caching.

·Urimaxcachemegabytecount.Default Value: 0. If it is set to a non-zero value, you can specify the maximum amount of memory that can be used by the kernel cache. The default value is 0, which allows the system to automatically adjust the amount of memory that can be used by the cache. Note: You can only set the maximum amount of memory that can be used, and the system may not allow the cache to grow to the specified size.

·Urimaxuribytes.Default Value: 262144 bytes (256 KB ). This parameter sets the maximum length of each entry in the kernel cache. Responses or segments larger than this length are not cached. If you have enough funds, you can increase the value of this parameter. If the funds are limited and large entries squeeze out smaller entries, you can set this parameter to a smaller value.

·Uriscavengerperiod.Default Value: 120 seconds. A scavenger program regularly scans the HTTP. sys cache. Entries that have not been accessed during the two scans will be deleted. You can set the scan cycle to a high value to reduce the number of scans. However, if old entries with low access frequency are still stored in the cache, the memory occupied by the cache will continue to increase. If you set this period too low, the scan frequency will be too frequent and may cause excessive cache cleaning and disturbance.

Request and connection management settings

In addition, HTTP. sys manages inbound HTTP/HTTPS connections and is the first layer on which requests are processed. It uses an internal data structure to save connection and request information. Although such a data structure can be created (or released) as needed, if you save some data structures in the look-aside table for backup, you can achieve higher CPU efficiency. Saving such reserves helps HTTP. sys to use fewer CPU resources to handle load fluctuations. Note: Load fluctuations may not be caused by external load fluctuations. Some internal optimization measures designed to improve batch processing or interrupt mediation may also lead to load fluctuations and fluctuations.

Reserve helps reduce CPU usage and shorten the delay time. It also increases the processing capability of the web server, but also increases the memory usage. When adjusting HTTP. sys requests and Connection Management Behaviors, you must remember the following factors: available server resources, performance goals, and workload characteristics. You can use the following request and connection management settings:

·Maxconnections. This setting controls the number of concurrent connections allowed by HTTP. sys. Each connection consumes a non-Paging pool (a valuable and limited resource ). The default value is quite conservative to limit the number of non-Paging pools used by connections. For dedicated web servers with sufficient memory, you can set this value to a higher value if a large number of concurrent connections are expected. The larger the value is, the more non-Paging pools are occupied. Therefore, be careful to use a correct value that suits the system configuration.

·IdleconnectionshighmarkIdleconnectionslowmarkAnd idlelisttrimmerperiod.These values are used to control the processing of non-parallel connection structures: the number of available connections that must be provided at a certain time (used to handle connection load fluctuations), the upper and lower limits of the release list, and the frequency of cut and supplement of the connection structure.

·RequestbufferlookasidedepthAnd internalrequestlookasidedepth These values control the processing of data structures related to buffer management and the amount of reserves that should be completed to cope with load fluctuations.

Set IIS registry in user mode

The following registry settings can be found under the following entries:

HKLM \ System \ CurrentControlSet \ Services \ inetinfo \ Parameters \

·Maxcachedfilesize(REG_DWORD), in bytes. Determines the size of the files that can be cached (256 kb by default ). The actual value depends on the maximum number and size of files in the data table and the number of available Ram. Caching large files that are frequently accessed can reduce CPU usage, disk access, and latency.

·Memcachesize(REG_DWORD), in MB. Restrict IIS user-mode cache to the specified size (by default, the cache size is adjusted by IIS based on the number of available memory ). Depending on the size of the "popular" file set (Set of frequently accessed files), the number of Ram resources, or the IIS process address space (normally under 2 GB ), select the value of this parameter.

·Disablememorycache(REG_DWORD ). If it is set to 1 (the default value is 0), the user-mode IIS cache is disabled. When the cache hit rate is very small, the cache can be completely disabled to avoid overhead related to the cache code path.

·Maxpoolthreads(REG_DWORD ). Set the maximum number of threads in the pool that can be created by each processor (the default value is 4, and the range is not limited .) Every pool thread observes network requests and processes them. The maxpoolthreads count does not include the threads currently processing ISAPI applications. If the average CPU usage is not in the optimal state, you should increase the value of this parameter because all existing threads are busy and there are no available threads used to process new requests.

·Poolthreadlimit(REG_DWORD ). Set the maximum number of pool threads that can be created by the system (the default value is 4 times the number of processors, and the range is not limited ). Poolthreadlimit must be greater than or equal to maxpoolthreads. Under normal circumstances, the number of poolthreadlimit = maxpoolthreads processors. It is not enough to set only one of the parameters. If the maxpoolthreads and poolthreadlimit parameters are specified at the same time, stricter restrictions can be imposed.

·Objectcachettl(REG_DWORD), in seconds. Controls the duration of an object that has not been accessed in the IIS user mode cache (the default value is 30 seconds, for example, 0xffffffff, the object cache scavenger thread is disabled ). If the system has enough memory and the submitted content does not change frequently, you can increase the value of this parameter. If the system memory is insufficient and the user mode cache size is increasing, this parameter should be lowered. See activityperiod in this section.

·Activityperiod(REG_DWORD), in seconds. Files can be cached only when they are repeatedly hit within the active period (10 seconds by default, and this option is disabled if it is set to 0. This parameter reduces the cache overhead caused by files that are not frequently accessed by the cache. If the cache content does not change much and there is not enough available memory, you can increase the activity duration. Or, if a large number of request loads exist in the cache, the activity duration can be reduced.

·Datasetcachesize(REG_DWORD) The default value is 50. Set the maximum number of virtual directory entries in the database dataset cache. If the number of installed virtual directories exceeds the default value, you can increase the value of this parameter. When submitting static content, a low-capacity dataset cache increases the latency (lower throughput and lower CPU usage ).

IIS metabase

The following settings can be found in w3svc.

·Aspmaxdisktemplatecachefiles. Enable disk caching for ASP script templates. Compiling an ASP template is a task that consumes a lot of CPU resources. The memory size limits the number of templates that can be cached in the memory. Retrieving the compiled template from the template cache on the disk requires less overhead than the template not in the compiled ASP memory cache. See the aspscriptenginecachemax section below.

·Aspdisktemplatecachedirectory. If possible, you can set it to a disk that is not frequently used (for example, a disk that is not shared with the operating system, paging files, IIS logs, or other frequently accessed content ). The default directory is "% WINDIR % \ system32 \ inetsrv \ template disk cache \ ASP compiled templates ".

·Aspscriptenginecachemax. Set it to the maximum number of script engines allowed by the memory capacity (125 by default ).

·Aspscriptfilecachesize. Set the maximum number of ASP templates allowed for memory capacity (250 by default ). See the aspmaxdisktemplatecachefiles section in the previous article.

·Aspexecuteinmta. If you want to detect errors or faults when delivering some ASP content, set this parameter to 1 (Enabled ). For example, if you want to host multiple sites and each site runs under its own working process, you can enable this parameter. Errors can be seen in the COM + section of the Event Viewer. This setting enables the multi-threaded unit model in ASP (the default value is 0, indicating that the unit model is disabled ).

·Aspprocessorthreadmax. If the current setting (the default value is 25) is insufficient to meet the load requirements (which may lead to errors in some requests), you can increase the value of this parameter.

·Centralbinaryloggingenabled. Set this parameter to true to enable centralized binary logging. Binary IIS logging reduces CPU usage, disk space usage, and disk I/O operations. Centralized binary logs can be directed to a binary file regardless of the number of hosted sites. A post-processing tool is required to analyze logs in binary format.

IIS workflow options (IIS Admin UI, application pool attributes)

In the absence of administrator intervention, service restart, or computer restart, the IIS workflow recycling option on the IIS management interface provides an effective solution for an emergency fault or event. Such a situation includes memory leakage, which may increase the memory burden, or cause the worker process to enter the unresponsive or idle state. Under normal circumstances, you may not need to enable the recycle option, so you can disable it (or configure the system to perform the recycle operation at a very low frequency ). In the following section, the name of the italic is the per-app-pool variable. When using scripts to set these variables, you can use the path "/lm/w3svc/apppools/NN indicates the application pool index.

There are three options, as shown in the following table:

·Reclaim options.You canReclaim"Tab.

·Performance options.You canPerformance"Tab.

·Job process health monitoring options.You canHealthy"Tab.

Table 8. recycling options

parameter

description

periodicrestartrequests , DWORD, Which is disabled by default, the default value is 35000.

regular recovery by time

periodicrestartrequests , DWORD, Which is disabled by default, the default value is 35000.

regular recovery based on the number of requests

periodicrestartschedule , multisz, disabled by default, the default value is null.

reclaim at the specified time

· periodicrestartmemory, DWORD, default value: 512 MB

· periodicrestartprivatememory, DWORD, the default value is 192 mb.

if one of the following conditions is met, memory-based reclaim (disabled by default) allows the recycle Worker Process:

· Maximum capacity of virtual memory

· Maximum capacity of used memory

If the memory is growing capacity pressure, one or all of these parameters can be recycled frequently based on strict memory capacity standards to relieve memory pressure.

Table 9.Performance options

Parameters

Description

Idletimeout, DWORD, in minutes, the default value is 20

When the idle time of a process exceeds the specified time, close the working process. This can save a limited amount of memory resources, but if the CPU load is heavy and new working processes need to be started frequently, we do not recommend this approach, because the process creation will bring a certain amount of overhead.

Apppoolqueuelength, DWORD, default value: 2000

Limit the length of the kernel Request queue for each application pool (app-pool. The request consumes a paging pool. When there is a large demand for the paging pool, the value of this parameter should be lowered. If the length exceeds the specified length, the server rejects the request and generates a non-custom error number 503.

Cpuaccounting, Boolean, disabled by default (0), enabled as 1

Monitor CPU usage. You can set the maximum CPU usage (cpulimit, DWORD, default value: 0) and monitoring refresh cycle (cpuresetinterval, DWORD, default value: 0, in minutes ). If the CPU usage limit is reached, or no operation is performed (but an event is written in the event log), or the worker process (cpuaction, DWORD, default value: 0, indicates "no action is taken"; the maximum value is 1, indicating "Closing the Working Process ").

MaxprocessesBy default, one worker process is used to process all requests.

You can control the total number of worker processes in the operated web garden mode. In Web garden mode, several worker processes are responsible for processing the request load under a single application pool. No working processes were pre-assigned to the web site through different application pools. In some cases, a worker process cannot meet the processing needs of the load (this can be seen through poor CPU usage and long response time ), increasing the number of worker processes helps improve the system throughput and CPU usage. When hosting multiple sites, you can consider using the Web garden mode. In addition, when one of the processes suddenly crashes, using multiple working processes also provides more reliability, and almost no service interruption occurs. Compared with the pre-allocated application pool, the Web garden mode is easier to set and control.

Table10.Health options

Parameters

Description

Pingingenabled, Boolean. The default value is 1.

Pinginterval, DWORD, default value: 30 seconds

Ping the Working Process (pingingenabled) at a fixed interval (pinginterval ). If there is no response, it is deemed that the working process has an error. IIS will try to terminate the process and generate a new process.

Rapidfailprotection, Boolean, default

Rapidfailprotectionmaxcrashes, DWORD, 5 faults by default

Rapidfailprotectioninterval, DWORD, 5 minutes by default

Set the maximum number of failures allowed to be generated (rapidfailprotectioninterval) within a given period of time (rapidfailprotectionmaxcrashes), and control the rapid generation of failures (rapidfailprotection ). If a failure rate is specified, the application pool is disabled and related information is written to the event log.

Startuptimelimit, DWORD, 90 seconds by default

Control the start time of a working process. If the start time exceeds this time, it is deemed that a fault has occurred.

Shutdowntimelimit, DWORD, 90 seconds by default

If the shutdown time of the working process is exceeded, the process is considered to be in the non-responding State.

Security Socket Layer Adjustment Parameters

The use of Secure Sockets Layer (SSL) will increase the CPU burden. The most resource-consuming part of SSL is the overhead required to establish a session (including a full handshake), the overhead of reconnection and the overhead of encryption/decryption. To achieve better SSL performance, perform the following operations:

· Enable the "keep active" feature of SSL sessions. This eliminates the overhead required to establish a session.

· If possible, re-use sessions (especially for traffic that does not "keep active ).

· Note: the longer the key, the higher the security, but the more CPU time required.

· Note: not all page components require encryption. However, a mix of plain text HTTP and HTTPS may cause a warning to pop up in the client browser, notifying that not all page content is protected.

ISAPI

There are no specific adjustment parameters for isapis. If you write a private ISAPI extension, ensure that the Code is efficient in execution and resource usage. See other problems that affect IIS performance later.

Managed code Adjustment Parameters

· Make sure that all scripts have been compiled in advance. You can call a. Net script in each directory to complete this task. After compilation, You need to reset IIS. After modifying machine. config, Web. config, or any. aspx script, you must re-compile the script.

· If you do not need session status information, make sure that this project is disabled on each page.

· When you run multiple hosts containing ASP. NET scripts in the isolation mode (one application pool for each site), you should monitor the memory usage. Configure sufficient memory for the IIS server based on the number of application pools that are expected to run concurrently. Consider using multiple application domains (app-domains) where multiple isolation processes exist ).

Other problems affecting IIS Performance

·Install a filter without cache awareness.Installing a filter without the HTTP cache awareness will cause IIS to disable all the caches, resulting in a sharp decline in performance. The old ISAPI filter (the filter compiled before IIS 6.0) may have this problem. You can use the HTTP cache filter to mark the configuration database as a cache-aware filter.

·CGIRequest.For performance considerations, we do not recommend using CGI applications to process requests. Frequent Creation or Deletion of CGI processes results in a large amount of system overhead. A better alternative is to use the ISAPI program and ASP (or ASP. NET) scripts. These methods can be isolated.

NTFS file system settings

Under HKLM \ System \ CurrentControlSet \ Control \ FileSystem \Ntfsdisablelastaccessupdate(REG_DWORD) 1.

By disabling the update of the date and time stamps of the last accessed file or directory, this switch parameter for the entire system reduces disk I/O load and reduces latency. This key does not exist by default, so you need to add it. If the operation contains a large dataset (or a large number of hosts) with thousands of directories, the effect of disabling update is very obvious. If you only need to retain the information web for Web management, we recommend that you use IIS logs instead.

Warning:Some applications (such as Incremental Backup tools) need to use the update information. Without this information, they will not work properly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.