Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


June 1998

Optimizing Dynamic Web Content for IIS


RSS
Subscribe to Windows IT Pro | See More Internet Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Because you include ASP scripts in the same page as static HTML content, ASP provides a simpler programming model than CGI or ISAPI for creating dynamic Web content. ASP's simplicity makes development of dynamic content available to a larger population of Web developers. If you are familiar with VB and HTML, you can easily develop ASP Web pages.

Listing 3 is a simple ASP page that uses ASP's built-in Response object to place a text string in the HTML stream that IIS sends to the user's browser. The <% %> symbols identify script that the ActiveX scripting engine needs to interpret. For more information about ASP, see the IIS SDK.

Check the Performance, Please
Which of IIS's three mechanisms for developing dynamic Web content is best? Many developers use ASP because it's powerful and easy to use. But that doesn't mean ASP offers the best performance.

To get a sense of the relative performance of the three types of dynamic Web content, I ran some simple tests using Microsoft's Web Capacity Analysis Tool (WCAT), which comes with Microsoft Windows NT Server 4.0 Resource Kit, Supplement Two. (For more information about WCAT, see T.J. Harty, "Testing Your Web Environment," December 1997.) My test environment consisted of three computers: My Web server was a Compaq Deskpro 6000 with a 200MHz Pentium Pro processor and 64MB of RAM running Microsoft Windows NT Server 4.0 with Windows NT 4.0 Option Pack (which includes IIS 4.0). The controller for my tests was an AT&T Globalyst 730 with a 100MHz Pentium processor and 48MB of RAM running NT Server 4.0. My client machine was a Compaq LTE 5400 with a 150MHz Pentium processor and 80MB of RAM running Windows 95.

I tested the responsiveness of five different Web implementations: static HTML, CGI, ISAPI, ASP with no script, and ASP with a small script. Each page responded to a simulated Web browser's request for its contents by providing the text string "Hello, I must be going!" I used the CGI, ISAPI, and ASP (with a small script) code that Listing 1, Listing 2, and Listing 3 show, respectively. I used the static HTML program that Listing 4, page 173, shows as a baseline for comparing the other implementations. The ASP page with no script was identical to Listing 4, except the file extension was .asp. Testing ASP pages with and without scripts let me differentiate between the overhead the ASP ISAPI extension places on a page and the overhead ASP code with script creates.

For each implementation, I used WCAT to repeatedly run a thread from the client machine to the Web server that simulated a browser's HTTP get requests for the implementation's URL. Each test lasted 3 minutes, and WCAT measured the number of times each implementation produced the "Hello, I must be going!" string per second. I repeated the battery five times for each implementation and averaged the results, which Graph 1 displays.

The ISAPI extension was the fastest, opening an average of 168.43 pages per second. The static HTML page was close behind, with an average of 159.35 pages per second. My ASP page without a script registered an average of 133.16 pages per second, and the simple script in my second ASP page reduced the page's responsiveness to an average of 124.91 pages per second. CGI opened only an average of 39.13 pages per second.

These simple tests demonstrate the relative performance of each type of dynamic Web content, but the data doesn't correspond to response times for most Web pages. Real Web pages access far more complex content, including databases, sophisticated algorithms, and legacy data. Adding complexity to any form of dynamic content lengthens a page's response time substantially.

Evaluate Your Content
CGI pages produce the slowest response times because of the overhead they require to create new processes and direct information through communication pipes. ISAPI extensions offer the fastest response times because you implement them as in-process DLLs. ASP pages are in the middle, primarily because of the runtime script interpretation they require to process pages.

If you're responsible for managing your Web site's performance, consider the way you produce dynamic content. Focus on the pages that get the most hits and show the most sluggish response. You can easily identify which pages get the most activity using a tool such as Microsoft's Usage Analyst, which is part of Microsoft Site Server, Standard Edition. If any of your busiest pages are dynamic and if those pages have slow response times, examine the dynamic content's implementation and consider rebuilding the page. For example, if your logon or search screen is currently an ASP program, you might replace it with a faster ISAPI extension.

However, if speed isn't a problem with a particular page, I recommend sticking with ASP. It's simple, and you needn't over-engineer your site's performance.

End of Article

   Previous  1  [2]  Next  


Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...


IIS and Web Administration Whitepapers Best Practices for SharePoint Backup & Recovery

Meeting Compliance Objectives in SharePoint

Improve SharePoint Performance for Remote Workers

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Check out our list of Free Email Newsletters!

IIS and Web Administration eBooks Web Filtering: An Assessment

Understanding and Leveraging Code Signing Technologies

Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement