GEN01_The Irresistible Forces Meet the Moveable Objects
Download
Report
Transcript GEN01_The Irresistible Forces Meet the Moveable Objects
The Irresistible Forces Meet
the Movable Objects
Pat Helland
Microsoft Corporation
November 9th, 2007
Agenda
• Introduction
• The Irresistible Forces
• The Moveable Objects
• Evolution and Coexistence
• Conclusion
Slide 2
Disclaimer #1
The opinions expressed in this presentation
are the opinions of the presenter and not
necessarily those of Microsoft!
As a matter of fact, no one’s even
reviewed those last minute changes!
Disclaimer #2
“Never make forecasts,
especially about the future!”
- Samuel Goldwyn
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
•
•
•
•
Old
New
Big, Concentrated,
and Reliable
Tiny, Cheap, Flakey
& Ubiquitous
Big Servers
Big Datacenters
Big Fast CPUs
Big Money…
•
•
•
•
•
Little Flakey Datacenters
Many Cores
Many Tiny Devices
Not Getting Faster
Low Power… Cheaper
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
Moore’s Law Continues
10 GHz
…and
Whyofistransistors
the
thepower
CPUdoubles every two years…
150 Watts
The number
10 volts
10,000
100
1,000
Watts
100
110GHz
1 10
volt
1
Watts
0.1
2 GHz
0.5m
52 Watts
0.18um
1 GHz
12
90nm
0.25um 20
Watts
65nm
600 MHz
Watts
0.13um
9 Watts
0.01
0.001
.1 volt
1990
1970
1990
3.8 GHz
…but the voltage
110 Watts
3.6 GHz
isn’t dropping
3 GHz
Watts
as81fast!!
at
frequency
the high-end
not
0.7um cook
could
rising
like ita
hot-dog!!!
should?
0.35um
1993
1980
1993
More than
45nm
1
billion
400 MHz
transistors 30nm
in 2006!
1997
1997 1990
2001
2001
2005
2000
2005
2009
2010
2009
Slide 7
The Power Wall
• As the transistors get
smaller, they “leak”
• Leakage goes up as the
features get smaller
100
Total
• Watts
Faster frequencies
need more
dynamic power Power
• Changing bits consumes dynamic power
• Dynamic power goes up with the frequency
• As the power goes up, the chips get hotter…
10
• Watts
As the chips get hotter, the static power goes up (more leaking)
• A bad cycle Hotter chips need more power Hotter chips
Static
Dynamic
Power
Frequencies will
NOT get much faster!
Power
Maybe 10% every year or so a few more times…
Also,
will make 2001
the chips LOTS
1990these modest
1993 gains
1997
2005 hotter!2009
Slide 8
The Memory Wall
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!!
Speculative Execution
In-order Execution
Use hardware to guess the next
memory needed
Increase chance the memory is
there (no stalling)
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!
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
Slide 9
Many-Core
90 nm
256 Cores
• Increasing attention to
parallel chips
• Many plans for
cores
65 nm
with “In-Order” execution
128 Cores
nm
On-chip 45
shared
memory
32memory
nm
Far faster to access on-chip
than DRAM
Interesting challenges in synchronization
(e.g. locking)
22 nm
4
2
Inexpensive
Cores Cores
64 Cores
16
8
Cores
Cores
Low-Power
Parallel Chips
32 Cores 16 nm 11 nm
8 nm
Amazing amounts of computing very cheap
2004
Slower
same)2010
sequential
2006 (or
2008
2012 speed!
2014
2016
2018
Slide 10
Sequential versus
Parallel
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 11
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
Remember when
Winchester Disks came?
• 15-150 days to read randomly
Need to Treat Most of Disk as Cold Storage
No offsite media – Must use cross data-center
replication for disaster protection !
Slide 17
Flash Is Disk
A Fat Straw Remaining
Fat as Capacity Rises
SATA Disks 40X
Cheaper per GB (2007)
2007
SATA
Disk
SCSI
Disk
Flash
DRAM
GB/$
3.33
0.50
0.08
0.01
IOPS/GB
0.2
4
200
5,000,000
GB/Watt
50
5
100
0.5
Current Trends
Show Price
Crossover
in 2012 or so…
(SATA = Flash)
• Flash capacity doubled each year since 1995
Flash Is COOL!
• 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
2010: 128GB Flash disk for $40
• 8 chips plus controller 1 Watt !
Slide 18
Storage Is Changing
Flash Is Disk…
Disk Is Tape…
Tape Is Dead…
Flash Is Cool…
Slide 19
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 and Latency
100,000
Mbit/s
10,000
Mbit/s
1,000
Mbit/s
100 Gbit/s copper
LAN likely cheap
and easy in 2011
IEEE
802.3ac
(optical)
IEEE
802.3an
(copper)
Standard
started
2006
IEEE
802.3ab
• 100
Bandwidth continues to rise very fast…
• “Total bandwidth triples ever 12IEEE
months” – George Gilder
Mbit/s
• Latency reductions are limited… 802.3u
Datacenters:
a new backbone!
•10Paraphrased from the sayings of Albert Einstein…
-Concentration
of bandwidth
DC-to-DC
IEEE 802.3
•Mbit/s
Bandwidth
and latency
are different
-Huge
data
transfers between
DCs
• “Don’t
underestimate
the bandwidth
of a mini-van driving down
1987 with
1991
1999
2007
2011
the1983
road loaded
DVDs”1995 -- Jim
Gray 2003
Slide 21
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 802.11 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
Don’t
“Hourglass” !
Useful Work
Always
Continues
Data Gets
Less Stale…
Slide 23
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
Application State Separated from the Machine
Per-User
Per-App
State
Safety
and SandBoxing
Controlled
and Safe
Sharing
across Apps
Controlled
and Safe
Sharing
across Users
Slide 28
Parallel or Paralyzed?
Types of Parallelism
Pipeline Parallelism
Partitioned
Parallelism
Single-Cores Won’t Get Faster!
Spread the work across many processors
Most Existing Apps Aren’t Parallel!
Servers Big DBs
Clients Big EXEs
Slide 29
Spinning Faster by Holding Close
Waiting for Data Makes Computers Very Slow
Waiting for
DRAM Is Slow
Waiting for the
Network Is Slow!!
Waiting While Offline
Is Glacially Slow!!
It Is OK to have Copies of Data Close By
Read-Only
Reference Data
Divergent Changes
of Copies???
Your Opinion of
What It Should Be!
Slide 30
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!
Chunky
Creamy
Continuous Drive to Many Small
and Separate Units of Computation
How Can We Build Apps Out of Small,
Independent, and Unreliable Pieces??
Slide 32
Money Matters!
Power!
Power!
In 1995, I thought the Internet was doomed because it
wasn’t transactionally consistent
I was wrong… I admit it…
People will evolve their apps to cope with these forces!
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 33
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
-- “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 35
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
The best you can do is a guess!
Good guesses; bad guesses; no certainty…
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…
Investing in remembering well is a business decision
Maybe forgetting once in a while is cheaper!
Slide 37
Screw-Ups and Apologies
I guess I can ship that
book on Wednesday…
Sorry!!! Current guess
is next month!
Indistinguishable
behavior!!!
Oh,
Crap!
Replica 1
I guess I can ship that
book on Wednesday…
User 1
Sorry!!! Current guess
is next month!
I guessed I would ship the book
Replica 2
User 2
I guess I can ship that
book on Wednesday…
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)
Creamy
• 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
It’s OK to Have a Copy
websites have large
There Is No Authority! Bigcaches
of product
catalogs and price lists!
• There is no authoritative copy!
Computing with
• Data-centers come and go
versions!
• 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
Lots of Pieces and Lots of Copies!
How can we cut the work into
lots of little pieces?
How can we manage
independent changes to
lots of little pieces?
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?
Transaction
Data
Transaction
Data
Data
Slide 45
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!
Frequently
the work
won’t fit
on one
Obj
Obj
Obj
Obj
Obj
Obj
“ABC”
“ABZ”
“FXQ”
“JKL”
“GHI”
“MOE” “NAO”
computer!
Obj
“FAW”
“LMN”
“GHI”
Obj
“DEF”
Obj
“JAA”
“LMN”
Obj
“RST”
“JKL”
Obj
“XYZ”
Obj
“KZU”
Obj
“XYZ”
“LMN”
Obj
“RAA”
Obj
“RST”
Obj
“XYZ”
No Promise
that Two
Different
Objects Stay
on the Same
Machine!!
Slide 46
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
Object-W
Object-X
Object-Y
Object-Z
Slide 48
Separate Transactions on Little Objects
Smaller is better
Separate transaction per object
Fine-grained workflow
But wait !
There’s no authoritative copy
of the little object!
Now what ?
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 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
Subjective Consistency
Given the information I have at hand, make a decision and act on it !
Remember the information at hand !
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 51
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!”
• Everyone has the same information, everyone comes to the
same conclusion about the decisions to take…
Eventual Consistency
Given the same knowledge, produce the same result !
Everyone sharing their knowledge leads to the same result...
This is NOT magic; it is a design requirement !
Idempotence, commutativity, and associativity of the operations
(decisions made) are all implied by this requirement
Slide 52
Eventual Consistency:
Example
Whew!
Probability
this replica
processes
the work
Oh,
Crap!
Business Rule!
ShipmentID “X”
Oh,
Crap!
Oh,
Crap!
X<Y
Cancel Y
Ship Jim
a book!
Whew!
R1
R2 Jumps
the Gun! R2
R3
R4
R5
ShipmentID “Y”
X<Y
Cancel Y
X<Y
Cancel Y
Slide 53
To CAP It Off…
I believe in the CAP Conjecture:
• Consistency, Availability, Partition tolerance
• Pick two…
This is a relaxation of consistency
Subjective consistency combined with eventual consistency
provide different application semantics
Economic based argument:
People want disconnection, scaling, and
cheap data-centers enough to make
subjective and eventual consistency
work for an increasing number of applications
Slide 54
Agenda
• Introduction
• The Irresistible Forces
• The Moveable Objects
• Evolution and Coexistence
• Conclusion
Slide 55
Interoperate and Entice
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!
Slide 56
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
Atomic
Consistent
I solated
Durable
- All or nothing
- Keep the rules of the system
- Don’t show concurrent work
- 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!!
Slide 59
This Is Your Object on ACID
Associative
Commutative
I dempotent
Distributed
- (A + B) + C = A + (B + C)
- (A + B) = (B + A)
- OK to do work MANY times
- Spread out and independent
Can’t tell
the order
in which
the work
is done
----Can’t tell
how many
times it is
done!
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
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 60
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!
All attendees who submit
a session feedback form
within 12 hours after the
session ends will have the
chance to win the very latest
HTC 'Touch' smartphone
complete with Windows
Mobile® 6 Professional
© 2007 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only.
MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.