• No results found

Migrating a (Large) Science Database to the Cloud

N/A
N/A
Protected

Academic year: 2021

Share "Migrating a (Large) Science Database to the Cloud"

Copied!
25
0
0

Loading.... (view fulltext now)

Full text

(1)

Ani Thakar

Alex Szalay

Center for Astrophysical Sciences and

Institute for Data Intensive Engineering and Science (IDIES) The Johns Hopkins University

Migrating a

(Large) Science Database

to the Cloud

(2)

Motivation

• Exponential growth in scientific data size

– Astronomy no exception, SDSS leading the way

• Large scientific databases in the cloud

– “large” = multi-TB , “database” = SQL Server

– On-demand resources very attractive to scientists

• Don’t want to become FT data managers

• Most projects don’t have have deep IT pockets

• Focus on migrating data in this talk

– Is it easy? Is it even possible?

– Performance evaluation premature at best – Economics even more so

(3)

Data Avalanche in Astronomy

• Moore’s Law squared

• 2009 Physics Nobels:

– CCD technology

– Optical fiber technology

• Both were critical for

SDSS, new generation

of astronomy surveys

• SDSS now

• Pan-STARRS next

• LSST later

50x SDSS, 100 TB

One SDSS every 2-3 nights, PBs

few TB

(4)

Cloudy with a chance of … pain?

• Can entire DB be moved to the cloud as is?

• Restrictions on data size

– For now, use subset of original database – In future, will have to partition the data first

• Migrating the data to the cloud

– How to copy data into the cloud?

– Will it need to be extracted from the DBMS? – Will schema have to be modified?

– Will science functionality be compromised? – What about query performance?

(5)

Cloud Experiments

• Dataset

– Sloan Digital Sky Survey (SDSS) – Public dataset, no restrictions

– Reasonably complex schema, usage model – Easy to generate subset of arbitrary size – Only available as SQL Server database

• Clouds

– Amazon Elastic Cloud 2 (EC2)

• AWS wanted to host public SDSS dataset

– Microsoft Azure

(6)

The Sloan Digital Sky Survey

• Largest astronomy archive to date

– Digital mapping of quarter of sky

• 10000 sq. degrees, 5 wavelength bands

– Dedicated 2.5m telescope (APO, NM) – 40 TB raw data

– International collaboration

– Funded by: Sloan Foundation, NSF, NASA, DOE …

• Final data release: DR7 (Oct 31, 2008)

– 357M objects (180M stars, 175M galaxies)

– 1.6M spectra (~ 1M galaxies, 500k stars, 120k QSOs)

• Extracted catalog science archive: 5 TB

– SDSS Catalog Archive Server (CAS)

• Microsoft SQL Server DBMS

– SkyServer Web Interface

www.sdss.org

(7)
(8)

SDSS UDFs and SPs

• 190 user-defined functions(UDFs)

– Utility (coordinated conversions, etc.)

– Spatial search (invoke HTM indexing primitives) – UI (Schema Browser, Help pages, etc.)

– Specialty (region algebra, cosmology, etc.) – Admin (not accessible to Web users)

• 135 stored procedures (SPs)

– Mostly admin SPs (~ 100)

– Some user accessible SPs for nearest neighbor searches, special queries etc.

(9)

Migrating data to Amazon EC2

• 1 TB data size limit (per instance)

• SDSS DR6 100 GB subset: BestDR6_100GB

– Actually more like 150 GB

– Large enough for performance tests, small enough to be migrated in a few days/weeks

• Several manual steps to create DB

instance

• Could not connect to DB from outside

• Preliminary performance test, but without

optimizing within cloud

(10)

SDSS public dataset on EC2

• Public datasets on Amazon

– Stored as snapshot available on AWS – Advertised on AWS blog

– Anyone can pull into their account

• Data is free, but not the usage

– Create a running instance

– Multiple instances deployed manually

• First SQL Server dataset on EC2 (?)

– AWS also created a LINUX snapshot of SQL Server DB!

(11)

AWS Blog Entry

(12)

How it’s supposed to work

• With other db dumps, assumption is that users

will set up their own DB and import the data

• Public SDSS dataset to serve two kinds of

users:

a) People who currently access the SDSS CAS

b) General AWS users who are interested in the data

• For a), should be able to replicate the same

services that SDSS currently has, but using a

SQL Server instance on EC2

• For b), users should have everything they need

on the AWS public dataset page for SDSS

(13)

Steps to create DB in EC2

