Presentation on theme: "The Irresistible Forces Meet the Movable Objects Pat Helland Microsoft Corporation November 9 th, 2007."— Presentation transcript:
The Irresistible Forces Meet the Movable Objects Pat Helland Microsoft Corporation November 9 th, 2007
Agenda Introduction The Irresistible Forces The Moveable Objects Evolution and Coexistence Conclusion Slide 2
As a matter of fact, no one’s even reviewed those last minute changes! Slide 3
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
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
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
More than 1 billion transistors in 2006! The number of transistors doubles every two years… ,000 10,000.1 volt 1 volt 10 volts um 0.5m 0.35um 0.25um 0.18um 0.13um 90nm 65nm 45nm 30nm …but the voltage isn’t dropping as fast!! 10 Watts 100 Watts 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 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? Moore’s Law Continues Slide 7
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 Watts 100 Watts Total Power Static Power Dynamic Power The Power Wall Static Power Dynamic Power Total Power Slide 8
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!
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! 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 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
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!
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
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
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 Don’t fix Load old data-center on a truck Service-free data centers 20-50% of system outages cause by administrative error Don’t 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
Transition and Legacy Classes of machines High-end, high-throughput, high-cost, hotter-than-hell Holds legacy databases & stuff you can’t 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
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
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 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?
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 SATA Disk SCSI Disk FlashDRAM GB/$ IOPS/GB ,000,000 GB/Watt 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
Storage Is Changing Slide 19 Flash Is Disk… Disk Is Tape… Tape Is Dead… Flash Is Cool…
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
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 “Don’t underestimate the bandwidth of a mini-van driving down the road loaded with DVDs” -- Jim Gray Mbit/s 100 Mbit/s 1,000 Mbit/s 10,000 Mbit/s 100,000 Mbit/s IEEE IEEE 802.3u IEEE 802.3ab IEEE 802.3ac (optical) IEEE 802.3an (copper) Standard started 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
The Daily Trough Bandwidth continues to get cheaper (overall) Growing at a rate faster than Moore’s 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
Wireless Everywhere… Mostly… Wireless is increasingly available Higher bandwidths and more locations Easier transitions from to cellular access There are still dead spots and will likely continue to be Lots of bandwidth, lots of locations, won’t be perfect… Want To See “Always Offline” Behavior Slide 23 Don’t “Hourglass” ! Useful Work Always Continues Data Gets Less Stale…
Increasing… Increasing LAN… Increasing WAN… Increasing Wireless… Increasing Expectations! It’s Easier to Move a Bit than Move a Watt… Data-centers Are Moving to be by Hydro-Electric Dams! Slide 24
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
Video: Software AND Services Shown by Bill Gates at the Microsoft Company Meeting A vision of the future with Software AND Services Slide 26
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
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
Parallel or Paralyzed? Slide 29 Types of Parallelism Pipeline ParallelismPartitioned Parallelism Single-Cores Won’t Get Faster! Spread the work across many processors Most Existing Apps Aren’t Parallel! Servers Big DBsClients Big EXEs
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!
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
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??
Power! Money Matters! In 1995, I thought the Internet was doomed because it wasn’t 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!
Agenda Introduction The Irresistible Forces The Moveable Objects Admitting We’re Confused Working in the Here and Now Cutting the Work into Little Pieces Independent Changes to Little Pieces Evolution and Coexistence Conclusion Slide 34
Inventory and Forklifts Even if the computer is accurate: Data are entered by people Data are entered by sensors Decisions are made Slide “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.
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
Memories and Sharing It’s 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
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
It’s OK to be Decisive and Wrong Business involves apologizing… It’s OK to take advantage of that! Pay attention to the cost (and probability) of the apology versus the advantage of decisiveness Slide 39
Agenda Introduction The Irresistible Forces The Moveable Objects Admitting We’re Confused Working in the Here and Now Cutting the Work into Little Pieces Independent Changes to Little Pieces Evolution and Coexistence Conclusion Slide 40
It’s 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
It’s 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!
Lots of Pieces and Lots of Copies! Slide 43
Agenda Introduction The Irresistible Forces The Moveable Objects Admitting We’re Confused Working in the Here and Now Cutting the Work into Little Pieces Independent Changes to Little Pieces Evolution and Coexistence Conclusion Slide 44
Scaling with Local Transactions Assume: Local computation must be done… can’t 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 can’t do remote transactions Problem: How do you know WHAT is local? Data Transaction Data Transaction Data Slide 45
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 won’t fit on one computer!
It’s Not Your Grandmother’s DB Anymore! Queries are different ! No transactional queries May not be on same machine No remote transactions! Can query stale copies Hmmm… What’s stale mean in this world?? Alternate indices are different ! Different keys May be different machines You can’t transactionally update multiple keys Must be a multi-step (non-transactional) process Slide 47
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
Separate Transactions on Little Objects Slide 49
Agenda Introduction The Irresistible Forces The Moveable Objects Admitting We’re Confused Working in the Here and Now Cutting the Work into Little Pieces Independent Changes to Little Pieces Evolution and Coexistence Conclusion Slide 50
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!
Eventual Consistency Eventually, all the copies of the object share their changes “I’ll 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 take…Everyone 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...
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
To CAP It Off… This is a relaxation of consistency Subjective consistency combined with eventual consistency provide different application semantics Slide 54
Agenda Introduction The Irresistible Forces The Moveable Objects Evolution and Coexistence Conclusion Slide 55
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 doesn’t get the new advantages) Entice into the New World… New ways of building apps will only be adopted when they offer strong business value!
Agenda Introduction The Irresistible Forces The Moveable Objects Evolution and Coexistence Conclusion Slide 57
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 Today’s investment must survive! New components must live and interoperate with the old Incentive to move Slide 58
The Transactional ACID Slide 59 Atomic - All or nothing Consistent - Keep the rules of the system I solated - Don’t show concurrent work Durable - Don’t 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 it’s one machine... Used to work just fine!!
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 Can’t tell the order in which the work is done Can’t 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
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
The Irresistible Forces Will Move the Objects! Slide 62
Complete your evaluation on the My Event pages of the website at the CommNet or the Feedback Terminals to win!