许多人使用单个浏览器请求页面,来测试 Web 站点的性能。这样做就会给您一个感觉,即站点的响应能力很好,但这样做实际上并不能告诉您在负载条件下站点的性能如何。
一般情况下,要想准确地测试性能,您需要一个专门的测试环境。此环境应包括硬件,其处理器速度、处理器数量、内存、磁盘、网络配置等方面与生产环境的硬件相似。其次,您必须指定客户机的工作负荷:有多少同时的用户,他们发出请求的频率,他们点击页面的类型等等。如果您没有站点实际使用情况的数据,您必须估计一下使用的情况。最后,您需要一个可以模拟预期客户机工作负荷的工具。有了这些工具,您就可以开始回答诸如“如果我有 N 个同时的用户,那么需要多少服务器?”之类的问题。您还可以找出出现瓶颈的原因,并以此为目标进行优化。
下面列出了一些好的 Web 负载测试工具。我们特别推荐 Microsoft Web Application Stress (WAS) 工具包。WAS 可使您记录测试脚本,然后模拟数百或成千上万个用户访问 Web 服务器。WAS 报告很多统计信息,包括每秒钟的请求数,响应时间分布情况和错误计数。WAS 有丰富的客户机界面和基于 Web 的界面两种,Web 界面可使您进行远程测试。
一定要阅读 IIS 5.0 Tuning Guide。
技巧 28:阅读资源链接
下面是一些与性能有关的出色的资源链接。如果您想了解有关信息,请阅读 Developing Scalable Web Applications。
资源
优化 ASP 脚本
Developing Scalable Web Applications
Got Any Cache? Nancy Winnick Cluts 著
Maximizing the Performance of Your Active Server Pages,Nancy Winnick Cluts 著
15 Seconds: Performance Section
Enhancing Performance in ASP - Part I,Wayne Plourde 著
When is Better Worse? Weighing the Technology Trade-Offs,Nancy Winnick Cluts 著
Speed and Optimization Resources,Charles Carroll 著
优化 IIS
The Art and Science of Web Server Tuning with Internet Information Services 5.0
Leveraging ASP in IIS 5.0,J.D. Meier 著
Tuning IIS 4.0 for High Volume Sites,Michael Stephenson 著
Tuning Internet Information Server Performance,Mike Moore 著
Navigating the Maze of Settings for Web Server Performance Optimization,Todd Wanke 著
Managing Internet Information Server 4.0 for Performance,Hans Hugli 著
ADO 和 SQL Server
Top Ten Tips: Accessing SQL Through ADO and ASP,J.D. Meier 著
Improve the Performance of your MDAC Application,Suresh Kannan 著
Pooling in the Microsoft Data Access Components,Leland Ahlbeck 和 Don Willits 合著
SQL Server: Performance Benchmarks and Guides
Improving the Performance of Data Access Components with IIS 4.0,Leland Ahlbeck 著
Microsoft Data Access Components (MDAC) and ActiveX Data Objects (ADO) Performance Tips,Leland Ahlbeck 著
Microsoft SQL Server 7.0 Practical Performance Tuning and Optimization - The Server Perspective,Damien Lindauer 著
Microsoft SQL Server 7.0 Practical Performance Tuning and Optimization - The Application Perspective,Damien Lindauer 著
Accessing Recordsets over the Internet,Dino Esposito 著
ASP 组件和线程模型
ASP Component Guidelines,J.D. Meier 著
Q243548: INFO: Design Guidelines for VB Components under ASP
Threading Models Explained,Nancy Winnick Cluts 著
So Happy Together? Using ActiveX components with Active Server Pages,Nancy Winnick Cluts 著
Developing Active Server Components with ATL,George Reilly 著
Agility in Server Components,Neil Allain 著
Building High-Performance Middle-Tier Components with C ,Jon Flanders 著
Active Server Pages and COM Apartments,Don Box 著
House of COM: Active Server Pages,Don Box 著
House of COM: Contexts,Don Box 著
House of COM: Performance Trade-offs of the Windows 2000 Component Execution Environment,Don Box 著
Building COM Components That Take Full Advantage of Visual Basic and Scripting,Ivo Salmre 著
Component Design Principles for MTS
词典组件
Creating a Page Cache Object,Robert Coleridge 著
Abridging the Dictionary Object: The ASP Team Creates a Lookup-Table Object,Robert Carter 著
Caprock Dictionary
Site Server Commerce Edition includes a dictionary component
会话状态
Q175167: HOWTO: Persisting Values Without Sessions
Q157906: HOWTO: How To Maintain State Across Pages with VBScript
XML-based Persistence Behaviors Fix Web Farm Headaches,Aaron Skonnard 著
House of COM: Stateless Programming,Don Box 著
性能和扩展性
Blueprint for Building Web Sites Using the Microsoft Windows DNA Platform
Server Performance and Scalability Killers,George Reilly 著
Microsoft Visual Studio Scalability Center
Fitch & Mather Stocks 2000
Tuning the FMStocks Application
High-Performance Visual Basic Apps,Ken Spencer 著
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




