CS 623 Lecture #9 Yen-Yu Chen Utku Irmak
Papers to be read Better operating system features for faster network servers.Better operating system features for faster network servers. High-performance web site design techniques.High-performance web site design techniques. Flash: An efficient and portable Web server.Flash: An efficient and portable Web server. How the web works: HTTP and CGI explained.How the web works: HTTP and CGI explained.
Web Performance Issues: –Why is the web slow ? –Where does the time go ? –How to improve performance ? Many techniques: –Caching, Prefetching –Web site/server performance –Wide area replication –Protocols
Better OS features for faster network servers (Banga, Druschel, Mogul) Performance of servers often disappointing given fast hardware One reason: OS not designed for servers –Lot of time in kernel mode –High concurrency –Scalability Need better OS support
Server Execution Models Process per request Pre-forked processes Event-based –One process –Use of select() Thread-based –User level vs. Kernel level Note: Dynamic content requires other processes that generate content
Event Driven Control thread should never block Can use either SIGNALS or SELECT/POLL operations SIGNALS do not scale well SELECT also has problems with interface and implementation
Event Driven Non-blocking I/O problem not completely solved by AIO library –Need to rewrite code –Directory lookups, stat() –No select to detect completion
Multi-Threaded Kernel-level: High overhead User-level: If one thread blocks, all threads in process block “Scheduler Activations” help Current thread implementations do not scale Some techniques exist but are not part of current OS
Scheduling/Resource Management Kernel-level (network) processing not properly accounted for May be charged to process running Network has priority Does not work within process Problem for QoS
New Features Proposed Resource containers –Groups resources used by one connection –Has priority –Thread-based: container per thread (= connection) –Event-based: container per connection
Efficient support for events Application can tell kernel which descriptors they are interested in –Persists over multiple calls Event notification –Preserves priorities –Queuing of events
High-Performance Web Site Design Techniques (Iyengar, Challenger, Dias, Dantzig) RR-DNS TCP Routing Web server accelerator
RR-DNS Routing to multiple web servers Problems –Server side caching –Client side caching Node failures
TCP Routing Many commercial products Based on network processors Using different load-based algorithms or simple round-robin scheme Can be combined with RR-DNS
Web Server Accelerators Caches pages Based on embedded OS Could be based on network processor Caching dynamic pages –DUP algorithm (Data Update Propagation) –ODG (Object dependence graph)