160 likes | 206 Views
An Analysis of Web Server Performance. Arun Iyengar, Ed MacNair and Thao Nguyen IBM Research Division T. J. Watson Research Center P. 0. Box 704 Yorktown Heights, NY 10598 1997 IEEE. Introduction.
E N D
An Analysis of Web Server Performance Arun Iyengar, Ed MacNair and Thao Nguyen IBM Research Division T. J. Watson Research Center P. 0. Box 704 Yorktown Heights, NY 10598 1997 IEEE
Introduction • Web server performance is a critical issue for sites which service a high volume of requests. • If the server cannot adequately handle the request traffic, the server will fail to satisfy some requests and result in unacceptably slow responses for other requests. • The paper analyzes the performance of Web servers using simulations incorporating input parameters from actual systems. It focuses on situations where CPU processing power is the limiting resource. • Benchmarks tool : WebStone and SPECweb96 • Topic : latencies, rejected requests, throughputs Ya-Ling@Lab
Performance Bottleneck • The CPU processing power is the limiting resource. • The network can also act as a performance bottleneck. • The bandwidth of the Internet backbone is generally not a limiting factor. • Web clients are often connected to the Internet with slow links. The real bottleneck for accessing Web sites is the client connection to the Internet. • One of the best way to improve performance is to reduce the average request size. Ya-Ling@Lab
Maximum Network Throughput Bandwidth FDDI( 100 Mb/s ) T3 ( 45 Mb/s ) Ethernet ( 10 Mb/s ) T1 (1.5 Mb/s ) Connections/s = ( 100X10^3 / 8 ) 100 =125 Bandwidth : 10Gb/s Connections/s = ( 10X10^6 / 8 ) 100 =12500 Ya-Ling@Lab
The types of requests • Static files • Static page : Text, HTML… • Web servers can typically satisfy several hundred requests per second for static files. • Dynamic page • Connect to database • Such as CGI, ASP, PHP, JSP, Perl • Often less than the corresponding number for static files by a factor of around ten. • The number of requests per unit time for dynamic pages which a Web server can handle is often less than the corresponding number for static files by a factor of 100 or more when the dynamic pages are created by programs which open new connections to databases. Ya-Ling@Lab
Methodology • fcgi • The proportion of requests for dynamic pages • cv • The coefficient of variation for the distribution of request interarrival times • standard deviation average • tcgi • The average CPU time for satisfying dynamic requests The average CPU time for satisfying static requests • r • The normalized request rate • The average request rate divided by the maximum request rate Ya-Ling@Lab
Methodology • The Web server is multithreaded with 25 threads. • In order to prevent requests from being rejected during peak periods, a queue of requests is maintained which begins to fill up after all threads become busy. • Latencies • The average CPU time for satisfying requests for static files was 5 milliseconds. • The server could handle 200 requests per second for static files. • For a server which can handle c static files per second, the latencies we present should be multiplied by 200/c . • P8, P9 illustrate how performance degrades with increasing proportions of dynamic pages. Ya-Ling@Lab
Results and Discussion • Average latency as a function of the proportion of dynamic pages. r=1, rejection rates=5%, queue length=P.9 r=1, rejection rates=1%↓, queue length=1000 Ya-Ling@Lab
Queue Length • The queue lengths needed to achieve rejection rates of around 5% for the experiments. • Burstier distributions result in higher average latencies. • When queue lengths are fixed at 1000, the burstiness of the distribution affects the average latency much less. • Rejection rates are lowered by using longer queues which adversely affect the average latency. Ya-Ling@Lab
Results and Discussion • Average latency as a function of the coefficient of variation of the request distribution interarrival times. r=1, rejection rates=5%, queue length=P.9 r=1, rejection rates=1%↓, queue length=1000 Ya-Ling@Lab
Summary and Conclusion • The paper studied the characteristics of several request distributions from real Web sites. • Values for cv generally range from 1 to 4. • Burster distributions adversely affect performance. • Requests for static files usually constitute well over 50% of all request distributions even for Web sites which generate all or most pages dynamically. • Because dynamic pages often include static files containing image or other multimedia data. Ya-Ling@Lab
Summary and Conclusion • The percentage of dynamic pages should be kept as low as possible. • Using server API’s such as FastCGI, ICAPI… • Caching frequently accessed dynamic pages • Trade-off between average latencies and the percentage of requests rejected by the server. • Average latencies(↓)<=> Rejecting requests (↑) • Drive servers to satisfy 95% or less of the maximum number of requests for keeping latencies low. • This can be achieved by maintaining appropriate queue lengths. Ya-Ling@Lab
Reference • An Analysis of Web Server Performance • 鳥哥:WWW伺服器 • http://en.wikipedia.org/wiki/Api • Web Server Technology Ya-Ling@Lab
API • Application Programming Interface • It is a source code based specification intended to be used as an interface by software components to communicate with each other. • BAK Ya-Ling@Lab