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.

Slides:



Advertisements
Similar presentations
Chapter 4 Threads Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Advertisements

WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
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.
Day 10 Threads. Threads and Processes  Process is seen as two entities Unit of resource allocation (process or task) Unit of dispatch or scheduling (thread.
Chapter 4: Threads. Overview Multithreading Models Threading Issues Pthreads Windows XP Threads.
Course: Operating Systems Instructor: Umar Kalim NUST Institute of Information Technology, Pakistan Operating Systems.
Fast Servers Robert Grimm New York University Or: Religious Wars, part I, Events vs. Threads.
Jump to first page Flash An efficient and portable Web server presented by Andreas Anagnostatos CSE 291 Feb. 2, 2000 Vivek S. Pai Peter Druschel Willy.
Capriccio: Scalable Threads for Internet Services ( by Behren, Condit, Zhou, Necula, Brewer ) Presented by Alex Sherman and Sarita Bafna.
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.
Fast Servers Robert Grimm New York University Or: Religious Wars, part I, Events vs. Threads.
Precept 3 COS 461. Concurrency is Useful Multi Processor/Core Multiple Inputs Don’t wait on slow devices.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
3.5 Interprocess Communication
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
1 Chapter 4 Threads Threads: Resource ownership and execution.
Threads. Processes and Threads  Two characteristics of “processes” as considered so far: Unit of resource allocation Unit of dispatch  Characteristics.
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Basic Networking & Interprocess Communication Vivek Pai Nov 27, 2001.
Understanding Factors That Influence Performance of a Web Server Presentation CS535 Project By Thiru.
Apache Architecture. How do we measure performance? Benchmarks –Requests per Second –Bandwidth –Latency –Concurrency (Scalability)
Processes Part I Processes & Threads* *Referred to slides by Dr. Sanjeev Setia at George Mason University Chapter 3.
Operating Systems CSE 411 CPU Management Sept Lecture 11 Instructor: Bhuvan Urgaonkar.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
Operating System 4 THREADS, SMP AND MICROKERNELS
Threads, Thread management & Resource Management.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.
Concurrency: Threads, Address Spaces, and Processes Andy Wang Operating Systems COP 4610 / CGS 5765.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Proactor Pattern Venkita Subramonian & Christopher Gill
A Measurement Based Memory Performance Evaluation of High Throughput Servers Garba Isa Yau Department of Computer Engineering King Fahd University of Petroleum.
Background: I/O Concurrency Brad Karp UCL Computer Science CS GZ03 / M030 2 nd October, 2008.
Scalable Kernel Performance for Internet Servers under Realistic Loads. Gaurav Banga, etc... Western Research Lab : Research Report 1998/06 (Proceedings.
Copyright ©: University of Illinois CS 241 Staff1 Threads Systems Concepts.
1 Combining Events and Threads for Scalable Network Services Peng Li and Steve Zdancewic University of Pennsylvania PLDI 2007, San Diego.
Chapter 4: Multithreaded Programming. 4.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts What is Thread “Thread is a part of a program.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
Operating System 4 THREADS, SMP AND MICROKERNELS.
Operating Systems: Internals and Design Principles
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Processes and Threads.
LAIO: Lazy Asynchronous I/O For Event Driven Servers Khaled Elmeleegy Alan L. Cox.
An Efficient Threading Model to Boost Server Performance Anupam Chanda.
Code Development for High Performance Servers Topics Multithreaded Servers Event Driven Servers Example - Game Server code (Quake) A parallelization exercise.
Saurav Karmakar. Chapter 4: Threads  Overview  Multithreading Models  Thread Libraries  Threading Issues  Operating System Examples  Windows XP.
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
Operating Systems CMPSC 473 Processes (5) September Lecture 11 Instructor: Bhuvan Urgaonkar.
Threads, SMP and Microkernels Process vs. thread: –Unit of resource ownership (process has virtual address space, memory, I/O channels, files) –Unit of.
Threads by Dr. Amin Danial Asham. References Operating System Concepts ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, and GREG GAGNE.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
1 Chapter 5: Threads Overview Multithreading Models & Issues Read Chapter 5 pages
Chapter 4: Threads.
Node.Js Server Side Javascript
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
CS 6560: Operating Systems Design
Processes and Threads Processes and their scheduling
Chapter 4: Multithreaded Programming
Node.Js Server Side Javascript
Chapter 4: Threads.
I/O Systems I/O Hardware Application I/O Interface
Operating System 4 THREADS, SMP AND MICROKERNELS
Threads and Concurrency
Prof. Leonardo Mostarda University of Camerino
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 4: Threads.
CS703 – Advanced Operating Systems
Presentation transcript:

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 all proposed solutions is more widely adopted We can understand how HW environment affects SW solutions, by comparing old days and now days

SPED Web servers in 1999 Logical flow of a typical Web server Single-process event-driven (SPED) Excellent performance for in-memory cached files Poor performance for files on disks File I/O blocks the CPU

MT / MP approach Multi-process (MP) or multi-threaded (MT) approach Spawn multiple SPED instances to serve HTTP requests One can work for a new request when the others are blocked by file I/O

FLASH Asymmetric Multi-Process Event Driven (AMPED) approach Disk I/O is done by separated helper processes (or threads) Helper processes communicate with main process via IPC (e.g. pipe)

AMPED vs MT/MP Memory: AMPED << MT/MP MT/MP approach creates a thread/process for each connection Concurrency: AMPED > MT/MP MT/MP’s maximum concurrency is limited by Kernel’s process limit AMPED’s helper process can be shared by multiple connections

Limitations of AMPED IPC overhead IPC needs assist of Kernel, which introduces unnecessary mode switching overhead Context switching overhead Running multiple processes/threads incurs frequent context switching (Actually, AMPED is better than MT/MP but not enough)

Background of design decisions 16 yeas ago (1999), No AIO  Spawn a processes only for disk I/O CPU was relatively faster than network interface  IPC overhead or context switching overhead were not critical Memory was expensive  AMPED requires much less memory compare to MT/MP Familiar with single-CPU core environment  No multi-core consideration Evaluation setupFLASH (1999)mTCP (2014)Difference # of CPU cores116x16 CPU clock speed333 MHz2.9 GHzx8.7 Memory128 MB32 GBx256 Network BW200 Mbps10 Gbpsx50

Asynchronous File I/O Non-blocking file I/O Application only requests disk read Kernel notifies completion of disk read to application Enables completely non-blocking single-threaded programming but increases programming difficulty First presented in 1997, (As far as I know) Proactor: An Object Behavioral Pattern for Demultiplexing and Dispatching Handlers for Asynchronous Events 4 th annual Pattern Languages of Programming conference

Nowadays Status AIO is introduced (From 2003, Linux kernel 2.6.x)  Single thread can manage everything without blocking  No IPC overhead, no context switching overhead CPU is bottleneck Memory is cheap Multi-core scalability is very important AMPED vs AIO? Most popular Web servers still stick on MP/MT! Apache: MT, Nginx: MP (Both Apache and Nginx support AIO, but disabled by default)