590 likes | 601 Views
Science in the Clouds: History, Challenges, and Opportunities. Douglas Thain University of Notre Dame GeoClouds Workshop 17 September 2009. http://www.cse.nd.edu/~ccl. The Cooperative Computing Lab. We collaborate with people who have large scale computing problems.
E N D
Science in the Clouds:History, Challenges, and Opportunities Douglas Thain University of Notre Dame GeoClouds Workshop 17 September 2009
The Cooperative Computing Lab • We collaborate with people who have large scale computing problems. • We build new software and systems to help them achieve meaningful goals. • We run a production computing system used by people at ND and elsewhere. • We conduct computer science research, informed by real world experience, with an impact upon problems that matter.
Clouds in the Hype Cycle Gartner Hype Cycle Report, 2009
What is cloud computing? • A cloud provides rapid, metered access to a virtually unlimited set of resources. • Two significant impact on users: • End users must have an economic model for the work that they want to accomplish. • Apps must be flexible enough to work with an arbitrary number and kind of resources.
Example: Amazon EC2 Sep 2009(simplified slightly for discussion) • Small: 1 core, 1.7GB RAM, 160GB disk • 10 cents/hour • Large: 2 cores, 7.5GB RAM, 850GB disk • 40 cents/hour • Extra Large: 4 cores, 15 GB, 1690GB disk • 80 cents/hour • And the Simple Storage Service: • 15 cents per GB-month stored • 17 cents per GB transferred (outside of EC2) • 1 cent per 1000 write operations • 1 cent per 10000 read operations
Is Cloud Computing New? • Not entirely, but a combination of the old ideas of utility computing and distributed computing. • 1960 – MULTICS • 1980 – The Cambridge Ring • 1987 – Condor Distributed Batch System • 1989 – Seti@Home • 1990s – Clusters, Beowulf, MPI, NOW • 1995 – Globus, Grid Computing • 2001 –TeraGrid • 2004 – Sun Rents CPUs at $1/hour • 2006 – Amazon EC2 and S3
OpEx of Cloud Computing 2X Clouds Trade CapEx for OpEx Cost OpEx of Ownership Capital Expense of Ownership Time
What about grid computing? • A vision much like clouds: • A worldwide framework that would make massive scale computing as easy to use as an electrical socket. • The more modest realization: • A means for accessing remote computing facilities in their native form, usually for CPU-intensive tasks. • The social context: • Large collaborative efforts between computer scientists and computer-savvy fields, particularly physics and astronomy.
Clouds vs Grids • Grids provide a job execution interface: • Run program P on input A, return the output. • Allows the system to maximize utilization and hide failures, but provides few performance guarantees and inaccurate metering. • Clouds provide resource allocation: • Create a VM with 2GB of RAM for 7 days. • Gives predictable performance and accurate metering, but exposes problems to the user. • Can be used to build interactive services. • How do I run 1M jobs on 100 servers?
Submit 1M Jobs Allocate 100 CPUs Dispatch Jobs Manage Load Grid Computing Layer Provides Job Execution Cloud Computing Layer Provides Resource Allocation
Create a Condor Pool with 100 Nodes Allocate 100 Cores Run 1M Jobs
Clouds Solve Some Grid Problems • Application compatibility is simplified. • You provide a VM for Linux 2.3.4.1.2. • Performance is reasonably predictable. • 10% variations rather than orders of mag. • Fewer administrative headaches for the lone user. • A credit card swipe instead of a certificate.
But, Problems New and Old: • How do I reliably execute 1M jobs? • Can I share resources and data with others in the cloud? • How do I authenticate others in the cloud? • Unfortunately, location still matters. • Can we make applications efficiently span multiple cloud providers? • Can we join existing centers with clouds? • (These are all problems contemplated by grid.)
More Open Questions • Can I afford to move my data in to the cloud? • Can I afford to get it out? • Do I trust the cloud to secure my data? • How do I go about constructing an economic model for my research? • Are there social/technical dangers in putting too many eggs in one basket? • Is pay-go the proper model for research? • Should universities get out of the data center business?
Clusters, clouds, and gridsgive us access to unlimited CPUs. How do we write programs that canrun effectively in large systems?
MapReduce( S, M, R ) Key0 R O0 V V V Set S K,V K,V Key1 K,V M V R O1 K,V K,V V K,V K,V KeyN V V R O2 V V
F F 0.97 0.05 Example: Biometrics Research • Goal: Design robust face comparison function.
Similarity Matrix Construction Challenge Workload: 60,000 iris images 1MB each .02s per F 833 CPU-days 600 TB of I/O
I have 60,000 iris images acquired in my research lab. I want to reduce each one to a feature space, and then compare all of them to each other. I want to spend my time doing science, not struggling with computers. I own a few machines I can buy time from Amazon or TeraGrid. I have a laptop. Now What?
Try 1: Each F is a batch job. Failure: Dispatch latency >> F runtime. Try 2: Each row is a batch job. Failure: Too many small ops on FS. F F F F F CPU CPU CPU CPU CPU F F F F F F F F F F CPU F CPU F CPU F CPU F CPU F F F F F F HN HN Try 3: Bundle all files into one package. Failure: Everyone loads 1GB at once. Try 4: User gives up and attempts to solve an easier or smaller problem. F F F F F F F F F F CPU F CPU F CPU F CPU F CPU F F F F F F HN Non-Expert User Using 500 CPUs
Observation • In a given field of study, many people repeat the same pattern of work many times, making slight changes to the data and algorithms. • If the system knows the overall pattern in advance, then it can do a better job of executing it reliably and efficiently. • If the user knows in advance what patterns are allowed, then they have a better idea of how to construct their workloads.
Abstractionsfor Distributed Computing • Abstraction: a declarative specification of the computation and data of a workload. • A restricted pattern, not meant to be a general purpose programming language. • Usesdata structures instead of files. • Provide users with a bright path. • Regular structure makes it tractable to model and predict performance.
Working with Abstractions A1 A1 A2 A2 F An Bn AllPairs( A, B, F ) Custom Workflow Engine Cloud or Grid Compact Data Structure
All-Pairs Abstraction AllPairs( set A, set B, function F ) returns matrix M where M[i][j] = F( A[i], B[j] ) for all i,j A1 A2 A3 A1 A1 allpairs A B F.exe An AllPairs(A,B,F) B1 F F F B1 B1 Bn B2 F F F F B3 F F F
How Does the Abstraction Help? • The custom workflow engine: • Chooses right data transfer strategy. • Chooses the right number of resources. • Chooses blocking of functions into jobs. • Recovers from a larger number of failures. • Predicts overall runtime accurately. • All of these tasks are nearly impossible for arbitrary workloads, but are tractable (not trivial) to solve for a specific abstraction.
All-Pairs in Production • Our All-Pairs implementation has provided over 57 CPU-years of computation to the ND biometrics research group over the last year. • Largest run so far: 58,396 irises from the Face Recognition Grand Challenge. The largest experiment ever run on publically available data. • Competing biometric research relies on samples of 100-1000 images, which can miss important population effects. • Reduced computation time from 833 days to 10 days, making it feasible to repeat multiple times for a graduate thesis. (We can go faster yet.)
M[0,4] M[2,4] M[3,4] M[4,4] F x d y M[0,3] M[3,2] M[4,3] x F F x d y d y M[0,2] M[4,2] x F x F F x d y d y d y M[0,1] F F F F x x x x d y d y d y d y M[0,0] M[1,0] M[2,0] M[3,0] M[4,0] Wavefront( matrix M, function F(x,y,d) ) returns matrix M such that M[i,j] = F( M[i-1,j], M[I,j-1], M[i-1,j-1] ) Wavefront(M,F) M F
Applications of Wavefront • Bioinformatics: • Compute the alignment of two large DNA strings in order to find similarities between species. Existing tools do not scale up to complete DNA strings. • Economics: • Simulate the interaction between two competing firms, each of which has an effect on resource consumption and market price. E.g. When will we run out of oil? • Applies to any kind of optimization problem solvable with dynamic programming.
Problem: Dispatch Latency • Even with an infinite number of CPUs, dispatch latency controls the total execution time: O(n) in the best case. • However, job dispatch latency in an unloaded grid is about 30 seconds, which may outweigh the runtime of F. • Things get worse when queues are long! • Solution: Build a lightweight task dispatch system. (Idea from Falkon@UC)
1000s of workers Dispatched to the cloud worker worker worker worker worker worker queue tasks put F.exe put in.txt exec F.exe <in.txt >out.txt get out.txt wavefront engine work queue worker tasks done F In.txt out.txt
Problem: Performance Variation • Tasks can be delayed for many reasons: • Heterogeneous hardware. • Interference with disk/network. • Policy based suspension. • Any delayed task in Wavefront has a cascading effect on the rest of the workload. • Solution - Fast Abort:Keep statistics on task runtimes, and abort those that lie significantly outside the mean. Prefer to assign jobs to machines with a fast history.
Chemical Sequencing AGTCGATCGATCGAT Millions of “reads” 100s bytes long. TCGATAATCGATCCTAGCTA AGCTAGCTACGA Computational Assembly The Genome Assembly Problem AGTCGATCGATCGATAATCGATCCTAGCTAGCTACGA AGTCGATCGATCGAT TCGATAATCGATCCTAGCTA AGCTAGCTACGA
Some-Pairs Abstraction SomePairs( set A, list (i,j), function F(x,y) ) returns list of F( A[i], A[j] ) A1 A2 A3 A1 A1 An SomePairs(A,L,F) A1 F (1,2) (2,1) (2,3) (3,3) A2 F F F A3 F
Distributed Genome Assembly 100s of workers dispatched to Notre Dame, Purdue, and Wisconsin (1,2) (2,1) (2,3) (3,3) worker A1 worker A1 worker F An worker worker worker queue tasks detail of a single worker: put align.exe put in.txt exec F.exe <in.txt >out.txt get out.txt somepairs master work queue worker tasks done F in.txt out.txt