Performance adjustment of .NET Framework deployment
White Paper Tony Northrup this page
ASP.NET Application and Web Services Adjustment Session Status Web Application Pressure Test Test Tool Identification System Bottleneck Use Tracking Configuration Settings to other applications on .NET Framework Internet Information Service SQL Server Conclusion
Abstract ASP.NET provides great improvements in performance compared to previous ASP procedures. Although ASP.NET standard configurations can also provide far exceeding the excellent performance of the previous environment, but administrators may still need to adjust the system configuration to achieve optimal performance and scalability. This white paper introduces the technologist to the system administrator, which is the technology required to build the performance of the application above the .NET Framework, and discusses the ASP.NET web application, ASP.NET Web service, and .NET remote applications . ASP.NET applications and web services compared to other types of applications, the performance adjustment of web programs and Web services should cause more attention and attention. These applications generally face external users, and a bad Web site will definitely cause a very bad impact on the company. Unlike applications within your business, a public Web service that is positioned to external users may be accessed by millions of users, while the number of internal applications is limited by the company's employee. ASP.NET gives system administrators to make them more powerful controls for Web programs and Web services performance and scale. The new session status management capability can completely separate information about user access from the application, and the administrator can choose to store the information in the dynamic RAM of the web server, stored on the status server, or stored in a database. . Built-in tracking function allows administrators to link performance issues to a specific application code - decisively indicate that the problem is caused by applications instead of system configuration issues. Especially for the new performance counter for ASP.NET provides various details about application performance, providing administrators to resolve system bottlenecks. Existing utilities, such as the Microsoft Web Application Stress (WAS) tool to generate site traffic, and completely resolve these problems before the real user discovers the problem. Since ASP.NET can be used to develop web programs, it can also be used to build a web service. The administrator can directly go directly into the internal Web business. The content of this section will analyze and adjust the provision of various ASP.NET applications to provide detailed distribution guidance. Adjusting a session status for a maximum challenge required for web applications and web services is: The user status is maintained by multiple servers. Regardless of the configuration of the web farm, in a session, requests for a user are always forward to two different systems. If all sites content are static, there will be no problems. However, most of the Web sites now track user sessions to save specific information related to this user, such as like a good, personalized parameters, and shopping carts. Previous versions of ASP allows developers to access session status information and allow them to store information about the user in the interior of this session object. This information can be accessed from any other page of the site. However, the ASP will save this information in the memory of the web server. Therefore, if you use multiple web servers, users' requests may be sent to other servers that initiate sessions, and information about sessions will not be available. If a web server is started, all session information it saved will be lost, which causes an unatriviluable impact on the normal operation of the site - especially when you use the session to save the user's shopping cart information. ASP.NET provides traditional single server session information, which is very similar to the previous version of ASP. In addition, it also provides two methods for the concentration of session information, which allows users to get these session data from many different servers in the Web Farm or Web Garden. Specifically use which of the two methods is completely determined by the system administrator - it does not fix it in the program. So, for the ASP .NET web program or web services that are not designed for web farms, system administrators can measure and divide them.
ASP.NET can use three methods to store session status information: stored in a process; stored on a central status server; or stored in the SQL Server database. Saving session information This method is similar to traditional ASP sessions because session status information is saved in the memory of the web server, not sharing with other systems. This configuration method has the best execution performance because ASP.NET does not need to communicate with other system in the network to obtain session information. However, this approach limits the system's scalability - the session cannot span multiple servers, and if the user moves from a web server to another server, their session information will be lost. The status server is a central server running a special service, which is built in .NET Framework. Status Server Storage Status Information For multiple servers in the web farm. Users can move from a web server to another without missing status information. The status server introduces some additional workloads because the session information must be able to retrieve and be updated by a network request sent from the web server to the status server. Although some additional work needs to be taken to handle user requests, the scalability and reliability of the system are therefore greatly improved because the web application can telescope to multiple servers. A third method of storing session status information is to use a SQL Server database. This approach has the same benefits as using a central state server - session can be tracked across multiple web servers. However, the workload that uses the SQL Server server tracking session is larger than using the central status server. The SQL Server server can be configured in the form of a cluster to provide maximum redundancy. In addition, SQL Server can scale to high-end hardware equipped with 4 processors, thereby implementing concurrent storage of more sessions. The following sections discuspect the corresponding performance adjustment measures for three different methods of storage session status information. All three methods can use the same set of configuration parameters and will not adversely affect system performance. Users can manage user status in a manner that "no cookie", which uses status information as part of the URL instead of saving them in a cookie. ASP.NET inserts the session information into all links in a given page - and only modify the relative URL. Therefore, this state management without cookie does not work on sites that use absolute URL addresses on an internal hyperlink of an ASP.NET application. Adjust the session status stored in the process. "Timeout" setting defines the time that the session state can stay after the user performs the last request. By default, this time is set to 20 minutes. Therefore, if the user waits for 20 minutes, send a request to the server, and the server will create a new session. This setting does not affect the system, especially when using the session stored in the process. The longer the timeout definition, the longer the survival time stored in the session during the session does not active access to your site. However, the session status is maintained in the process to occupy the memory of the web server. If your site is less, their residence time is longer, or they regularly visit your site every day, then you can define a longer timeout setting. If your site has thousands of users, and these users are generally leaving only one or two pages, then you can set a shorter timeout setting. Then, please monitor the operation of the web server to determine whether the maintenance of the session status will adversely affect system performance. To adjust the timeout setting, monitor the "SESSIONS ACTIVE" counter in the ASP.NET Application object. The counter pointed out the number of current event sessions, in general, the number increases with the increase of timeout.
The maximum number of sessions that the web server can handle varies with the number of information applications stored in the session. However, there is too much concurrent session will consume a lot of server memory. Therefore, you should also monitor the memory usage of the server. If after the timeout setting of the session is improved, the memory's paging operation also increases, then you should reduce the timeout time of the session, or add more memory on the server. A counter-statement that can perform a paging operation of the memory is the "Memory" object in the "Memory Reads / SEC) counter. Session status is defined in the machine.config or web.config file. By default, the section is defined as "Inproc" in the machine.config file, which provides the best performance for web applications running on a single web server. The default setting in Machine.config is:
Mode = "inproc" StateConnectionstring = "TCPIP = 127.0.0.1: 42424" STATENETWORKTIMEOUT = "10" SqlConnectionstring = "Data Source = 127.0.0.1; user ID = sa; password =" Cookieles = "false" TIMEOUT = "20" /> Configure the session status when using the status server. When you use a status server to manage session state, you can set the timeout time, the time unit is second, the ASP.NET web application will wait for the status server to respond to the network request. By default, this time is set to 10 seconds. There are several reasons that cause the status server to fail within 10 seconds, and the status server overload, the web server overload, or the status server is offline. If the traffic on the status server or web server is high (close to 100% processor utilization), and the session status is important for the ASP.NET application, you can increase this timeout to 20 seconds. Typically, the ASP.NET application does not send the web page of the user to the user before contacting the status server. So, if the status server does not respond, the end user may have to wait until the network timeout will receive an error message. Improve the value of STATENETWORKTIMEOUT can reduce the number of errors during traffic peak; however, it will increase user forced waiting time before you know the status server offline. If your Web and status server timeout gets the correct configuration, your application should be able to properly handle session status errors. If your user doesn't wait for 10 seconds before seeing a page, you can reduce STATENETWORKTIMEOUT from 10 seconds to 5 seconds. If your web and status server runs in a nearly 100% CPU utilization, and session status information is important for your ASP.NET web application, you can increase STATENetworkTimeout to 20 seconds. The performance monitor of the status server can use the Performance Console and the "Event Viewer" on the status server. You can use the Performance console to monitor the "STATE Server Sessions Active" counter in the "ASP.NET" object. In addition, you can monitor the utilization of the processor - including both the "% Processor Time" counter in the overall utilization ("processor" object, also including the utilization of each session state ("Process" object "%% Processor Time "ASPNET_STATE.EX instance in the counter). If the processor utilization reaches 100%, the web server will queue the received session status information request to damage the performance of the Web site. If the status server is very busy So that the request timeout does not provide status information, the ID number will occur from 1072 to 1076 error events, which will be recorded in the Application Event of the status server. To solve the above problem, you You can upgrade the processor on the status server. To allow the ASP.NET Web application to use a central status service, you can add the following information in the section in the application's web.config file. Please pay special attention to the StateConnectionstring element, it Define the IP address and port number of the status server - you should modify these properties according to the actual situation of your own status server. SqlConnectionstring property is not a required property, because the setting is only played only when using SQL Server storage session status information . Mode = "stateserver" StateConnectionstring = "TCPIP = STATSERVERIP: 42424" STATENETWORKTIMEOUT = "10" Cookieles = "false" Timeout = "20" /> Session status configuration when using SQL Server. The web farm session state can be managed using a SQL Server server. If the importance of session status information is enough to consider using redundant servers, then SQL Server is your best choice. ASP.NET State Service cannot perform redundant configuration - only a single status server can be used, so if the status server is faulty, the ASP.NET web application will not be able to track the user session. The performance monitoring of this SQL Server server is the same as other SQL Server servers. For more information on performance monitoring of SQL Server, see the book of the SQL Server 2000 Performance Adjustment Technology Guide for Microsoft Press. Note: If you decide to save the session status information using the SQL Server database, you should follow this article "SQL PROFILER and INDEX TUNING WIZARD" section to adjust the ASPSTATE database. In order to let a ASP.NET web application use SQL Server database store status information, add the following information to the web.config file of the program. The balance is. You must modify the SqlConnectionstring parameter that meets the standard connection string format, in addition, you need at least a name or IP address of SQL Server, and a legal username and password. To improve system security, you should create a minimum permissions on SQL Server instead of using the SA account to complete all. Mode = "SQLServer" Sqlconnectionstring = "data source = sqlserverip; user id = username; password = password" STATENETWORKTIMEOUT = "10" Cookieles = "false" TIMEOUT = "20" /> The Web Application Pressure Test Tool Microsoft WAS Tool is a free tool for Microsoft, which can generate traffic loads on the web server. This tool can simulate hundreds or thousands of users to access your site and then generate a summary report with performance information. By applying additional load on the web server and monitoring its performance, you can determine how to telescide the application and which resources will limit the scalability of the system. WAS tools can be downloaded from the following address: http://www.microsoft.com/downloads/details.aspx?familyid=e2c0585a-062a-439e-a67d-75a89aa36495&displaylang=en. This section will introduce the use of WAS tools as ASP. The rendering of the NET page creates a specific method for the Benchmark and Load Test ASP.NET Web Services. For more detail guidance using the WAS tool, see: http: //msdn.microsoft.com/library/en-us/dnduwon/html/d5wast_2.asp. WAS can be used to test any type of web server. Test the ASP.NET web program and test other web programs have no too much difference - but the system administrator should pay special attention to several critical parts of the WAS report when adjusting the performance of the ASP.NET program. The "Page Summary" section in the WAS report lists all the pages requested during the test, the number of times the page is requested, the time to first Byte, TTFB) and the transfer end byte Time to Last Byte, TTLB). The TTFB indicator can be used to determine the time required for the web server to submit an ASP.NET page. To get this time, you can: Install WAS on a computer in the local area of the ASP.NET Web server. Create a WAS script that can query all the .aspx pages you want to measure on the site. Select script settings and set "Stress Multiplier" as shown in Figure 1. This will force WAS to request all pages using a single client to make sure you do not request multiple pages at the same time. Figure 1 configures the WAS to use only one client is an excellent way to create an ASP.NET web program performance benchmark. Next, set the time value to 5 minutes under Test Run Time. This gives a quantity of reasonable sampling points. Under Suspend, "Preheat" (WARMUP) time is set to 1 minute to ensure that each page is requested several times before you start measurement. The ASP.NET page needs to be compiled during the initial request - therefore, the first time you get the time for the requested page, you should not use these times to create performance benchmarks. Various caching periods will also produce various caches, which will function in the later time. Click the toolbar "Run Script" button. The script will be executed. After the script is complete, click the Reports tab and select a new report. Scroll down the content until the Page Summary section, as shown in Figure 2. The TTFB value of each page is the time value of milliseconds. In the case of light load, your ASP.NET application needs to take these time to submit a page. Figure 2 The TTFB Average indicator indicates the time taken by the Submit an ASP.NET page. The measurement TTFB can be established in light load. Comparing the TTFB value under light loads with the TTFB value in the case of heavy load, you can learn how to telescopic for web applications, as well as this scaling will affect the end user's Web experience. If the TTFB value is higher than 1000 milliseconds (ie, 1 second), in normal traffic, the time required to generate an ASP.NET page may have an impact on the user's browsing experience. This time can be reduced by upgrading the processor of the web server, adjusting the database access method and taking other methods described herein. When you open a WAS report, note the "Result Codes" section of the report. The only result code that should be listed is "200" - indicating that all requests have been successfully completed. Subsequently, when you run this test under a higher load, you will be able to see some errors, indicating that the ASP.NET has reached its capabilities. To increase the workload of the server, you can choose Settings, then add the value of "Stress Level" and "Stress Multiplier). You can gradually increase these settings, and compare the results in the first test, how to get slower than the traffic increases as traffic increases. The application bottleneck recognition method, follow the guidance in the "Identification System Bottleneck" section in this paper. WAS can also be used to test ASP.NET Web services. By default, the ASP.NET Web service generates a visual page when the browser requests a .asmx file. Users can enter information in the form field and request the web service that will be called. These auto-generated pages use the HTTPGET Web service protocol, which is the protocol used by the ASP.NET Web service. WAS can use this interface to simulate a web service request from multiple concurrent clients, as shown in Figure 3. The easiest way to generate a WAS script for existing Web services is to use WAS to manually entered these requests in your browser, and then delete "?" Characters in the request path do not include any steps of the parameters. If your web service client uses the HTTPSOAP method, the result will not be a perfect simulation. However, for the recognition performance bottleneck, it is still a useful means. Figure 3 With a script, the WASMX file is issued by creating a script, and the WAS can test the Web service using the HTTPGET method. Identification System Bottlenecks Whether you use Microsoft WAS tools to come to artificially generated some traffic, or have a busy site, it is important to monitor the performance of the web server in the load. The best tool for monitoring server resource utilization is Performance console. In Windows 2000, you can click the "Start" button to point your mouse to Programs, select Administrative Tool, and then click "Performance" to start the console. In Windows Server 2003, you can click the "Start" button to point to "All Programs", select Administrative Tools, and then click "Performance". Table 1 shows the most important performance counters for identifying the ASP.NET application bottleneck. Table 1 identifies the performance counter used by the system bottleneck Object Counter Description Processor% Utilization Percentage This indicator indicates the overall utilization of the processor on the web server. The processor is the most common bottleneck on the ASP.NET Web server. If the peak value of the counter is close to 100% when the web processing load, you should add the "% processor time" counter in the Process object to determine which process is dragged down the performance of the server. Process% processor time percentage of information provided by this counter is similar to the "% CPU Utilization" counter, but it can identify which process consumes most of the CPU time. To ensure that all information you want, you should select the "All Instances" radio button in the Add Counters dialog box when you add this counter. If the ASPNET_WP process takes up most of the processor time, this clearly shows the rendering of the ASP.NET page is the bottleneck of the system. If the INetInfo process has a problem, it means that it is an issue caused by IIS. These issues can add multiple CPUs or add more web servers to be resolved by upgrading the CPU of the web server. If your ASP.NET application is driven by the database, and you run a Microsoft SQL Server on the same system, you are likely to find a process called SQLServr to cause the culinous disaster of the CPU bottleneck. The best remedy for this situation is to move SQL Server to another server. Alternatively, upgrade processors or add more processors also help to improve this situation. ASP.NET Application A number of requests per second can measure the receiving speed of the ASP.NET request, which is also a useful means for the peak processing capability of the web application, and is also useful. The counter will only report the number of requests for a specific file, which is configured to the ASP.NET file, in most cases, they are some .aspx and .asmx files. To view the total request number, including requests for image files, you can use the "GET Requests / Sec" counter in the Web Services object instead of this counter. ASP.NET application activity session Number This counter is used to measure the number of ASP.NET sessions currently active. The session is established by the ASP.NET program when the new user issues the first request. The session has always survive until: 1) When the user exits logins, the program explicitly abandoned the session, or 2) did not receive any request from the user during the session timeout. By default, ASP.NET's session will time out after 20 minutes. The user can modify the sessionState property of the element in the web.config or machine. TunctionState property to adjust the setting. For more information on session and timeout setting, please refer to the "Adjust Session Status" section of this article. The number of requests in the ASP.NET queue indicates the number of requests that queuing in the queue when the time required to present a page exceeds the time interval between the two client requests. Under normal web traffic, the speed of request is uncertain, in the busiest time, the queue is occurred in a few seconds. This makes the time to submit the page temporarily increase, but in the next idle period, the queue will be eliminated. The traffic generated by the load test tool (such as WAS) is generally relatively stable, so it may cause the "Requests Queued" counter in ASP.NET to continue to rise, although this situation may not appear in the actual application situation. To simulate these randomable traffic peaks and troughs, you can check the "Use Random Delay" check box in the "Script Settings" page of the WAS. If this setting is launched after enabling this setting, the current workload of the server has exceeded its capability, which will become a system bottleneck, you should resolve this bottleneck before proceeding. By default, the queue length of ASP.NET can accommodate 100 requests. You can modify the appRequestQueELIMIT property of the httpruntime element in the web.config or machine.config file to change this limit. ASP.NET Rejected request number After the ASP.NET request queue is filled, the new request will be rejected. For extremely high loads, this processing method is generally correct for ASP.NET because it will immediately return an error to the user, and remove the request from the web server queue, not forced users to wait until The browser is timeout. Monitoring this counter can be known that after the queue length reaches the maximum, the number of requests for the web server is much. Use track ASP.NET Web Programs and Web services can perform powerful tracking for requests and responses. Although tracking tools are developers, it is mainly provided to resolve program errors and optimization programs, but it can also be used by system administrators to provide developers with specific feedback on program performance. Enabling Tracking increases the performance load of the system and may expose some private information, so only tracking should be enabled when active analysis of a program. In order to enable program tracking, you can be in the web.config file Add or compile some elements in the section: enabled = "true" RequestLimit = "10" Pageoutput = "false" Tracemode = "sortbytime" Localonly = "True" /> The key attribute that must be modified is enabled = "true". If you are directly connected to the desktop of the web server, set the localonly = "true" property. This setting ensures that remote users cannot access detail information about the program. You can also make remote systems to view tracking information by using localonly = "false" settings, but doing some potential security risks may expose tracking information to the outside world. PageOutput = "false" setting is a unique security setting for the production server; however, you can use the Pageoutput = "True" setting on the development server to view the tracking information at the bottom of each ASP.NET page. RequestLimit = "10" default settings specify that information related to the first 10 ASP.NET requests will be stored. You can increase this value if needed; however, this will increase the workload of tracking work. When tracking a program, you can request a special page from an application root directory, TRACE.AXD. To view this page in your browser on a web server, you can open the following URL address: http://localhost/trace.axd. You will see a master track page, as shown in Figure 4. Note: The trace.axd file actually does not really exist in the root of the application - the request is intercepted by ASP.NET and dynamically processed. Figure 4 Application Tracking is a useful method for unveiling application logic to uncover the root of performance bottlenecks. When you click on the request "View Details" connection, you will see the Request Details page. This page provides very detailed information about the ASP.NET page composition and its underlying components. In the "Trace Information section, as shown in Figure 5, the time required for each phase of the page presentation is displayed. Application developers can also insert an application-specific information in this section to allow administrators to find performance issues in the developer code. In the Tracking Information section, check the "From Last (s)" column to determine which phase takes the longest time. Note: By default, the ASP.NET web program (.aspx file) produces a lot of useful tracking information. The administrator can also track the ASP.NET Web service (.asmx file), but unless the developer explicitly integrates the tracking capabilities in the web service, "TRACE INFORMATION" and "Control Tree" section will be a piece. blank. Figure 5 "Tracking Information" section of "Requesting Details" allows administrators to narrow the problem. Causes on a particular page. The next section of the Request Details page is "Control Tree" as shown in Figure 6. The control tree lists the name, type, and the number of HTML characters generated by the control, and the byte size of ViewState. The ASP.NET page is typically composed of different controls. A ASP.NET control can be a table, a hyperlink, a toolbar, or anything available in the web page. Figure 6 "Control Tree" demonstrates the details of each control on a given page. ViewState is a hidden field inserted into the HTML, and ASP.NET uses it to track the current settings of the page. Program developers often enable ViewState on controls that need to be needed, which will cause unnecessary bloated on the page, while the control tree will help solve these problems. At the bottom of the control tree, the Request Details page displays everything related to the same page and request. This information is useful for resolving program errors and analyzing performance issues. Explanation: Don't forget after all work is completed Set enabled = "false" properties in the element. Configuration settings System administrators can put strong control of ASP.NET program. Deciding many aspects of application performance can be configured via Machine.config and Web.config files. For general information about ASP.NET configuration, see http://support.microsoft.com/directory/Article.asp?id=kb;n-us;q307626&. In this section, we will introduce three kinds Magnifier ASP.NET Performance Configuration Settings: Debug, Process Model, and Data Source Configuration. Disable debugging. ASP.NET includes a special debug mode to help developer resolution issues. The debug mode will increase the system load and reduce the overall performance of the system, and debug mode should be disabled on the ASP.NET web service that is put into actual production applications. Debug mode in the Machine.config file Part of the open Settings in the label that can replace this setting by adding the section to the web.config file. After disabling the debug mode, the open "compilation" tab should include the debug = "false" element, and may contain other non-related elements, as shown below: DefaultLanguage = "VB"> Configure the process model. If the ASP.NET runs on the IIS 5.0 Server in the Windows 2000 environment, the part of the machine.config file Elements can include several useful configuration settings. In Windows Server 2003 and IIS 6.0, these items can be configured through the Internet Information Services (IIS) management tool. In short, the ASP.NET process model can automatically recycle the application, recover the lost memory and resources. In addition, it can limit ASP.NET to a certain processor in a multiprocessor system. Most administrators do not need to modify this part in the Machine.config file to optimize system performance. This section includes a useful configuration attribute that most of which can be used for performance adjustments. Note: Most elements in the Machine.config file can be replaced by placing elements in the web.config file. by default, The element can be defined in the Machine.config file. The default setting is as follows: Enable = "True" Timeout = "infinite" IDletimeout = "infinite" Shutdowntimeout = "0:00:05" RequestLimit = "infinite" Requestqueuelimit = "5000" RESTARTQUEELIMIT = "10" MemoryLimit = "60" WebGarden = "false" CPUMASK = "0xffffffff" UserName = "Machine" Password = "autogenerate" Loglevel = "Errors" ClientConnectedCheck = "0:00:05" ComauthenticationLevel = "Connect" ComimpersonationLevel = "Impersonate" ResponserestartdeadLockInterval = "00:09:00" ResponsedeAdlockInterval = "00:03:00" MaxWorkerthReads = "25" MaxiothReads = "25" /> Table 2 attribute Property Name Default Settings CPUMASK0xFffffFFF. This setting causes ASP.NET to start a separate ASP.NET process for each processor on the web server. Used to limit ASP.NET to certain processors in the multiprocessor system. This attribute will only work only after the WebGarden property is set to "false". If ASP.NET and SQL Server are running on the same system, and SQL Server uses the opposite CPUMASK settings, setting this attribute may improve the performance of the system to calculate the required CPumask value, you can use the calculator in the attachment And set it to scientific mode. Then select the binary calculation mode to enter a "1" for each processor to be used for ASP.NET. Enter a "0" for each processor that will not be used. Then, convert this number to a 16-based, and then modify this element value in the Machine.config file. Be sure that the number you entered is starting with '0x' to indicate that you entered a 16-way number. WebGardenfalse This setting causes ASP.NET to identify which processors should be used for ASP.NET using the cpumask properties. If this property is set to "True", ASP.NET will use the Windows operating system itself scheduling mechanism. RequestQueuelImit5000 If the speed of ASP.NET accepts the request is greater than the speed of its response request, then these requests will enter the queue to queue until they have free processing capabilities. If the queue grows more than a specific scale, ASP.NET will use a "server too busy" error response user request. Depending on the application, sending such an error may be much better than forced users to wait for the server response. ServerErrorMessageFile does not set - Dynamic Processing Dynamic Processing is sent to ASP.NET If an error occurs, the absolute path of the file will be sent to the user, for example, when the Requestqueuelimit property reaches the set value. Administrators should use this setting to provide user-friendly error messages, inform them what problems have, and remind them to try again at a later time. Configure the data source. Some applications allow administrators to define data sources. If an ASP.NET program can use the OLEDB data source, you can use inherent SQL data sources, you should use the SQL data source as much as possible. With ASP.NET built-in SQL clients with ASP.NET can increase system performance by 50% compared to the data source name (DSN) configured in the ODBC Data Source Manager. Unfortunately, there is currently no continuous consistency for use, so refer to the documentation of the application. Other applications built on .NET Framework Applications designed for ASP.NET infrastructure have given more control capabilities for system administrator adjustment. However, there are many applications that do not use asp.net. For example, the .NET remote web service does not utilize ASP.NET, so if you want to analyze the performance performance of these applications, monitor the ASP.NET performance counter is not a good way. In addition, .NET remote applications do not support HTTPGET Web service protocols, so WAS cannot be used to generate loads for these programs. In fact, for the .NET remote program, the system administrator must rely on program developers to complete a large number of performance analysis and adjustment. However, a common language runtime (CLR) provides several useful performance counters, as shown in Table 3. Table 3 Performance counters provided by Cl R Object counter Description .NET CLR Remoting Remote Calls / sec is used to measure the current speed of receiving remote requests. This counter enables administrators to accurately measure the current load of the application. Process% Processor Time This counter can measure processor percentage consumed by a particular process. Each .NET remote program has a unique process name that matches the name of the program executable file. Monitor the "Remote Calls / Sec" counter and "% Processor Time" counter can help system administrators better understand the processing time required for each remote call. .NET CLR NETWORKINGBYTES SENT, BYTES Received "Bytes Sent" and "Bytes Received" counters can measure network traffic generated by all .NET CLR applications, which is helpful for the traffic size generated by the measurement program. It does not include the traffic generated by the ASP.NET web application and the web service. .NET CLR LOCKSANDTHREADSTOTAL # of contections, the number of contention of all applications running in the CLR in CLR. For health applications, the contention of system resources is a normal thing. However, if the number remains rising during a intermittent performance problem, it indicates that a key system resource is locked by a program. This may be that an application is inefficient to use the system resource flag, which can be corrected by program developers. .NET CLR DatasqlClient: Current # pool and nonpooled Connections Measure the number of active SQL connections, including ASP.NET programs. Internet Information Services IIS is an ASP.NET web program, ASP.NET Web services, and a lot of .Net remote programs. Understanding the importance of IIS performance adjustment is the key to achieving high performance .NET programs. Adjustments to IIS are not only for ASP.NET, and there is already a large number of related documents available for learning. Therefore, the content of this part is not the focus of this paper. For more details on IIS performance adjustment, read the topic as "art and scientific with IIS5.0 to perform performance adjustments to Web servers", the white paper can be obtained from the following address. http://www.microsoft.com/windows2000/techinfo/administration/web/tuning.asp. SQL Server Most applications constructed on .NET Framework are connected to SQL Server to retrieve data. In many cases, databases or database connections will become the performance bottleneck of the program. For the data driven program, it is important to understand the performance of SQL Server to the overall performance of the program. Program developers have a lot of speeches from how to use data from the SQL Server database, and the choices they make have an extremely important impact on the overall performance of the program. Although a particular query that proceeds is generally not modified by the system administrator, you can analyze a .NET program to the type of request issued to the database and adjust the index mode accordingly. This section will give a detailed distribution guidance for SQL Server index adjustment - a method that may quickly improve program performance. For more information on SQL Server performance, please read the book of the SQL Server 2000 Performance Adjustment Technology Guide issued by Microsoft Press. An easy way to improve SQL Server performance is to use the Index Tuning Wizard and SQL Profiler. Profiler can record the query received by SQL Server and record them in a table of files or databases. The Index Adjustment Wizard can analyze these files to identify changes to the database design to improve database performance while allowing system administrators to choose the most suitable modification. The operation of these tools increases the workload of the database, so you should not run these tools in a production system that is close to the maximum processing capability. To optimize your database design in PROFILER and INDEX TUNING WIZARD, you should: log in to the SQL Server console. Click the "Start" button to point to "Programs", point to "Microsoft SQL Server", then click "Profiler". Open the File menu and click "New" to select "Track" to create a new track. In the "Connect to the SQL Server" dialog box, select your SQL Server and authentication method, then click "OK". In the Tracking Properties dialog, select "SQLProfilertUning" from the Template Name drop-down list. Select the "Save to File" check box and enter a new file name in the Save As dialog. Click "Save". Click the "Run" button to start the request to send to SQL Server, as shown in Figure 7. If your program is currently active, let the optimizer run a long enough time to be at least 100 rows of data. If your program is currently not running, start the program in a typical way to generate a data request. Figure 7 PROFILER Collect SQL Request for INDEX TUNING WIZARD analysis. After collecting enough requests, click the "Stop" button on the toolbar. From the Tools menu, select "INDEX TUNING WIZARD" (Index Adjustment Wizard). The wizard will appear, as shown in Figure 8. Click the "Next" button and then select your database server when you receive a prompt. Figure 8 INDEX TUNING WIZARD Analyzes the workload file generated by Profiler and how to modify the index to improve performance. In the INDEX TUNING WIZARD page, select the database that is most commonly used by the application from the "Database" list. If your application needs to open communication with the same database, you should repeat the above procedure on each database. Then click the "Next" button. In the "Specify Workload" page, select the "My Workload File" radio button. In the "Open" dialog box, select the file you specified in step 5. Click the "Open" button and click "Next". On the "Select the Dataset Table" page, click the "Select All Tables" button. Click "Next". At this point, INDEX TUNING WIZARD will try to find out the existing index existence and solutions to improve database performance. This process will last for several minutes. After completing the analysis, you will see the "Index Recommendations" page. If Index Tuning Wizard finds a way to improve performance, it will list these methods in this page and evaluate possible performance improvements possible. In general, you can safely accept these modifications. Click "Next" to continue. On the "Completing The INDEX TUNING WIZARD" page, click the "Complete" button to close the wizard, and then click the "OK" button when you receive a prompt. In addition, you may also need to close SQL Profiler. in conclusion System administrators can perform in-depth analysis and control over program performance of .NET Framework. For example, ASP.NET has session status tracking capabilities, which can be individually tracked for each application. These features allow administrators to adjust an application to meet their work environment's unique needs of performance, scalability, and reliability. This white paper describes how to monitor .NET Framework program performance, simulate busy conditions, and configure main performance parameters. If you want to get more information about program performance adjustments, access the following address: http://msdn.microsoft.com/library/en-us/dnduwon/html/d5dplyover.asp. script>