Working With Iis

  • Uploaded by: SRAVAN TADAKAMALLA
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Working With Iis as PDF for free.

More details

  • Words: 1,567
  • Pages: 6
IIS: Internet Information Services Author: - Sravan Tadakamalla [email protected] What is IIS? IIS (Internet Information Services) is a most popular web server. It is a collection of internet-based services for servers. How it is useful in performance testing? It has built in a very fast and useful logging mechanism to enable project teams to address performance issues in production and in performance testing. IIS stores the log files in the specified format. By default, it is stored in W3C Extended Log File Format. We use IIS 6.0 log files to identify performance issues in performance testing. This information can also be compared to production data for verification. There are many benefits in analyzing IIS log files. First, it can be used in production as well as in performance testing. It enables a production comparison to verify performance testing results. Second, it can be easily understood by business managers and performance testers. It bridges a gap of communication. The performance tester can easily identify performance bottleneck and correlate them to business value using data derived from IIS log files. Third, it provides many technical insights into the system based on how you slice and dice the raw data. These technical insights are tremendously useful in solving performance bottlenecks. What do we do with the log files? • • •

Setup and collect IIS log files. Analyze IIS log files information and focus on areas of improvement in a systematic manner. Make business and technical decisions based on IIS log files information. A systematic approach to collect and analyze IIS log files is: Step 1: Setting up IIS Log File 1a: How to set up IIS Log File 1b: When to set up IIS Log File Step 2: Importing or Parsing IIS Log File

Step 3: Analyzing IIS Log Files 3a: Simple Network Analysis 3b: Simple Response Time Analysis

Step 1:Setting up IIS Log File (a)How to set up IIS Log File First, you have to start the Internet Information Service (IIS) Manager. On Windows Server 2003, it is Start -> All Programs -> Administrative Tools -> Internet Information Service. Second, it is per web site setting. You can select the web site and right click Properties. The corresponding web site’s property page will pop up:

* Enable logging – It should be checked to enable logging. You must be a member of the Administrators group on the local computer to enable logging. * Active log format – The default is “W3C Extended Log File Format”. We will focus on this using this format. We need to use “W3C Extended Log File Format” because it has advanced options for tracking performance issues. The other supported formats are: Microsoft IIS Log File Format, NCSA Common Log File

Format and ODBC Logging. * Properties – Select this “Properties” button will enable us to continue and set additional performance tracking options.

* New log schedule – The default is Daily. There are other settings based on time interval and file size. It is your decision to choose one that is manageable in your situation. Typically, the default of Daily is sufficient. * Use local time for file naming and rollover – The default is checked. For performance testing, please use local time to simplify. Only in rare occasions when you need to correlate web server logs in different time zones, this setting should be unchecked. * Log file directory – This is where the log file would be written. Please note that the actual log file would be written to a sub-directory. E.g. C:\windows\system32\LogFiles\W3SVC1. The web site ID at the end is used to identify the sub-directory. For each performance testing iteration, a separate directory can be used for logging to organize results. E.g. d:\iislogs\test20061001, d:\iislogs\test20061008. Use naming conventions based on your project team’s habit. *Advanced – The advanced option is only available when the “W3C Extended Log File Format” is selected. The 3 options for tracking performance issues are “Bytes Sent (sc-bytes)”, “Bytes Received (cs-bytes)” and “Time Taken (timetaken)”. sc-bytes is the number of bytes going from server to client. cs-bytes is the number of bytes going from client to server. Time-taken is the number of milliseconds of execution. To simplify, select all options for performance testing.

