the irresistible forces meet the movable objects pat helland microsoft corporation november 9 th,...

Download The Irresistible Forces Meet the Movable Objects Pat Helland Microsoft Corporation November 9 th, 2007

If you can't read please download the document

Upload: hanna-jess

Post on 14-Dec-2015

221 views

Category:

Documents


2 download

TRANSCRIPT

  • Slide 1

The Irresistible Forces Meet the Movable Objects Pat Helland Microsoft Corporation November 9 th, 2007 Slide 2 Agenda Introduction The Irresistible Forces The Moveable Objects Evolution and Coexistence Conclusion Slide 2 Slide 3 As a matter of fact, no ones even reviewed those last minute changes! Slide 3 Slide 4 Forces, Objects, and Evolution Economic and technical forces are pushing our Industry ManyCore, flash, hard-drives, datacenters, mobility, novel devices, connectivity changes, ubiquity of sensors, POWER, etc These forces are pressuring how applications compose Offline, scaling, redundancy, caching, versioning, autonomy, and more are all rearing their heads We must create new models for components (objects) What can these objects count on for data, state, connectivity? How can the objects do work when confronted with new constraints and challenges? We must evolve our computing models The forces will overrun the objects The new objects must bring new value and coexist with legacy Slide 4 Slide 5 The Nature of the Forces Big Servers Big Datacenters Big Fast CPUs Big Money Little Flakey Datacenters Many Cores Many Tiny Devices Not Getting Faster Low Power Cheaper OldNew Slide 5 Slide 6 Agenda Introduction The Irresistible Forces Forces in Processors Forces in Data-Centers Forces in Storage Forces in Communication Forces in the Cloud The Irresistible Forces Grind Us Down The Moveable Objects Evolution and Coexistence Conclusion Slide 6 Slide 7 More than 1 billion transistors in 2006! The number of transistors doubles every two years 19701980199020002010 0.001 0.01 0.1 1 10 100 1,000 10,000.1 volt 1 volt 10 volts 199019931997200120052009 0.7um 0.5m 0.35um 0.25um 0.18um 0.13um 90nm 65nm 45nm 30nm but the voltage isnt dropping as fast!! 10 Watts 100 Watts 199019931997200120052009 9 Watts 12 Watts 20 Watts 52 Watts 81 Watts 110 Watts 150 Watts and the power at the high-end could cook a hot-dog!!! 1 GHz 10 GHz 199019931997200120052009 400 MHz 600 MHz 2 GHz 3 GHz 3.6 GHz 3.8 GHz 1 GHz Why is the CPU frequency not rising like it should? Moores Law Continues Slide 7 Slide 8 Frequencies will NOT get much faster! Maybe 10% every year or so a few more times Also, these modest gains will make the chips LOTS hotter! As the transistors get smaller, they leak Leakage goes up as the features get smaller Faster frequencies need more dynamic power Changing bits consumes dynamic power Dynamic power goes up with the frequency As the power goes up, the chips get hotter As the chips get hotter, the static power goes up (more leaking) A bad cycle Hotter chips need more power Hotter chips 10 Watts 100 Watts 199019931997200120052009 10 Watts 100 Watts 199019931997200120052009 Total Power Static Power Dynamic Power The Power Wall Static Power Dynamic Power Total Power Slide 8 Slide 9 Speculative Execution Use hardware to guess the next memory needed Increase chance the memory is there (no stalling) The Memory Wall Slide 9 Access time to DRAM remains basically flat It seems to take 60ns or so (remaining flat) More bandwidth! No shorter latencies Faster processors wait more!! You can work hard (i.e. speculate) to fight the memory wall -Lots of transistors and power for small gains - May be worth it to slightly advance the throughput In-order Execution Simple 1 instruction at a time The slower the clock, the closer performance to the high-end speculation!!! About 5 times as complicated for a fractional throughput gain! Much cheaper in transistor and power use! Slide 10 Many-Core Increasing attention to parallel chips Many plans for cores with In-Order execution Slide 10 On-chip shared memory Far faster to access on-chip memory than DRAM Interesting challenges in synchronization (e.g. locking) Inexpensive Low-Power Parallel Chips Amazing amounts of computing very cheap Slower (or same) sequential speed! 20042006200820102012201420162018 90 nm 65 nm 45 nm 32 nm 22 nm 16 nm 11 nm 8 nm 2 Cores 4 Cores 8 Cores 16 Cores 32 Cores 64 Cores 128 Cores 256 Cores 20042006200820102012201420162018 90 nm 65 nm 45 nm 32 nm 22 nm 16 nm 11 nm 8 nm 2 Cores 4 Cores 8 Cores 16 Cores 32 Cores 64 Cores 128 Cores 256 Cores Slide 11 Sequential versus Parallel Slide 11 You will get a bit faster sequential processing It will cost a LOT! If you want a parallel app you can have LOTS of computing! It is getting lots cheaper! Slide 12 Agenda Introduction The Irresistible Forces Forces in Processors Forces in Data-Centers Forces in Storage Forces in Communication Forces in the Cloud The Irresistible Forces Grind Us Down The Moveable Objects Evolution and Coexistence Conclusion Slide 12 Slide 13 Pricing, Buildings, and Power The computers are cheap! Power is currently 40% of the cost of a datacenter The building shell is about 15% Cheaper to waste floor space than power Reducing power saves air-conditioning! Double savings Backup power is 20% of datacenter cost Batteries for a while? Big backup gens at $2M each Slide 13 Slide 14 Trends in Data-centers Data-center in a shipping container 55% of data-center cost: building & power Far more space, heat, & power efficient Cost savings in production and installation Connect to power, chilled water, & network Fail in place Expect to lose processors Dont fix Load old data-center on a truck Service-free data centers 20-50% of system outages cause by administrative error Dont use redundant power Spread the state and capacity across many data-centers Expect data-centers to be down as a normal event Lots of small, expendable, easy-to-manage data-centers ! Must use cross data-center replication for disaster protection ! Slide 14 Slide 15 Transition and Legacy Classes of machines High-end, high-throughput, high-cost, hotter-than-hell Holds legacy databases & stuff you cant break up Low-end, low-cost, low-power, very cost-effective Lots of computation and storage for the money No brainer for stateless computing Increasingly holds partitioned state Classes of datacenters High-end, highly-available, highly-supervised Expensive Holds older apps with big databases Backup datacenters & backup power Low-end, low-availability, no backup power, no onsite staff Lots and lots of cheap low-end machines No brainer for stateless (and cached-state) based computing Increasingly holding an opinion of the authoritative state! Slide 15 Slide 16 Agenda Introduction The Irresistible Forces Forces in Processors Forces in Data-Centers Forces in Storage Forces in Communication Forces in the Cloud The Irresistible Forces Grind Us Down The Moveable Objects Evolution and Coexistence Conclusion Slide 16 Slide 17 Disk Is Tape The straw to disk is getting skinnier Each generation: Capacity increases with areal density Read/Write time with linear density 10+ Terabyte disks projected for 2010 ( $100 or so) 5-15 hours read sequentially 15-150 days to read randomly Slide 17 Need to Treat Most of Disk as Cold Storage No offsite media Must use cross data-center replication for disaster protection ! Remember when Winchester Disks came? Slide 18 Flash Is Disk Flash capacity doubled each year since 1995 Market driven by phone, camera, iPod Low entry-cost $30/chip $3/chip Flash makes a better disk than disk 5000 I/Os per second Read 20MB/sec; Write 10MB/sec (per chip) N chips N * Bandwidth 8 chips plus controller 1 Watt ! Slide 18 2007 SATA Disk SCSI Disk FlashDRAM GB/$3.330.500.080.01 IOPS/GB0.242005,000,000 GB/Watt5051000.5 SATA Disks 40X Cheaper per GB (2007) Current Trends Show Price Crossover in 2012 or so (SATA = Flash) A Fat Straw Remaining Fat as Capacity Rises Flash Is COOL! 2010: 128GB Flash disk for $40 Slide 19 Storage Is Changing Slide 19 Flash Is Disk Disk Is Tape Tape Is Dead Flash Is Cool Slide 20 Agenda Introduction The Irresistible Forces Forces in Processors Forces in Data-Centers Forces in Storage Forces in Communication Forces in the Cloud The Irresistible Forces Grind Us Down The Moveable Objects Evolution and Coexistence Conclusion Slide 20 Slide 21 Bandwidth continues to rise very fast Total bandwidth triples ever 12 months George Gilder Latency reductions are limited Paraphrased from the sayings of Albert Einstein Bandwidth and latency are different Dont underestimate the bandwidth of a mini-van driving down the road loaded with DVDs -- Jim Gray 19831987199119951999200320072011 10 Mbit/s 100 Mbit/s 1,000 Mbit/s 10,000 Mbit/s 100,000 Mbit/s IEEE 802.3 IEEE 802.3u IEEE 802.3ab IEEE 802.3ac (optical) IEEE 802.3an (copper) Standard started 2006 100 Gbit/s copper LAN likely cheap and easy in 2011 Bandwidth and Latency Slide 21 Datacenters: a new backbone! -Concentration of bandwidth DC-to-DC -Huge data transfers between DCs Slide 22 The Daily Trough Bandwidth continues to get cheaper (overall) Growing at a rate faster than Moores Law Bandwidth is priced based on peak usage Almost all providers see daily cycles The troughs are free bandwidth No Additional Cost to Use This Bandwidth Bandwidth Charged as a Function of Peak Usage Slide 22 Slide 23 Wireless Everywhere Mostly Wireless is increasingly available Higher bandwidths and more locations Easier transitions from 802.11 to cellular access There are still dead spots and will likely continue to be Lots of bandwidth, lots of locations, wont be perfect Want To See Always Offline Behavior Slide 23 Dont Hourglass ! Useful Work Always Continues Data Gets Less Stale Slide 24 Increasing Increasing LAN Increasing WAN Increasing Wireless Increasing Expectations! Its Easier to Move a Bit than Move a Watt Data-centers Are Moving to be by Hydro-Electric Dams! Slide 24 Slide 25 Agenda Introduction The Irresistible Forces Forces in Processors Forces in Data-Centers Forces in Storage Forces in Communication Forces in the Cloud The Irresistible Forces Grind Us Down The Moveable Objects Evolution and Coexistence Conclusion Slide 25 Slide 26 Video: Software AND Services Shown by Bill Gates at the Microsoft Company Meeting A vision of the future with Software AND Services Slide 26 Slide 27 Agenda Introduction The Irresistible Forces Forces in Processors Forces in Data-Centers Forces in Storage Forces in Communication Forces in the Cloud The Irresistible Forces Grind Us Down The Moveable Objects Evolution and Coexistence Conclusion Slide 27 Slide 28 The State in the Cloud Slide 28 Application State Separated from the Machine Per-User Per-App State Safety and Sand- Boxing Controlled and Safe Sharing across Apps Controlled and Safe Sharing across Users Slide 29 Parallel or Paralyzed? Slide 29 Types of Parallelism Pipeline ParallelismPartitioned Parallelism Single-Cores Wont Get Faster! Spread the work across many processors Most Existing Apps Arent Parallel! Servers Big DBsClients Big EXEs Slide 30 Spinning Faster by Holding Close Slide 30 Waiting for Data Makes Computers Very Slow Waiting for DRAM Is Slow Waiting for the Network Is Slow!! It Is OK to have Copies of Data Close By Read-Only Reference Data Divergent Changes of Copies??? Waiting While Offline Is Glacially Slow!! Your Opinion of What It Should Be! Slide 31 Defy Authority Becoming hard to know the truth Multiple cheap data-centers they go down! The offline laptop We need to be accepting that we cannot know the truth Each copy is disconnected from other copies Only historical truths can remain truths Slide 31 Slide 32 This Grind Is NUTS! Slide 32 Creamy Chunky Continuous Drive to Many Small and Separate Units of Computation How Can We Build Apps Out of Small, Independent, and Unreliable Pieces?? Slide 33 Power! Money Matters! In 1995, I thought the Internet was doomed because it wasnt transactionally consistent People will evolve their apps to cope with these forces! I was wrong I admit it Slide 33 Power! Want disconnection, scaling, cheap computers, and cheap data centers Will change app behavior to get it! (for many apps) More and more apps over time! Slide 34 Agenda Introduction The Irresistible Forces The Moveable Objects Admitting Were Confused Working in the Here and Now Cutting the Work into Little Pieces Independent Changes to Little Pieces Evolution and Coexistence Conclusion Slide 34 Slide 35 Inventory and Forklifts Even if the computer is accurate: Data are entered by people Data are entered by sensors Decisions are made Slide 35 -- Jim wants to buy a book! -- Hey, we have one in Nevada! -- Ship it to him should be there on Tuesday! In preparing the book for shipment, the only copy is run over by the forklift in the warehouse bummer. Slide 36 Guessing and Partial Knowledge Computers have partial knowledge Will be separated from the real world May be separated from other replicas with opinions of their very own Computers do not make decisions! They try to make decisions Slide 36 Slide 37 Memories and Sharing Its nice to remember your guesses Makes it easier when you guessed right Makes it easier when you guessed wrong Usually, computers remember their guess Sharing your memories is useful Replicas, disaster protection, yada-yada-yada Fidelity of memories cost More money, less forgetfulness More replicas Longer latency to share across replicas before emitting guesses Slide 37 Slide 38 Indistinguishable behavior!!! Screw-Ups and Apologies I guess I can ship that book on Wednesday User 1 User 2 Replica 1 Replica 2 Sorry!!! Current guess is next month! I guess I can ship that book on Wednesday Sorry!!! Current guess is next month! I guessed I would ship the book I guess I can ship that book on Wednesday Oh, Crap! Slide 38 Slide 39 Its OK to be Decisive and Wrong Business involves apologizing Its OK to take advantage of that! Pay attention to the cost (and probability) of the apology versus the advantage of decisiveness Slide 39 Slide 40 Agenda Introduction The Irresistible Forces The Moveable Objects Admitting Were Confused Working in the Here and Now Cutting the Work into Little Pieces Independent Changes to Little Pieces Evolution and Coexistence Conclusion Slide 40 Slide 41 Its COOL to be Smaller! Smaller computers offer more bang for the buck Less power/heat per computation Less money per computation Smaller data-centers offer more bang for the buck Easier manufacturing, support, installation, decommissioning Lower power costs (no redundant power) Lower facilities costs Smaller data-sets frequently offer more bang for the buck Easier to spread around the smaller machines Need to evolve the computing model for small data-sets with many copies Slide 41 Creamy Slide 42 Its OK to Have a Copy There Is No Authority! There is no authoritative copy! Data-centers come and go Offline laptops and devices come and go Changes stored in these are eventually shared Versioning and change history show what was intended Each copy doing its own thing Application design for independence is required How can there be independent pieces of data? How can there be loosely-dependent copies of those pieces? The demand for offline mandates we design away from authority! The demand for cheap (and flakey) data-centers mandates we design away from authority! Slide 42 Big websites have large caches of product catalogs and price lists! Computing with versions! Slide 43 Lots of Pieces and Lots of Copies! Slide 43 Slide 44 Agenda Introduction The Irresistible Forces The Moveable Objects Admitting Were Confused Working in the Here and Now Cutting the Work into Little Pieces Independent Changes to Little Pieces Evolution and Coexistence Conclusion Slide 44 Slide 45 Scaling with Local Transactions Assume: Local computation must be done cant wait to coordinate Your partner is likely to be remote Then: You must do local work Even if you have to apologize later You can do local transactions You cant do remote transactions Problem: How do you know WHAT is local? Data Transaction Data Transaction Data Slide 45 Slide 46 Obj LMN Obj GHI Obj LMN Obj XYZ Obj RST Obj JKL Obj FAW Obj ABC Obj ABZ Obj DEF Obj XYZ Obj RAA Obj XYZ Obj RST Obj NAO Obj MOE Obj LMN Obj JKL Obj GHI Obj FXQ Obj JAA Obj KZU Uniquely Keyed Objects and Partitioning Must identify objects with a unique key (reference) as its identity Objects may move when repartitioning occurs Transactions cannot occur across these objects Even if two objects are on the same machine now, they may not be later! No Promise that Two Different Objects Stay on the Same Machine!! Slide 46 Frequently the work wont fit on one computer! Slide 47 Its Not Your Grandmothers DB Anymore! Queries are different ! No transactional queries May not be on same machine No remote transactions! Can query stale copies Hmmm Whats stale mean in this world?? Alternate indices are different ! Different keys May be different machines You cant transactionally update multiple keys Must be a multi-step (non-transactional) process Slide 47 Slide 48 Fine-Grained Workflow These objects and their data are not like traditional DBs The communication must be by messaging Work must be done in steps via workflow techniques This is traditional workflow but with fine-grained participants The objects may move when repartitioned and the messages must chase them The granularity of the workflow participant is the fine-grained object Slide 48 Slide 49 Separate Transactions on Little Objects Slide 49 Slide 50 Agenda Introduction The Irresistible Forces The Moveable Objects Admitting Were Confused Working in the Here and Now Cutting the Work into Little Pieces Independent Changes to Little Pieces Evolution and Coexistence Conclusion Slide 50 Slide 51 Subjective Consistency Given the information I have at hand, make a decision and act on it ! Remember the information at hand ! Subjective Consistency Given what I know here and now, make a decision Remember the versions of all the data used to make this decision Record the decision as being predicated on these versions Other copies of the object may make divergent decisions Try to sort out conflicts within the family If necessary, programmatically apologize Very rarely, whine and fuss for human help Slide 51 Ambassadors Had Authority Back before radio, it could be months between communication with the king. Ambassadors would make treaties and much more... They had binding authority. The mess was sorted out later! Slide 52 Eventual Consistency Eventually, all the copies of the object share their changes Ill show you mine if you show me yours! Now, apply subjective consistency: Given the information I have at hand, make a decision and act on it!Given the information I have at hand, make a decision and act on it! Everyone has the same information, everyone comes to the same conclusion about the decisions to takeEveryone has the same information, everyone comes to the same conclusion about the decisions to take Idempotence, commutativity, and associativity of the operations (decisions made) are all implied by this requirement Slide 52 Eventual Consistency Given the same knowledge, produce the same result ! Everyone sharing their knowledge leads to the same result... Slide 53 X < Y Cancel Y R4R3 X < Y Cancel Y X < Y Cancel Y R2R1 Eventual Consistency: Example Slide 53 Ship Jim a book! Shipment- ID X Shipment- ID Y Oh, Crap! Oh, Crap! Whew! R5 Whew! R2 Jumps the Gun! Oh, Crap! Probability this replica processes the work Business Rule! X < Y Slide 54 To CAP It Off This is a relaxation of consistency Subjective consistency combined with eventual consistency provide different application semantics Slide 54 Slide 55 Agenda Introduction The Irresistible Forces The Moveable Objects Evolution and Coexistence Conclusion Slide 55 Slide 56 Interoperate and Entice Slide 56 Must Interoperate with the Existing Software Investments A lot of code exists and it is very important Old code must co-exist with the new (even if it doesnt get the new advantages) Entice into the New World New ways of building apps will only be adopted when they offer strong business value! Slide 57 Agenda Introduction The Irresistible Forces The Moveable Objects Evolution and Coexistence Conclusion Slide 57 Slide 58 Takeaways The hardware is changing LOTS of processors No faster, though Power and heat Lots of devices Lots of bandwidth Intermittent device connectivity The economics are changing Small is BEAUTIFUL Unreliable is cheaper Configuring costs more than the devices An onslaught of data! Components must change They need to move They need to work with offline-able partners There is no central truth Work must be idempotent and cancelable No distinct application boundary Everything is connected Components must coexist Todays investment must survive! New components must live and interoperate with the old Incentive to move Slide 58 Slide 59 The Transactional ACID Slide 59 Atomic - All or nothing Consistent - Keep the rules of the system I solated - Dont show concurrent work Durable - Dont lose committed changes Goal for Transactional ACID Make the system look like one thing at a time is happening no matter how complex the work! Looks Like a Single Machine!! The programmer pretends its one machine... Used to work just fine!! Slide 60 This Is Your Object on ACID Slide 60 Associative - (A + B) + C = A + (B + C) Commutative - (A + B) = (B + A) I dempotent - OK to do work MANY times Distributed - Spread out and independent Goal for the New ACID Recognize the work will be done by lots of unreliable machines They will have different sizes, shapes, purposes, and deployments Cant tell the order in which the work is done ----- Cant tell how many times it is done! Just like People and Societies People are made up of cells, each of which is replaceable Societies are made up of people, each of which is replaceable Slide 61 Not for Everything Just for Most! Real-Time Systems Closed Queuing Network (Limited Traffic) Like a Dedicated Lane on the Freeway for Each Automobile! I Want This for My Flight Back to Redmond !!! Very Expensive Apologies Some Guesses Are Very Expensive to Get Wrong These Make Sense to Preserve Authority Choose Consistency over Availability This is a Business Decision! The New ACID Huge Numbers of Relatively Small Operations The Cost and Probability of Apologies Is Small Essential to Provide Scalable and Available Services Slide 62 The Irresistible Forces Will Move the Objects! Slide 62 Slide 63 Complete your evaluation on the My Event pages of the website at the CommNet or the Feedback Terminals to win! Slide 64 2007 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.