SEDA: An Architecture for Well-Conditioned, Scalable Internet Services

Slides:



Advertisements
Similar presentations
Multiple Processor Systems
Advertisements

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,
Capriccio: Scalable Threads for Internet Services Rob von Behren, Jeremy Condit, Feng Zhou, Geroge Necula and Eric Brewer University of California at Berkeley.
Introduction CSCI 444/544 Operating Systems Fall 2008.
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.
Chapter 7 Protocol Software On A Conventional Processor.
Concurrency, Thread and Event CS6410 Sept 6, 2011 Ji-Yong Shin.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
CS533 Concepts of Operating Systems Class 5 Event-Based Systems.
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.
490dp Synchronous vs. Asynchronous Invocation Robert Grimm.
CS533 Concepts of Operating Systems Class 5 Event-Based Systems.
Capriccio: Scalable Threads for Internet Services Rob von Behren, Jeremy Condit, Feng Zhou, Geroge Necula and Eric Brewer University of California at Berkeley.
Computer Science Scalability of Linux Event-Dispatch Mechanisms Abhishek Chandra University of Massachusetts Amherst David Mosberger Hewlett Packard Labs.
CS533 Concepts of Operating Systems Class 5 Event-Based Systems.
“Why Events are a Bad Idea (For high-concurrency servers)” Paper by Rob von Behren, Jeremy Condit and Eric Brewer, May 2003 Presentation by Loren Davis,
CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming.
Concurrency, Threads, and Events Robbert van Renesse.
CS533 Concepts of Operating Systems Class 2 The Duality of Threads and Events.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
SEDA – Staged Event-Driven Architecture
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services by, Matt Welsh, David Culler, and Eric Brewer Computer Science Division University.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
Pattern Oriented Software Architecture for Networked Objects Based on the book By Douglas Schmidt Michael Stal Hans Roehnert Frank Buschmann.
1 Multiprocessor and Real-Time Scheduling Chapter 10 Real-Time scheduling will be covered in SYSC3303.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Computer Systems Principles Concurrency Patterns Emery Berger and Mark Corner University.
Mid Term review CSC345.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
Computer Science 1 Adaptive Overload Control for Busy Internet Servers Matt Welsh and David Culler USITS 2003 Presented by: Bhuvan Urgaonkar.
Capriccio: Scalable Threads for Internet Services Rob von Behren, Jeremy Condit, Feng Zhou, Geroge Necula and Eric Brewer University of California at Berkeley.
Processes CSCI 4534 Chapter 4. Introduction Early computer systems allowed one program to be executed at a time –The program had complete control of the.
5204 – Operating Systems Threads vs. Events. 2 CS 5204 – Operating Systems Forms of task management serial preemptivecooperative (yield) (interrupt)
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
CSC Multiprocessor Programming, Spring, 2012 Chapter 11 – Performance and Scalability Dr. Dale E. Parson, week 12.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of.
By: Rob von Behren, Jeremy Condit and Eric Brewer 2003 Presenter: Farnoosh MoshirFatemi Jan
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.
CS533 Concepts of Operating Systems Jonathan Walpole.
Brian Bershad, Thomas Anderson, Edward Lazowska, and Henry Levy Presented by: Byron Marohn Published: 1991.
SEDA: An Architecture for Scalable, Well-Conditioned Internet Services
What is an Operating System? Various systems and their pros and cons –E.g. multi-tasking vs. Batch OS definitions –Resource allocator –Control program.
Code Development for High Performance Servers Topics Multithreaded Servers Event Driven Servers Example - Game Server code (Quake) A parallelization exercise.
1 Why Threads are a Bad Idea (for most purposes) based on a presentation by John Ousterhout Sun Microsystems Laboratories Threads!
for Event Driven Servers
Paper Review of Why Events Are A Bad Idea (for high-concurrency servers) Rob von Behren, Jeremy Condit and Eric Brewer By Anandhi Sundaram.
SEDA. How We Got Here On Tuesday we were talking about Multics and Unix. Fast forward years. How has the OS (e.g., Linux) changed? Some of Multics.
Multithreading vs. Event Driven in Code Development of High Performance Servers.
Introduction to Operating Systems Concepts
SEDA: An Architecture for Scalable, Well-Conditioned Internet Services
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
Chapter 3: Process Concept
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Sujata Ray Dey Maheshtala College Computer Science Department
Capriccio – A Thread Model
Mid Term review CSC345.
TDC 311 Process Scheduling.
Half-Sync/Half-Async (HSHA) and Leader/Followers (LF) Patterns
Sujata Ray Dey Maheshtala College Computer Science Department
CS533 Concepts of Operating Systems Class 7
Why Threads Are A Bad Idea (for most purposes)
Why Threads Are A Bad Idea (for most purposes)
Why Threads Are A Bad Idea (for most purposes)
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
CSC Multiprocessor Programming, Spring, 2011
Presentation transcript:

SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of California, Berkley Presented By Oindrila Mukherjee

Agenda What is SEDA ? Why SEDA ? Thread-based Concurrency Event-driven Concurrency SEDA Goals Stages Applications Dynamic Resource Controllers Implement SEDA concepts using existing OS primitives Asynchronous Socket I/O Asynchronous File I/O Conclusion

What is SEDA ? SEDA – Staged Event-Driven Architecture Enables high concurrency and load conditioning Simplifies construction of well conditioned services Combines threads and event-based programs

Why SEDA ? Internet services must be responsive, robust and always available Service request for dynamic content Fluctuation of load SEDA combines threads and event-based programming models

Thread-Based Concurrency Relatively easy to program Associated overheads Cache and TLB misses Scheduling overhead Lock Contention

Thread-Based Concurrency (contd.) Can be achieved in two ways Unbounded thread allocation Thread-per-task model Eat up memory Too many context switches Bounded thread pools Fixed limit on number of threads allocated Avoids throughput degradation Unfairness to clients Large waiting times For servicing internet services

Event-Driven Concurrency Smaller number of threads No Context Switches Little degradation in throughput Designing the scheduler – complex Difficult to achieve modularity 4. Events trigger state transitions in the FSM

Threads vs. Events

SEDA Application is a network of stages Stages connected by event queues Uses dynamic resource controllers

SEDA - Goals Support massive concurrency Simplify the construction of well-conditioned services Enable Introspection Support self-tuning resource management

SEDA - Stages Event Handler – provides logic of the stage Incoming Event Queue – queues events processed by the event handler for that stage Thread Pool – for dynamic allocation of threads Controller – manages the stage, affects scheduling and thread allocation

SEDA - Applications A network of stages Queue decouples execution amongst stages Independent load management Improves debugging and performance analysis

SEDA - Dynamic Resource Controllers Thread Pool Controller Avoids allocating too many threads Queue length > threshold, controller adds a thread Threads idle, controller removes thread

SEDA - Dynamic Resource Controllers (contd.) Batching Controller Adjusts number of events processed by each invocation of the event handler within a stage Observes output rate of events Decreases batching factor until throughput begins to degrade

Asynchronous I/O Primitives Asynchronous Socket I/O Provides a non-blocking sockets interface for services Outperforms the thread-based compatibility layer Asynchronous File I/O Implemented by using blocking I/O and a bounded thread pool One thread processes events for a particular file at a time

Conclusion Internet services experience huge variations in service load Slashdot Effect Resources must be utilized to make best use of them Dynamic allocation of resources enables this SEDA uses dynamic controllers for resource management and scheduling of each stage SEDA isolates threads within each stage and uses event-driven design to maximize throughput at high load