(b)When to set up IIS Log File There are 3 situations when you need to set up the IIS Log File 1. In single user performance analysis – You should set up the IIS Log File and then click through the user interface for a given scenario and then archive the single user baseline. But if the application is slow in single user, there is no need to run the stress test. Fix the single user performance problem first before proceeding in stress test. (This document will not discuss how to do single user performance analysis) 2. In stress test – You should set up the IIS Log File to assist in performance testing using Visual Studio Team System. The analysis of the IIS Log File is based on the system under stress. In ideal situation, it is best to keep a separate IIS Log File. 3. In production – You should set up the IIS Log File. Use the same analysis of the IIS Log File and compare your production results with your performance testing results. First, you can verify whether your presumption of your stress test scenarios is correct. If you see 20% of users hitting URL A and 80% of users hitting URL B, you should use similar ratios in your stress test. There is no perfect match. Just try to be reasonable. Step 2: Importing or Parsing IIS Log File We can use 3 tools for parsing IIS Log File- Log Parser 2.2, Microsoft Excel and SQL Server 2005 Enterprise Edition. LogParser 2.2 is a powerful tool. You can download it from http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c2591b2-f8d975cf8c07&displaylang=en you can find valuable support information from this site: http://www.logparser.com/ Using Microsoft Excel 2003 Here are the steps to import IIS log file to Excel for analysis. The following instruction is based on Excel 2003: * Launch Excel and select an empty worksheet * Select from the menu “Data” -> ”Import External Data” -> “Import Data” * Use “All Files” in Files of Type to view all files. Open the IIS Log File. * Select “Delimited”. Click Next. * Check “Space”. Click Next * Use default and click Finish. * Click OK * Delete the extra information except headers. Delete cell A4 and shift cells left. If there are additional headers within the content, you can sort column A and delete excess information. * You can then from the menu “Data” -> “Fitler” -> “Auto Filter”. Then, you can sort the 3 important columns (bytes sent/bytes received/time taken), hide other columns and use Excel functions to parse the data.

Excel is a powerful tool for parsing IIS log file. However, there is a limitation of 65536 rows. You can use “Start Import at Row” option to skip rows and do the import multiple times. However, Excel is mostly used in looking at small IIS Log File and to parse IIS Log File quickly. Step 3: Analyzing IIS Log Files The final step is to make sense of the IIS Log File data in terms of performance testing. Let’s say that you have run a stress test and you need to analyze the data. You can look at the IIS Log File captured during the stress test. (a) Simple Network Analysis - Network Analysis based on URL and parameter just for ASPX Arrange the Excel sheet data as following: order the entire data based on cs-uri-stem and cs-uri-query in descending order. And select the top 20 list of these and also the avg. of these 20 rows of sc-bytes and cs-bytes.( in the form of query - Select top 20 [cs-uri-stem],[cs-uri-query], avg([sc-bytes]) as [BytesSent,] avg ([cs-bytes]) as [BytesReceived] from [PerfTestTable] group by [cs-uri-stem], [cs- uri-query] order by [BytesSent] desc ) The action is to query the largest data transfer. Identify common large data transfer performance problems 1. Large ViewState in ASP.NET. For example, put a report in Web Form Control. It will generate a huge view state. 2. Large graphics. Use tools to reduce the graphics size. 3. Large amount of data displayed in table. Use paging to reduce the data transfer. Also, most web pages have high bytes sent from the server to the browser and we seldom see problem the other way around. Please note that in this analysis, we do not see latency impact. The rule of thumb is to reduce round trips. IIS Log file is not the ideal tool to check for network latency impact. (b) Simple Response Time Analysis Count frequency, time taken based on URL just for ASPX. Group by URL and Group by parameter Consider the cs-uri-stem,cs-uri-query columns in the sheet, arrange them in the descending order and see the values of them and also the no. of cs-uri-stem values are there which ends with .aspx. Consider these as no. of hits. The response time analysis can be done couple times to find out what the business users think are acceptable load level and the acceptable response time. The central idea is to use IIS Log File to judge how many requests have exceeded threshold. It gives the business user an understanding. Also, remember that even

though there are some guidelines on response time acceptability, it is a subjective issue.

Related Documents

Working With Iis
April 2020 3
Working With
June 2020 22
Iis
October 2019 36
Iis
June 2020 17
Iis
June 2020 19
Working With String
May 2020 2

More Documents from ""