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

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

Introduction CSCI 444/544 Operating Systems Fall 2008.
Study of Hurricane and Tornado Operating Systems By Shubhanan Bakre.
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.
Concurrency, Thread and Event CS6410 Sept 6, 2011 Ji-Yong Shin.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of.
490dp Synchronous vs. Asynchronous Invocation Robert Grimm.
Capriccio: Scalable Threads for Internet Services Rob von Behren, Jeremy Condit, Feng Zhou, Geroge Necula and Eric Brewer University of California at Berkeley.
Server Architecture Models Operating Systems Hebrew University Spring 2004.
“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.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
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
9/14/2015B.Ramamurthy1 Operating Systems : Overview Bina Ramamurthy CSE421/521.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
Budget-based Control for Interactive Services with Partial Execution 1 Yuxiong He, Zihao Ye, Qiang Fu, Sameh Elnikety Microsoft Research.
Computer Science 1 Adaptive Overload Control for Busy Internet Servers Matt Welsh and David Culler USITS 2003 Presented by: Bhuvan Urgaonkar.
Empirical Quantification of Opportunities for Content Adaptation in Web Servers Michael Gopshtein and Dror Feitelson School of Engineering and Computer.
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. Readings r Silberschatz et al : Chapter 4.
SEDA: An Architecture for Scalable, Well-Conditioned Internet Services
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.
Taeho Kgil, Trevor Mudge Advanced Computer Architecture Laboratory The University of Michigan Ann Arbor, USA CASES’06.
Optimizing Distributed Actor Systems for Dynamic Interactive Services
OPERATING SYSTEMS CS 3502 Fall 2017
REAL-TIME OPERATING SYSTEMS
Chapter 4: Threads.
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
Operating Systems : Overview
Processes and Threads Processes and their scheduling
OPERATING SYSTEMS CS3502 Fall 2017
Task Scheduling for Multicore CPUs and NUMA Systems
Threads, Events, and Scheduling
Storage Virtualization
Operating Systems : Overview
Operating Systems Bina Ramamurthy CSE421 11/27/2018 B.Ramamurthy.
Operating Systems : Overview
TDC 311 Process Scheduling.
Operating Systems : Overview
Operating Systems : Overview
Threads, Events, and Scheduling
Operating Systems : Overview
Operating Systems : Overview
CS533 Concepts of Operating Systems Class 7
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Threads, Events, and Scheduling
Operating Systems : Overview
Why Threads Are A Bad Idea (for most purposes)
Operating Systems : Overview
Uniprocessor scheduling
Why Events Are a Bad Idea (for high concurrency servers)
Database System Architectures
Chapter 2 Operating System Overview
Why Threads Are A Bad Idea (for most purposes)
Performance-Robust Parallel I/O
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 Scalable, Well-Conditioned Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of California, Berkeley Presented By: Linh Nguyen

Agenda Motivations and background SEDA Evaluations Concurrencies Goals Stages Queues Dynamic Resource Schedulers Evaluations Efficient methods to solve problems using factored representation Goal: each variable has a value that satisfies all constraints on variable

Motivations High-volume Internet Services The Slashdot effect Yahoo: 1.2 billions page views per day AOL: 10 billions hits per day Now: Google at 3.5 billion searches per day and increasing The Slashdot effect Peak loads can be 100-fold larger than normal In 2009, Google mistook the surge in Michael Jackson-related searches for an attack Increasingly dynamic Dynamic content: Google Maps, Social Networks Service logic changes frequently: Providers want to add functionalities, improvements, etc Services are hosted on general purpose facilities

Thread-based concurrency EECS 492 Fall 2004 28 Sep 04 Thread-based concurrency Each request consumes a thread to process it Synchronization to protect shared resources OS switches between threads Can be achieved in two ways: Thread-per-task model Bounded thread pools M. Wellman

Characteristics of thread-based concurrency Easy to program, since all resources are virtualized. However, applications are not able to manage resources Associated overheads: Cache misses Scheduling overhead Lock contention When number of threads is large, throughput is degraded Bounded thread pools lead to: Unfairness to clients Large waiting times

Event-based concurrency EECS 492 Fall 2004 28 Sep 04 Event-based concurrency Main thread processes incoming events and drives the executions of FSMs Each FSM represents a single request or flow of execution Scheduler controls the execution of each FSM M. Wellman

Characteristics of event-driven concurrency Little degradation in throughput Assume non-blocking I/O, which may not be supported Event scheduling is tied to application logic (when to process incoming event, in what order to process the FSMs) -> harder to modularize

Solutions? Support massive concurrency Simplify building well-conditioned services Enable introspection Support self-tuning resource management Staged event-driven architecture (SEDA)

SEDA Draws from both thread-based (ease of programming) and event-based (extensive concurrency) models Each service is a network of stages Stages connected by event queues

Stage Small number of threads per stage Dynamic controllers automatically tune the number of threads allocated based on demand Event handler provides core logic, processes a batch of multiple events, and implements resource-management policies

Queue (thanks Norman Hutchinson of UBC) Queues are finite An enqueue behavior may fail Block on full queue -> backpressure Drop rejected events -> load shedding Queue introduces explicit execution boundary Threads may only execute within a single stage Performance isolation, modularity, independent load management Explicit event delivery support inspection Trace flow of events through application Monitor queue lengths to detect bottleneck

Dynamic Resource Controllers Batching controller Adjusts batching factor to stabilize throughput Large factor: higher throughput Small factor: Lower response time Thread pool controller - Determines the degree of concurrency Add thread if queue length > threshold Remove idle threads

Evaluations “closed-loop” server: Haboob, comparisons with Apache and Flash “open-loop” server: Gnutella

Haboob performance analysis Jain Fairness Measurement 𝑓(𝑥): fairness in term of clients and their associated requests 𝑁 : number of clients 𝑋 𝑖 : number of requests for each of N clients 𝑓(𝑥) = 1: server is equally fair to all clients

Haboob performance analysis (cont.)

Observations Haboob achieves higher throughput than Apache and Flash as the number of clients reach 64 Apache and Flash exhibit high frequencies of low response times Long tail in Apache and Flash Haboob (SEDA) yields predictable performance, while Apache is very unfair

Gnutella Non-traditional Internet services An user searches for and downloads files from other users Five types of messages: ping, pong, query, queryhits, push.

Gnutella Performance Higher packet latencies for 100 and 200 packets/sec since no threads were added For 400 and 1000 packets/sec two threads were added

Summaries Achieved its goals: Support massive concurrency: Combines event-driven and thread-based Enable introspection to handle peak load: Event queue allows for inspection of request streams Dynamic resource management: Feedback-control with resource controllers Simplify task of building well-conditioned services: Abstract scheduling and resource management from programmers; easier modularization.

Discussions Decisions on how to break down an application into stages Scalability? A retrospective on SEDA Ousterhoust’s why threads are a bad idea? Brewer’s why events are a bad idea?