• Create “snapshot” of database first

• Create storage for DB: 200 GB EBS volume

– Instantiate snapshot as volume of required size

• Create SQL Server 2005 Amazon Machine

Image (AMI)

– AMI instance from snapshot

• Attach AMI instance to EBS volume

– Creates running instance of DB

(14)

Steps to create Web interface

• Create volume (small) with win2003

• Create instance with Win 2003 AMI (only

IIS, no SQL Server)

• Attach volume to instance

• Get public DNS, admin account

• BUT … couldn’t connect to SQL Server IP

• So outside world cannot connect to the

(15)

Steps to Create DB Server

Amazon EC2

AWS Management Console Create EBS Volume 200 GB Volume Select AMI Attach Instance Create Instance Create Elastic IP SDSS DB Server

Repeat for each instance of DB server

(16)

• GrayWulf vs EC2

• 35 test queries

– Run 3 times

– Measure CPU/elapsed time, phys. IO, #rows

• Compare performance on Graywulf node

– Virtualization and/or infrastructure?

– Bottom line: 1.5h on GW node, 13h on EC2

• Cost on Amazon

– Large volume SQL Server instance: ~ $500 – Charged for as long as instance is active

Comparing Cost & Performance

0 1 2 3 4 5 6 7 8 0 200 400 600 800 1000 1200 GW_CPU GW_Elapsed EC2_CPU EC2_Elapsed log(GW_IO) log(EC2_IO)

(17)
(18)

Migrating data to Microsoft Azure

• 10 GB data size limit (

50 GB last week!)

• SDSS DR6 10 GB subset: BestDR6_10GB

• Two ways to migrate database

– Script it out of source db (very painful)

• Many options to select

• Runs out of memory on server!

– Use SQL Azure Migration Wizard (much better!)

• Runs for few hours

• Produces huge trace of errors, many items skipped • But does produce a working db in Azure

(19)
(20)

Unsupported MS-SQL features

• No references to other databases

– Can’t run command (including SQL) scripts from Master DB

• Global temp objects disallowed

– Can’t use performance counters in test query suite

– Difficult to benchmark and compare performance

• SQL-CLR function bindings not supported

– Can’t use our HTM spatial indexing library – Makes spatial searches much slower

(21)

Unsupported MS-SQL features

• T-SQL directives

– e.g., to set the level of parallelism

• Built-in T-SQL functions

– Probably can do without these for now – More for convenience

• Deprecated features

(22)

Azure sign of success?

• Ok, so data in Azure, but at what cost?!

– Meaningful performance comparison not possible

– Dataset too small

– Schema features stripped

– No spatial index, so many queries crippled

• Connected to Azure DB from outside cloud

– Hooked up SkyServer WI

– Connected with SQL Server client (SSMS) – Ran simple queries from both

(23)

Conclusions

• Migrating scientific databases to the

cloud not really possible at the moment

• Even migrating smaller DBs can be painful

– Several steps to deploy each copy

– Cloud may not support full functionality – Problems limited to SQL Server DBs?

• Large DBs will have to be partitioned

– Set up distributed databases in the cloud – Query distributed databases from outside

(24)

“The one who says it can’t be done should

never stop the one who’s doing it.”

Anon.

(25)

References

Related documents

In this task you will install the MySQL Administration tools, connect to the MySQL Server Instance, create a Database Schema for Novell Service Desk and then create a user who will

Sample your email with mongo sandbox document create schema create a model that process as a database means the model immediately in a way for data.. physical properties of lemon

a) Click Create an AWS Account. b) After creating the account, select Amazon Elastic Compute Cloud.. c) On the Elastic Compute Cloud page, click Sign Up for Amazon EC2. d)

If you choose the option ‘Create a new database on a different SQL Server’, you will need to provide information on the SQL Server instance you wish to create the database on..

Launch the iStorage Server Management Console, press the Create button on the toolbar of iStorage Server Management Console, the Create iSCSI Target Wizard will be shown as

Control Service RHA Console Master Server(s) (Source) Master Server Volume(s) Appliance Instance (Running). EBS volume(s) with Master

With Sybase SQL Anywhere the Xpert.ivy Server Configuration program will not create a new database instance for Xpert.ivy Server instead it will create only the necessary tables

The scope of services covered in this report includes AWS CloudHSM, AWS Direct Connect, Amazon DynamoDB, Amazon Elastic Block Store (EBS), Amazon Elastic Cloud Compute (EC2),