150 likes | 235 Views
A Self-Adapting Web Server Architecture Towards Higher Performance and Better Utilization. Objectives. Introduction I/O in Original Web Server Architecture Related Work The Need for Adaptability The Self-Adapting Architecture Conclusion. Introduction.
E N D
A Self-Adapting Web Server Architecture Towards Higher Performance and Better Utilization
Objectives • Introduction • I/O in Original Web Server Architecture • Related Work • The Need for Adaptability • The Self-Adapting Architecture • Conclusion
Introduction • Outline limitations in original architectures • Limited scalability • Inefficient utilization • Complexity • Survey existing Web server architectures • Introduce a self-adapting architecture • Present an evaluation for the proposed model
I/O in Original Web Servers • Synchronous I/O • Blocking to the calling process/thread • Connection-Oriented • For multi-process/multi-threaded servers • MP: Switching to an active process is natural • MT: Support for kernel threads is needed • (+) Simple design • (-) Limited scalability • (-) Inefficient server utilization
I/O in Original Web Servers Synchronous I/O causes idle-time for the calling process.
I/O in Original Web Servers • Asynchronous I/O • Allows servers to interleave computations with slow disk I/O • Event-Oriented • Works well for single-process servers • (+) Highly efficient, scales well • (-) Complicated design • (-) Notification overhead
I/O in Original Web Server Asynchronous I/O allows the calling process to interleave processing with I/O.
Related Work Modify other aspects Multi-accept (2001, 2004) Increase cache locality (2001) Propose hybrid models AMPED (1999) SEDA (2001) HYBRID (2005) SYMPED (2007) Replace available libraries Capriccio (2001) Lazy Asynchronous I/O (2004)
The Need for Adaptability • In non-adaptive models • Synch. I/O under overload conditions • Synch. I/O over a busy disk • Asynch. I/O under low load conditions • Adapt to presence of queued requests • Allows more practical scenario • Pushes the limits of scalability • Allows better utilization when this becomes an issue
The Self-Adapting Web Server • Multi-threaded, uses thread pools • Algorithm: • Accept(request); • Add work to queue; • Worker thread takes work from queue; • If there are more queued work • Perform Asynchronous I/O; • Else • Perform Synchronous I/O; • Worker thread is done; • Polling thread continuously watches for I/O requests;
The Self-Adapting Web Server Layout of the self-adapting Web server architecture
The Proposed Model Either worker or helper threads can perform I/O, whichever is less expensive
The Proposed Model Issues with previous models : Still room for improvement Need for adaptability Efficiency using available system calls Expensive scenarios Proposed solution A worker thread blocks for I/O under easy conditions Helper threads to be used otherwise
Conclusion Adaptability : Opens up a new door for ideas Provides flexible operation Better utilizes resources Provides a more logical scenario Can hopefully improve performance Limitations in available system calls can be relaxed