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

Slides:



Advertisements
Similar presentations
Scheduling in Web Server Clusters CS 260 LECTURE 3 From: IBM Technical Report.
Advertisements

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 Routing and Scheduling in Web Server Clusters. 2 Reference The State of the Art in Locally Distributed Web-server Systems Valeria Cardellini, Emiliano.
Concurrency, Thread and Event CS6410 Sept 6, 2011 Ji-Yong Shin.
Why Events Are A Bad Idea (for high-concurrency servers) By Rob von Behren, Jeremy Condit and Eric Brewer.
Web Caching Schemes1 A Survey of Web Caching Schemes for the Internet Jia Wang.
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.
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.
1 Router Construction II Outline Network Processors Adding Extensions Scheduling Cycles.
Towards I-Space Ninja Mini-Retreat June 11, 1997 David Culler, Steve Gribble, Mark Stemm, Matt Welsh Computer Science Division U.C. Berkeley.
Capriccio: Scalable Threads For Internet Services Authors: Rob von Behren, Jeremy Condit, Feng Zhou, George C. Necula, Eric Brewer Presentation by: Will.
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.
Server Architecture Models Operating Systems Hebrew University Spring 2004.
CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming.
Concurrency, Threads, and Events Robbert van Renesse.
Router Construction II Outline Network Processors Adding Extensions Scheduling Cycles.
Why Events Are A Bad Idea (for high-concurrency servers) Rob von Behren, Jeremy Condit and Eric Brewer University of California at Berkeley
G Robert Grimm New York University (with some slides by Steve Gribble) Distributed Data Structures for Internet Services.
Xen and the Art of Virtualization. Introduction  Challenges to build virtual machines Performance isolation  Scheduling priority  Memory demand  Network.
Computer Science Cataclysm: Policing Extreme Overloads in Internet Applications Bhuvan Urgaonkar and Prashant Shenoy University of Massachusetts.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
SEDA – Staged Event-Driven Architecture
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services by, Matt Welsh, David Culler, and Eric Brewer Computer Science Division University.
LiNK: An Operating System Architecture for Network Processors Steve Muir, Jonathan Smith Princeton University, University of Pennsylvania
Adaptive Overload Control for Busy Internet Servers Matt Welsh and David Culler USENIX Symposium on Internet Technologies and Systems (USITS) 2003 Alex.
CHEN Ge CSIS, HKU March 9, Jigsaw W3C’s Java Web Server.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Presented by Changdae Kim and Jaeung Han OFFENCE.
Computing Infrastructure for Large Ecommerce Systems -- based on material written by Jacob Lindeman.
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.
Providing Differentiated Levels of Service in Web Content Hosting Jussara Almeida, etc... First Workshop on Internet Server Performance, 1998 Computer.
1 Admission Control and Request Scheduling in E-Commerce Web Sites Sameh Elnikety, EPFL Erich Nahum, IBM Watson John Tracey, IBM Watson Willy Zwaenepoel,
Intel Research & Development ETA: Experience with an IA processor as a Packet Processing Engine HP Labs Computer Systems Colloquium August 2003 Greg Regnier.
1 Combining Events and Threads for Scalable Network Services Peng Li and Steve Zdancewic University of Pennsylvania PLDI 2007, San Diego.
5204 – Operating Systems Threads vs. Events. 2 CS 5204 – Operating Systems Forms of task management serial preemptivecooperative (yield) (interrupt)
Measuring the Capacity of a Web Server USENIX Sympo. on Internet Tech. and Sys. ‘ Koo-Min Ahn.
CSC Multiprocessor Programming, Spring, 2012 Chapter 11 – Performance and Scalability Dr. Dale E. Parson, week 12.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
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 Service
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.
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.
Threads. Readings r Silberschatz et al : Chapter 4.
An Efficient Threading Model to Boost Server Performance Anupam Chanda.
CS533 Concepts of Operating Systems Jonathan Walpole.
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.
Providing Differentiated Levels of Service in Web Content Hosting J ussara Almeida, Mihaela Dabu, Anand Manikutty and Pei Cao First Workshop on Internet.
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.
Capriccio:Scalable Threads for Internet Services
SEDA: An Architecture for Scalable, Well-Conditioned Internet Services
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
Why Events Are A Bad Idea (for high-concurrency servers)
ColdFusion Performance Troubleshooting and Tuning
DotSlash: An Automated Web Hotspot Rescue System
Admission Control and Request Scheduling in E-Commerce Web Sites
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Why Events Are a Bad Idea (for high concurrency servers)
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, Berkeley

