Computer Science Scalability of Linux Event-Dispatch Mechanisms Abhishek Chandra University of Massachusetts Amherst David Mosberger Hewlett Packard Labs.

Slides:



Advertisements
Similar presentations
CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Resource Containers: A new Facility for Resource Management in Server Systems G. Banga, P. Druschel,
Advertisements

Web Server Benchmarking Using the Internet Protocol Traffic and Network Emulator Carey Williamson, Rob Simmonds, Martin Arlitt et al. University of Calgary.
Institute of Computer Science Foundation for Research and Technology – Hellas Greece Computer Architecture and VLSI Systems Laboratory Exploiting Spatial.
Flash: An efficient and portable Web server Authors: Vivek S. Pai, Peter Druschel, Willy Zwaenepoel Presented at the Usenix Technical Conference, June.
1 SEDA: An Architecture for Well- Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University.
CS533 Concepts of Operating Systems Jonathan Walpole.
SEDA: An Architecture for Well- Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University.
1 Web Server Performance in a WAN Environment Vincent W. Freeh Computer Science North Carolina State Vsevolod V. Panteleenko Computer Science & Engineering.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Chapter 5 Processes and Threads Copyright © 2008.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of.
Capriccio: Scalable Threads for Internet Services ( by Behren, Condit, Zhou, Necula, Brewer ) Presented by Alex Sherman and Sarita Bafna.
Computer Science Deadline Fair Scheduling: Bridging the Theory and Practice of Proportionate-Fair Scheduling in Multiprocessor Servers Abhishek Chandra.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 5: Threads Overview Multithreading Models Threading Issues Pthreads Solaris.
Precept 3 COS 461. Concurrency is Useful Multi Processor/Core Multiple Inputs Don’t wait on slow devices.
Supporting Time-sensitive Application on a Commodity OS Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presented by Wen Sun Some Slides.
Supporting Time-Sensitive Applications on a Commodity OS by Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Jimi Watson.
3.5 Interprocess Communication
Supporting Time-sensitive Application on a Commodity OS By Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presenter: Shuping Tien.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Ch 4: Threads Dr. Mohamed Hefeeda.
ACM SIGPLAN Workshop on Optimization of Middleware and Distributed Systems (OM 2001) June 18, 2001 Designing and Optimizing a Scalable CORBA Notification.
CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming.
Dynamic Process Allocation in Apache Server Yu Cai.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Understanding Factors That Influence Performance of a Web Server Presentation CS535 Project By Thiru.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
Advanced Network Architecture Research Group 2001/11/149 th International Conference on Network Protocols Scalable Socket Buffer Tuning for High-Performance.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
Flash An efficient and portable Web server. Today’s paper, FLASH Quite old (1999) Reading old papers gives us lessons We can see which solution among.
Silberschatz, Galvin and Gagne ©2011Operating System Concepts Essentials – 8 th Edition Chapter 4: Threads.
Operating System Concepts Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Orbited Scaling Bi-directional web applications A presentation by Michael Carter
1 Multiprocessor and Real-Time Scheduling Chapter 10 Real-Time scheduling will be covered in SYSC3303.
Rapid Development of High Performance Servers Khaled ElMeleegy Alan Cox Willy Zwaenepoel.
Socket Models Different ways to manage your connections.
Scalable Kernel Performance for Internet Servers under Realistic Loads. Gaurav Banga, etc... Western Research Lab : Research Report 1998/06 (Proceedings.
Advanced Network Architecture Research Group 2001/11/74 th Asia-Pacific Symposium on Information and Telecommunication Technologies Design and Implementation.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
Providing Differentiated Levels of Service in Web Content Hosting Jussara Almeida, etc... First Workshop on Internet Server Performance, 1998 Computer.
Intel Research & Development ETA: Experience with an IA processor as a Packet Processing Engine HP Labs Computer Systems Colloquium August 2003 Greg Regnier.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 4: Threads Modified from the slides of the text book. TY, Sept 2010.
LAIO: Lazy Asynchronous I/O For Event Driven Servers Khaled Elmeleegy Alan L. Cox.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of.
SEDA An architecture for Well-Conditioned, scalable Internet Services Matt Welsh, David Culler, and Eric Brewer University of California, Berkeley Symposium.
Threads versus Events CSE451 Andrew Whitaker. This Class Threads vs. events is an ongoing debate  So, neat-and-tidy answers aren’t necessarily available.
1 Why Events Are A Bad Idea (for high-concurrency servers) By Rob von Behren, Jeremy Condit and Eric Brewer (May 2003) CS533 – Spring 2006 – DONG, QIN.
E81 CSE 532S: Advanced Multi-Paradigm Software Development Venkita Subramonian, Christopher Gill, Ying Huang, Marc Sentany Department of Computer Science.
An Efficient Threading Model to Boost Server Performance Anupam Chanda.
CS533 Concepts of Operating Systems Jonathan Walpole.
Providing Differentiated Levels of Service in Web Content Hosting J ussara Almeida, Mihaela Dabu, Anand Manikutty and Pei Cao First Workshop on Internet.
Operating System Concepts
Lecture 4 Page 1 CS 111 Summer 2013 Scheduling CS 111 Operating Systems Peter Reiher.
Multithreading vs. Event Driven in Code Development of High Performance Servers.
Chapter 4 – Thread Concepts
Mohit Aron Peter Druschel Presenter: Christopher Head
Chapter 4: Threads.
SEDA: An Architecture for Scalable, Well-Conditioned Internet Services
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
CS 3214 Computer Systems Godmar Back.
Chapter 4 – Thread Concepts
Chapter 4: Multithreaded Programming
Chapter 4: Threads.
Modified by H. Schulzrinne 02/15/10 Chapter 4: Threads.
Cluster Load Balancing for Fine-grain Network Services
Supporting Time-Sensitive Applications on a Commodity OS
CS703 - Advanced Operating Systems
Chapter 4: Threads.
Congestion Control in SDN-Enabled Networks
Presentation transcript:

Computer Science Scalability of Linux Event-Dispatch Mechanisms Abhishek Chandra University of Massachusetts Amherst David Mosberger Hewlett Packard Labs Palo Alto

Computer Science Motivation  Large Web and Internet traffic  Heavily Loaded/Accessed Web Servers cnn.com, britneyspearsfans.com, … Starr Report, Napster ruling,...  Challenge: Make Web Servers Scalable Clients WAN Web Server

Computer Science Server Scalability Issues  Large number of concurrent/idle connections  Last-mile problem: Slow end-connections  High latency WAN traffic  HTTP/1.1 Persistent Connections  Heavy Request Loads  Need for high throughput  Pure Thread-based vs. Event-based servers  Focus: Scalability of Event-based servers on Linux

Computer Science Outline Motivation  Event-based Servers  Linux Event-Dispatch Mechanisms  Evaluation: Handling concurrent connections  RT signals and Signal-per-fd enhancement  Evaluation: Handling request load  Concluding Remarks

Computer Science 1. Interest Set Specification Interest Set Event-Based Servers  Server specifies Interest Set to Kernel  Kernel notifies Server of Event on a connection  Server handles I/O on the connection Kernel Server Connections 2. Network Event 3. Event Notification 4. I/O Handling

Computer Science Linux Event-Dispatch Mechanisms  select() system call  poll() system call  /dev/poll interface  POSIX.4 Real-Time Signals

Computer Science Interest Set select() system call Kernel Server Connections Ready Set Scan  Interest Set specified on each call  Notification requires scan of interest set

Computer Science poll() and /dev/poll  Interest Set:  List of pollfd structures Better for sparse interest sets, worse for dense sets  Notification  Requires scan of Interest Set r /dev/poll:  Interest Set specified incrementally  More compact ready set

Computer Science POSIX.4 Real Time Signals  RT signals are queued  Multiple signals of same type can be delivered  RT signals carry a data payload (siginfo)  Provides the context of the signal  sigwaitinfo() system call:  Dequeues signals  Avoids overhead of calling signal handler  Signal can be blocked

Computer Science 1. Associate RT Signal Interest Set Using Real Time Signals for Network I/O  Interest Set specified incrementally  No scanning of Interest Set required Kernel Server Sockets 2. Network Event 4.sigwaitinfo() 3. EnQueue Signal 5. DeQueue Signal Queue

Computer Science Outline Motivation Event-based Servers Linux Event-Dispatch Mechanisms  Evaluation: Handling concurrent connections  RT signals and Signal-per-fd enhancement  Evaluation: Handling request load  Concluding Remarks

Computer Science Evaluation: Handling Concurrent Connections  Dispatch overhead and latency as a function of number of concurrent connections  Experimental Setup  400 MHz P3 Linux test7 server  μ -server using select(), /dev/poll or RT signals  10 clients running httperf  Fixed request rate, increasing number of connections

Computer Science Server CPU Usage  RT signal overhead independent of no. of concurrent connections 500 req/s

Computer Science Response Time  RT signal response time independent of no. of concurrent connections 500 req/s

Computer Science Limitations of Real Time Signals  Signal Queue Overflow: New events lost Can lead to “hung server”  Unfair Allocation of Signal Queue Kernel Server Interest Set Sockets Network Event 32 Signal Queue Network Event Drop Network Event 3

Computer Science Handling Signal Queue Overflow  Fallback mechanism  select(), poll(), etc.  Reconstruct current state  Issues  Server complexity  Overhead of maintaining explicit interest sets  Potential performance penalty

Computer Science RT Signal Enhancement: Signal-per-fd  Goals:  Avoid signal queue overflows  Fair Allocation of signal queue  Solution: Enqueue only one signal per socket Kernel Server Interest Set Sockets Network Event 2 Signal Queue Network Event Discard Network Event 1

Computer Science Signal-per-fd  Idea:  Signal queue length same as fdset size  Bitmap used to efficiently determine presence/absence of signal in queue  Advantages:  Simpler Server Implementation No signal queue overflows No need for fallback mechanisms  Fair Allocation of Signal Queue Resource  Avoids too fine-grained event notification Coalesce multiple events for a socket

Computer Science Outline Motivation Event-based Servers Linux Event-Dispatch Mechanisms Evaluation: Handling concurrent connections RT signals and Signal-per-fd enhancement  Evaluation: Handling request load  Concluding Remarks

Computer Science Server Throughput  Linear scaling of RT signals, signal-per-fd 6000 idle connections

Computer Science Server CPU Usage  Linear Scaling of RT signals, signal-per-fd 6000 idle connections

Computer Science Related Work  Event-Delivery API [BMD99]  Performance studies:  select() [BM98], /dev/poll [PL00]  RT signals [PLT00]  Web Servers:  Event-based: Flash [PDZ99], phhttpd [Brown99]  In-kernel: TUX, khttpd, AFPA [JKNRT01]  Future: Linux 2.5 Asynchronous I/O?

Computer Science Summary  Scalability issues with Linux Event-dispatch mechanisms  Real Time Signals are scalable Performance independent of number of concurrent connections Signal Queue Overflow Problems  Signal-per-fd enhancement potentially improves performance reduces server complexity provides fairness  Patch available at