180 likes | 281 Views
Flash: An efficient and portable Web server. Authors: Vivek S. Pai, Peter Druschel, Willy Zwaenepoel Presented at the Usenix Technical Conference, June 1999. Presented by Richard Ta-Min. Introduction. Web servers need to be fast and able to service many requests concurrently
E N D
Flash: An efficient and portable Web server Authors: Vivek S. Pai, Peter Druschel, Willy Zwaenepoel Presented at the Usenix Technical Conference, June 1999 Presented by Richard Ta-Min
Introduction • Web servers need to be fast and able to service many requests concurrently • Three web server architectures • Multi-process and multi-thread • Apache web server • Single process event driven • Zeus web server • Asymmetric multi process event driven • Flash web server
Processing of HTTP request Data not ready to be read from socket stat() and open() sys call may block on disk I/O read() and write() sys call may block too
Multiple Process - MP • Each process handles one request • Disadvantages • Each process has its separate address space • Cannot share data: separate cache • Context switch overhead
Multiple Threads - MT • Each thread handles one request • Advantages • One address space: All threads share one cache • Less context switch overhead • OS has to support kernel threads • Apache V2.0 can use threads
Single Process Event Driven - SPED • Single thread of execution • Use non-blocking system calls to perform I/O operations • Used by Zeus web server
Single Process Event Driven - SPED • SPED should be able to process many requests at a time but … • Non-blocking read/write don’t work on disk operations Disk I/O operations still block
Asymmetric Multi Process Event Driven • Combination of MP and SPED • Use non-blocking calls to perform network and pipe operations • Use helper process to perform blocking disk I/O operations
Asymmetric Multi Process Event Driven • Helper process can be a separate thread or process • Master and Helper process communicate through IPC • Master and Helper mmap() the same request file • Helper process reads file from disk and brings into memory • Helper notifies master that file is ready • Avoid data transfer between processes
Flash Web Server • Flash web server – implementation of the AMPED architecture • Uses aggressive caching • Pathname translation caching • Response header caching • Caching of already mapped files
Performance Evaluation • Compare different web server architecture • Flash AMPED • Flash SPED • Flash MT • Flash MP • Apache V1.3.1 • Zeus V1.30
Test Platform • Server • Speed: 333 MHz Pentium II • Memory: 128 MB • Operating System • Solaris 2.6 • Free BSD 2.2.6 – No support for threads • Clients • Software that simulates HTTP clients
Synthetic Workload • Clients request the same file repeatedly • Purpose to see how web server behaves under best conditions Solaris FreeBSD
Trace Based Experiments • Replay access logs from real web servers
Trace Based Experiments • Test server with workload of different data set size
Trace Based Experiments • Varying the number of clients
Conclusion • Efficient web server: Need to handle request and perform disk operations • Web server architecture • MP/MT • SPED • AMPED – Combines efficiency of SPED and MP • Flash web server based on AMPED outperforms Zeus and Apache