Scalable, Fair Services Internet servers handle extremely high loads Yahoo! receives 1.2 billion requests daily AOL web cache services 10 billion hits daily Desire efficiency, consistency, and fairness Scalability through replication Load may be extremely variable “Slashdot effect” == 100-fold increase Replication not enough

Goal General framework for highly concurrent and well-conditioned services, that handles wide variations of load gracefully factors out details of concurrency and resource management Framework should be useful in many contexts Servers, routers, etc.

SEDA Staged, Event-Driven Architecture Building block is the Stage Handler processes queued, incoming events Outputs placed on next stages’ queues Multiple threads may service a stage Dynamic Resource Controllers Observe operating conditions Respond by altering resource usage Useful for responding to high load

Background Well-conditioned service: Two common models: Behaves like a simple pipeline load > capacity  max throughput + linear drop in response time Two common models: Thread-based concurrency Event-driven server

Thread-based Concurrency

Thread-based Concurrency Benefits Simple, well-supported programming model Drawbacks High overheads as # of threads increases Cache & TLB misses, scheduling, lock contention Virtualizes resources for multiprogramming

Threaded Server Throughput Degradation

Event-driven Server

Event-driven Server Benefits Drawbacks Robust to high loads Drawbacks Harder to program---concerned with scheduling and event partitioning More direct control of resources

Event-driven Server Throughput

SEDA Key mechanisms are event-driven stages, and resource controllers Support massive concurrency Simplify construction of well-conditioned services Enable introspection Support self-tuning resource management Key mechanisms are event-driven stages, and resource controllers

A SEDA Stage

SEDA HTTP Server: Haboob

SEDA Resource Controllers

SEDA Thread Pool Controller

SEDA Batching Controller

Sandstorm Implementation of SEDA in Java Benchmark performance is good (IBM JDK 1.3.0) Advanced features (e.g. GC) helpful Many GP features (queue and thread management, profiling, etc.) Relies on async I/O package Better performance than blocking ops + threads Roughly 20k LOC

Async Sockets Layer

Async File Layer Bounded thread pool to perform standard I/O ops read, write, seek, stat, close One thread per file (ensures serial access) Number of threads adjusted by resource controller

SEDA HTTP Server: Haboob

Haboob Performance Compare with Apache and Flash Measure throughput and response time Calculate Fairness: f(x1, x2,…, xN) = (xi)2 / N xi2 where xi = # of requests completed for each of N clients over some period of time Measure behavior under high load

Configuration 4-way SMP 500 MHz Pentium III 2 GB RAM, Linux 2.2.14, Gigabit Ethernet One server and 32 load generators Flash & Haboob run with 200 MB page cache Offered load derived from SPECweb99 3.31 GB file set size

Haboob Throughput

Haboob Response Times 1024 clients

Haboob Performance

Response Time Controller 1024 clients

Gnutella Packet Router 3 stage architecture GnutellaServer accepts TCP connections GnutellaRouter performs routing GnutellaCatcher manages connections to network Max throughput 20k p/s Real-network run of 37 hours: Processed 24.8m packets (avg. 179 p/s) Received 72k connections (avg. 12 simultaneous)

Performance Challenges Protection from slow sockets Need to threshold queue size of slow connections Close connection on exceeding threshold Load conditioning Introduced bottleneck in query packets (15% of traffic mix) Add threads to GnutellaRouter as offered load increases (queue size > 1000 packets)

Discussion Measurement and control vs. reservation Mechanisms for detecting overload Policies to deal with overload SEDA ease of programming Less worry of synchronization & race conditions than thread-per-request Less complex and “soft” than events Directions for OS design?

Contributions SEDA: Staged, Event-Driven Architecture Applications consist of connected stages each serviced by one or more threads Dynamic Resource Controllers examine and react to high load conditions and control thread usage SEDA implementation and applications Sandstorm implementation written in Java Haboob webserver Gnutella packet router