logging in or signing up Adobe Flash ankush85 Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 105 Category: Education License: All Rights Reserved Like it (1) Dislike it (0) Added: June 13, 2009 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript The Flash Web Server : The Flash Web Server Advanced Topics in Concurrent Programming Computer Science Seminar Server architecture 1 The Flash Web Server Outline : Outline HTTP Web server Request Processing steps Server architectures MP, MT, SPED, AMPED Flash implementation Optimizations, caches Performance evaluation Single file test, Trace-based experiments Optimization contributions WAN conditions 2 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: 3 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: Accept client connection – accept an incoming connection from a client by performing an accept operation on the server’s listen socket. 4 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: Read request – read the HTTP request header from the client connection’s socket and parse the header for the requested URL and options. 5 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: Find file – check the server filesystem to see if the requested content file exists and the client has appropriate permissions. 6 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: Send response header – transmit the HTTP response header on the client connection’s socket. 7 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: ` Read file – read the file data (or part of it) from the filesystem. Send data – transmit the requested content (or part of it) on the client connection socket. (*) For larger files steps are repeated until all of the content is transmited. 8 The Flash Web Server HTTP Web server : HTTP Web server Blocking steps All of these steps involve operations that can potentially block Operations that read data or accept connections Block if the expected data has not arrived from the client Operations that write to a socket Block if the TCP send buffers are full (network capacity) Operations that test a file’s validity Block until any necessary disk accesses 9 The Flash Web Server HTTP Web server : HTTP Web server Blocking steps Disk I/O blocking Find File Read File 10 The Flash Web Server HTTP Web server : HTTP Web server Blocking steps Network blocking Accept client connection Read Request Send response Header Send Data 11 The Flash Web Server Server architectures : Server architectures Multi-Process (MP) Multi-Threaded (MT) Single-Process Event-Driven (SPED) Asymetric Multi-Process Event-Driven (AMPED) 12 The Flash Web Server Multi-Process : Multi-Process Each server process handles one request at a time. Processes execute the processing stages sequentially. 13 The Flash Web Server Multi-Process : Multi-Process Advantages : no synchronization is necessary to handle the processing of different HTTP request Simple programming – rely on OS. Disadvantages: Difficult to perform optimizations that rely on global information, such as shared cache of valid URLs. Consumes much memory 14 The Flash Web Server Multi-Threaded : Multi-Threaded Single address space with multiple concurrent threads Each thread handles a request. 15 The Flash Web Server Multi-Threaded : Multi-Threaded Advantages : Shared address space lends itself easily to optimizations, such as shared cache Lower context switch overhead Disadvantages: Must use some form of synchronization to control access to the shared data Requires that the OS provides support for kernel threads. 16 The Flash Web Server Single-Process Event-Driven : Single-Process Event-Driven Single process to perform all client processing and disk activity in an event-driven manner 17 The Flash Web Server Single-Process Event-Driven : Single-Process Event-Driven Advantages : Single address space no synchronization is necessary No context switching Disadvantages: In practice, disk reads still block. Many current OS do not provide suitable support for asynchronous disk operations (non-blocking I/O) 18 The Flash Web Server Asymetric Multi-Process Event-Driven : Asymetric Multi-Process Event-Driven Single process for event-driven request processing Helper processes to handle some disk operations 19 The Flash Web Server Asymetric Multi-Process Event-Driven : Asymetric Multi-Process Event-Driven Advantages : Shared address space for most web server functions Concurrency for disk I/O Disadvantages: Extra cost compared to SPED for IPC between the main process and the helpers More memory requirements than SPED 20 The Flash Web Server Performance characteristics : Performance characteristics 21 The Flash Web Server Flash implementation : Flash implementation AMPED architecture Standard APIs available in modern OS The server process is responsible for Interaction with clients and CGI applications Control of the helper processes The helper processes are responsible for Performing pathname translations Bringing disk blocks into memory. 22 The Flash Web Server Helper processes : Helper processes Separate processes instead of kernel threads, in order to ensure portability to OS that do not support kernel threads, such as FreeBSD 2.2.6 Spawned dynamically as needed, kept in reserve when not active Each process handles one request at a time. Return only a completion notification, in order to minimize interprocess communication 23 The Flash Web Server Optimizations and Caches : Optimizations and Caches Memory-mapped files Byte Position Alignment (writev) High-performance Web servers use writev() to send response headers followed by file data. Memory Residency Testing Caches Pathname Translation Cache Response Header Cache Mapped File Cache 24 The Flash Web Server Caches : Caches 25 The Flash Web Server Caches : Caches Pathname Translation Cache Maintains a list of mappings between requested filenames (e.g., “/~bob”) and actual files on disk (e.g., /home/users/bob/public_html/index.html) 26 The Flash Web Server Caches : Caches Response Header Cache Maintains a list of response headers containing information about the file and the server 27 The Flash Web Server Caches : Caches Mapped File Cache Maintains a list of memory mapping of frequently used files 28 The Flash Web Server Performance Evaluation : Performance Evaluation Apache 1.3.1 (MP) Zeus 1.30 (SPED) Flash (AMPED) Flash-MT Flash-MP Flash-SPED 29 The Flash Web Server Solaris single file test : Solaris single file test Server architecture seems to have little impact on performance 30 The Flash Web Server The single-file test can indicate a server’s maximum performance on a cached workload Solaris single file test : Solaris single file test Server architecture seems to have little impact on performance 31 The Flash Web Server Server architecture seems to have little impact on performance The aggressive optimizations in Flash and Zeus cause them to outperform Apache Trace-based experiments : Trace-based experiments Server architecture seems to have little impact on performance 32 The Flash Web Server The “CS trace” was obtained from the logs of Rice University’s CS departmental Web server The “Owlnet trace” was obtained from a Rice Web server that provides personal Web pages for approximately 4500 students and staff members Optimization contributions : Optimization contributions Server architecture seems to have little impact on performance 33 The Flash Web Server Each of the optimizations has a significant impact on server throughput Without optimizations, Flash’s small-file performance would drop in half WAN conditions : WAN conditions Server architecture seems to have little impact on performance 34 The Flash Web Server Persistent connections were used to simulate the effect of long-lasting WAN connections WAN conditions : WAN conditions Server architecture seems to have little impact on performance 35 The Flash Web Server SPED, AMPED, MT – initial rise due to the added concurrency and aggregation effects MT – decline after connections number exceeds 200 is related to per-thread space overhead MP – significant decline due to per-process overhead Summary : Summary AMPED – new portable high-performance Web Server architecture Flash – implementation of this architecture Flash nearly matches the performance of SPED servers on cached workloads while simultaneously matching or exceeding the performance of MP and MT servers on disk-intensive workloads Flash uses only standard APIs available in modern OS and is therefore easily portable Good performance on real workloads Up to 30% faster than Zeus Up to 50% faster than Apache 36 The Flash Web Server References : References General Flash: An Efficient and Portable Web Server By Vivek S. Pai, Peter Druschel, Willy Zwaenepoel, 1999 Event-driven Multiprocessor Support for Event-Driven Programs By Nickolai Zeldovich, Alexander Yip, Frank Dabek, Robert T. Morris, David Mazières, Frans Kaashoek, 2003 Wikipedia Memory-mapped file CSU Chico Wikipedia 37 The Flash Web Server Slide 38: THE END 38 The Flash Web Server You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
Adobe Flash ankush85 Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 105 Category: Education License: All Rights Reserved Like it (1) Dislike it (0) Added: June 13, 2009 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript The Flash Web Server : The Flash Web Server Advanced Topics in Concurrent Programming Computer Science Seminar Server architecture 1 The Flash Web Server Outline : Outline HTTP Web server Request Processing steps Server architectures MP, MT, SPED, AMPED Flash implementation Optimizations, caches Performance evaluation Single file test, Trace-based experiments Optimization contributions WAN conditions 2 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: 3 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: Accept client connection – accept an incoming connection from a client by performing an accept operation on the server’s listen socket. 4 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: Read request – read the HTTP request header from the client connection’s socket and parse the header for the requested URL and options. 5 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: Find file – check the server filesystem to see if the requested content file exists and the client has appropriate permissions. 6 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: Send response header – transmit the HTTP response header on the client connection’s socket. 7 The Flash Web Server HTTP Web server : HTTP Web server Basic processing steps performed by an HTTP Web server: ` Read file – read the file data (or part of it) from the filesystem. Send data – transmit the requested content (or part of it) on the client connection socket. (*) For larger files steps are repeated until all of the content is transmited. 8 The Flash Web Server HTTP Web server : HTTP Web server Blocking steps All of these steps involve operations that can potentially block Operations that read data or accept connections Block if the expected data has not arrived from the client Operations that write to a socket Block if the TCP send buffers are full (network capacity) Operations that test a file’s validity Block until any necessary disk accesses 9 The Flash Web Server HTTP Web server : HTTP Web server Blocking steps Disk I/O blocking Find File Read File 10 The Flash Web Server HTTP Web server : HTTP Web server Blocking steps Network blocking Accept client connection Read Request Send response Header Send Data 11 The Flash Web Server Server architectures : Server architectures Multi-Process (MP) Multi-Threaded (MT) Single-Process Event-Driven (SPED) Asymetric Multi-Process Event-Driven (AMPED) 12 The Flash Web Server Multi-Process : Multi-Process Each server process handles one request at a time. Processes execute the processing stages sequentially. 13 The Flash Web Server Multi-Process : Multi-Process Advantages : no synchronization is necessary to handle the processing of different HTTP request Simple programming – rely on OS. Disadvantages: Difficult to perform optimizations that rely on global information, such as shared cache of valid URLs. Consumes much memory 14 The Flash Web Server Multi-Threaded : Multi-Threaded Single address space with multiple concurrent threads Each thread handles a request. 15 The Flash Web Server Multi-Threaded : Multi-Threaded Advantages : Shared address space lends itself easily to optimizations, such as shared cache Lower context switch overhead Disadvantages: Must use some form of synchronization to control access to the shared data Requires that the OS provides support for kernel threads. 16 The Flash Web Server Single-Process Event-Driven : Single-Process Event-Driven Single process to perform all client processing and disk activity in an event-driven manner 17 The Flash Web Server Single-Process Event-Driven : Single-Process Event-Driven Advantages : Single address space no synchronization is necessary No context switching Disadvantages: In practice, disk reads still block. Many current OS do not provide suitable support for asynchronous disk operations (non-blocking I/O) 18 The Flash Web Server Asymetric Multi-Process Event-Driven : Asymetric Multi-Process Event-Driven Single process for event-driven request processing Helper processes to handle some disk operations 19 The Flash Web Server Asymetric Multi-Process Event-Driven : Asymetric Multi-Process Event-Driven Advantages : Shared address space for most web server functions Concurrency for disk I/O Disadvantages: Extra cost compared to SPED for IPC between the main process and the helpers More memory requirements than SPED 20 The Flash Web Server Performance characteristics : Performance characteristics 21 The Flash Web Server Flash implementation : Flash implementation AMPED architecture Standard APIs available in modern OS The server process is responsible for Interaction with clients and CGI applications Control of the helper processes The helper processes are responsible for Performing pathname translations Bringing disk blocks into memory. 22 The Flash Web Server Helper processes : Helper processes Separate processes instead of kernel threads, in order to ensure portability to OS that do not support kernel threads, such as FreeBSD 2.2.6 Spawned dynamically as needed, kept in reserve when not active Each process handles one request at a time. Return only a completion notification, in order to minimize interprocess communication 23 The Flash Web Server Optimizations and Caches : Optimizations and Caches Memory-mapped files Byte Position Alignment (writev) High-performance Web servers use writev() to send response headers followed by file data. Memory Residency Testing Caches Pathname Translation Cache Response Header Cache Mapped File Cache 24 The Flash Web Server Caches : Caches 25 The Flash Web Server Caches : Caches Pathname Translation Cache Maintains a list of mappings between requested filenames (e.g., “/~bob”) and actual files on disk (e.g., /home/users/bob/public_html/index.html) 26 The Flash Web Server Caches : Caches Response Header Cache Maintains a list of response headers containing information about the file and the server 27 The Flash Web Server Caches : Caches Mapped File Cache Maintains a list of memory mapping of frequently used files 28 The Flash Web Server Performance Evaluation : Performance Evaluation Apache 1.3.1 (MP) Zeus 1.30 (SPED) Flash (AMPED) Flash-MT Flash-MP Flash-SPED 29 The Flash Web Server Solaris single file test : Solaris single file test Server architecture seems to have little impact on performance 30 The Flash Web Server The single-file test can indicate a server’s maximum performance on a cached workload Solaris single file test : Solaris single file test Server architecture seems to have little impact on performance 31 The Flash Web Server Server architecture seems to have little impact on performance The aggressive optimizations in Flash and Zeus cause them to outperform Apache Trace-based experiments : Trace-based experiments Server architecture seems to have little impact on performance 32 The Flash Web Server The “CS trace” was obtained from the logs of Rice University’s CS departmental Web server The “Owlnet trace” was obtained from a Rice Web server that provides personal Web pages for approximately 4500 students and staff members Optimization contributions : Optimization contributions Server architecture seems to have little impact on performance 33 The Flash Web Server Each of the optimizations has a significant impact on server throughput Without optimizations, Flash’s small-file performance would drop in half WAN conditions : WAN conditions Server architecture seems to have little impact on performance 34 The Flash Web Server Persistent connections were used to simulate the effect of long-lasting WAN connections WAN conditions : WAN conditions Server architecture seems to have little impact on performance 35 The Flash Web Server SPED, AMPED, MT – initial rise due to the added concurrency and aggregation effects MT – decline after connections number exceeds 200 is related to per-thread space overhead MP – significant decline due to per-process overhead Summary : Summary AMPED – new portable high-performance Web Server architecture Flash – implementation of this architecture Flash nearly matches the performance of SPED servers on cached workloads while simultaneously matching or exceeding the performance of MP and MT servers on disk-intensive workloads Flash uses only standard APIs available in modern OS and is therefore easily portable Good performance on real workloads Up to 30% faster than Zeus Up to 50% faster than Apache 36 The Flash Web Server References : References General Flash: An Efficient and Portable Web Server By Vivek S. Pai, Peter Druschel, Willy Zwaenepoel, 1999 Event-driven Multiprocessor Support for Event-Driven Programs By Nickolai Zeldovich, Alexander Yip, Frank Dabek, Robert T. Morris, David Mazières, Frans Kaashoek, 2003 Wikipedia Memory-mapped file CSU Chico Wikipedia 37 The Flash Web Server Slide 38: THE END 38 The Flash Web Server