Comparing the performance of web server architectures

In this paper, we extensively tune and then compare the performance of web servers based on three different server architectures. The μserver utilizes an event-driven architecture, Knot uses the highly-efficient Capriccio thread library to implement a thread-per-connection model, and WatPipe uses a hybrid of events and threads to implement a pipeline-based server that is similar in spirit to a staged event-driven architecture (SEDA) server like Haboob. We describe modifications made to the Capriccio thread library to use Linux's zero-copy sendfile interface. We then introduce the SY mmetric Multi-Processor Event Driven (SYMPED) architecture in which relatively minor modifications are made to a single process event-driven (SPED) server (the μserver) to allow it to continue processing requests in the presence of blocking due to disk accesses. Finally, we describe our C++ implementation of WatPipe, which although utilizing a pipeline-based architecture, excludes the dynamic controls over event queues and thread pools used in SEDA. When comparing the performance of these three server architectures on the workload used in our study, we arrive at different conclusions than previous studies. In spite of recent improvements to threading libraries and our further improvements to Capriccio and Knot, both the event-based μserver and pipeline-based Wat-Pipe server provide better throughput (by about 18%). We also observe that when using blocking sockets to send data to clients, the performance obtained with some architectures is quite good and in one case is noticeably better than when using non-blocking sockets.

[1]  John R. Douceur,et al.  Cooperative Task Management without Manual Stack Management or, Event-driven Programming is Not the Opposite of Threaded Programming , 2002 .

[2]  Eddie Kohler,et al.  Making Events Less Slippery with eel , 2005, HotOS.

[3]  Eric A. Brewer,et al.  USENIX Association Proceedings of HotOS IX : The 9 th Workshop on Hot Topics in Operating Systems , 2003 .

[4]  Mark Russinovich,et al.  High-Performance Memory-Based Web Servers: Kernel and User-Space Performance , 2001, USENIX ATC, General Track.

[5]  Adam Wierman,et al.  Open Versus Closed: A Cautionary Tale , 2006, NSDI.

[6]  Douglas C. Schmidt,et al.  Measuring the impact of event dispatching and concurrency models on Web server performance over high-speed networks , 1997, GLOBECOM 97. IEEE Global Telecommunications Conference. Conference Record.

[7]  KyoungSoo Park,et al.  Connection Conditioning: Architecture-Independent Support for Simple, Robust Servers , 2006, NSDI.

[8]  D. Lanciaux Operating systems : theory and practice : proceedings of the Second International Symposium on Operating Systems Theory and Practice, organized by IRIA and Carnegie-Mellon University, Rocquencourt, France, October 2-4, 1978 , 1979 .

[9]  Tim Brecht,et al.  accept()able Strategies for Improving Web Server Performance , 2004, USENIX ATC, General Track.

[10]  George C. Necula,et al.  Capriccio: scalable threads for internet services , 2003, SOSP '03.

[11]  Peter Druschel,et al.  A Scalable and Explicit Event Delivery Mechanism for UNIX , 1999, USENIX Annual Technical Conference, General Track.

[12]  David Mosberger,et al.  httperf—a tool for measuring web server performance , 1998, PERV.

[13]  Alan L. Cox,et al.  Lazy Asynchronous I/O for Event-Driven Servers , 2004, USENIX Annual Technical Conference, General Track.

[14]  Robert Tappan Morris,et al.  Multiprocessor Support for Event-Driven Programs , 2003, USENIX Annual Technical Conference, General Track.

[15]  Paul Barford,et al.  Generating representative Web workloads for network and server performance evaluation , 1998, SIGMETRICS '98/PERFORMANCE '98.

[16]  Marvin Theimer,et al.  Cooperative Task Management Without Manual Stack Management , 2002, USENIX Annual Technical Conference, General Track.

[17]  David E. Culler,et al.  SEDA: an architecture for well-conditioned, scalable internet services , 2001, SOSP.

[18]  Robert Tappan Morris,et al.  Event-driven programming for robust software , 2002, EW 10.

[19]  Kang G. Shin,et al.  Persistent dropping: an efficient control of traffic aggregates , 2003, SIGCOMM '03.

[20]  Tim Brecht,et al.  Comparing and Evaluating epoll, select, and poll Event Mechanisms , 2004 .

[21]  Brendan Burns,et al.  Flux: A Language for Programming High-Performance Servers , 2006, USENIX Annual Technical Conference, General Track.

[22]  Peter Druschel,et al.  Measuring the Capacity of a Web Server , 1997, USENIX Symposium on Internet Technologies and Systems.

[23]  Willy Zwaenepoel,et al.  Flash: An efficient and portable Web server , 1999, USENIX Annual Technical Conference, General Track.