SQL Server in the AWS Cloud

43
SQL Server in the AWS Cloud

description

PP slides for a presentation for the Queensland SQL Server User Group that covered application candidates/use cases, SQL performance considerations including road tests of new SQL 2014 performance features on AWS EC2 instances, security, HA/DR and licensing.

Transcript of SQL Server in the AWS Cloud

Page 1: SQL Server in the AWS Cloud

SQL Server in the

AWS Cloud

Page 2: SQL Server in the AWS Cloud

Who Are We

Leading provider of SQL Server services to Corporate and Government clients.

We have a team of experienced, Microsoft certified SQL Server professionals that are passionate about the SQL Server technology suite.

Rob Risetto – Technical Director [email protected] 0417 322 000 www.dbinsight.com.au

Page 3: SQL Server in the AWS Cloud

Agenda

• Application candidates and use cases• AWS building blocks for SQL• Performance considerations• SQL Server 2014 and AWS• Security• High Availability• SQL Backups• Pricing and SQL Licensing

Page 4: SQL Server in the AWS Cloud

Amazon Web Services (AWS)

Page 5: SQL Server in the AWS Cloud

Application Candidates

Web applications with minimal links

Page 6: SQL Server in the AWS Cloud

Application Candidates

Applications with varying workloads

Page 7: SQL Server in the AWS Cloud

Application Candidates

Applications with varying workloads

Page 8: SQL Server in the AWS Cloud

Application Candidates

Applications that require Global Scale

Page 9: SQL Server in the AWS Cloud

Use Cases

Disaster Recovery Site for On-Premise

Page 10: SQL Server in the AWS Cloud

Use Cases

Replacement of end of life server hardware

Page 11: SQL Server in the AWS Cloud

Use Cases

Offsite Backups to AWS S3 storage.

Page 12: SQL Server in the AWS Cloud

Use Cases

• Deployment of new “greenfield” solution – Not sure of resources required

• New Online service/product • – Uncertain if it will succeed in the market

• Fast provisioning for a proof of concept

• Require development/test servers to be provisioned at short notice or for limited periods of time.

• User training – run up a temporary training environment

Page 13: SQL Server in the AWS Cloud

AWS Terms & Components

• EC2 instance – AWS virtual machine

• EBS – Elastic Block Store – persistent disk storage• Standard vs Provisioned IOPS

• S3 – simple storage service– durable object storage

• Glacier – long term archive storage

Page 14: SQL Server in the AWS Cloud

AWS Terms & Components

• VPC – Virtual Private Cloud – isolate your VMs into your own network

• RDS – Relational Database Service – kind of a managed service for database server

• Availability zone (AZ) – data centre in a geographical region

• Region – AWS location that houses 1 or more AZs

Page 15: SQL Server in the AWS Cloud

AWS Terms & Components

Lets have a look at the AWS Management Console and review the components

Page 16: SQL Server in the AWS Cloud

AWS Performance Considerations

Noisy Neighbours – Physical host shared by multiple VMs

Page 17: SQL Server in the AWS Cloud

AWS Performance Considerations

• EBS Volumes – network attached disks

• Standard EC2 instances - allows from 32 to 128 MB/sec- Aligns with 1 Gbit network card

• Higher End EC2 instance allows up to 800 MB/sec- Aligns with 10 Gbit network card

• Consider Placement Groups – group EC2 instances to maximise node to node communications. High end instances only

Page 18: SQL Server in the AWS Cloud

AWS Performance Considerations

Use EBS Optimised instances - dedicated capacity for EBS I/O

Page 19: SQL Server in the AWS Cloud

AWS Performance Considerations

• EBS Volume Types

• Provisioned IOPS - delivers within 10 % of the provisioned IOPS performance 99.9 % of the time over a given year

- up to 4000/sec 16 KB, or 2000/sec x 32 KB or 1000/sec x 64 KB IO.

• Standard – 100/sec with burst into the 100s/sec

• First touch penalty – 5 to 50 % - write to each block or full format

Page 20: SQL Server in the AWS Cloud

AWS Performance Considerations

• Provisioned IOPS• Needs EBS optimised instance to ensure rate• Drive enough IOs/sec – keep queue length around 5• Good for high IO needs of Data or Transaction log files

• Standard EBS• Use if IO workload is not high – < 100 or so/sec • Use for local backup

Page 21: SQL Server in the AWS Cloud

AWS Performance Considerations

• Software Raid EBS for bigger volumes and performance – Raid 0 or Raid 1

• Windows instances – use Red Hat or Citrix paravirtual (PV) drivers – max 25 EBS volumes if using Citrix driver

– Otherwise 16 EBS volumes

• EBS is block replicated in the AZ to avoid downtime

• Use local EC2 instance storage for TempDB

Page 22: SQL Server in the AWS Cloud

AWS Terms & Components

SQLIO Tests on m1.xLarge instance4 x CPUs, 15 GB RAM, EBS Optimised - 128 MB/sec

1 EBS, Raid 2xEBS, 4xEBS, 8xEBS

Graphs test data courtesy of David Tan!

Page 23: SQL Server in the AWS Cloud

AWS Performance Considerations

EBS Configuration Performance Summary

Page 24: SQL Server in the AWS Cloud

AWS Performance Considerations

EBS Configuration Performance Summary

Page 25: SQL Server in the AWS Cloud

SQL 2014 Performance on AWS

In Memory OLTP challenge – xLarge vs Large EC2 instance

• xLarge - 4 CPUs, 15 GB RAM, data/tlog disk -> 3000 PIOPS EBS volume

• Large – 2 CPUs, 7 GB RAM, data/tlog disk -> Standard EBS volume

Used Codeplex sample to run Disk Based and In Memory OLTP testshttp://msftdbprodsamples.codeplex.com/releases/view/114491

ostress.exe -S.\sql2014 -E -dAdventureWorks2012 -Q"EXEC Demo.usp_DemoInsertSalesOrders @use_inmem = 1, @order_count=10000" –n100

Page 26: SQL Server in the AWS Cloud

AWS Performance Considerations

SQL Server 2014 – Performance Features on AWS

Page 27: SQL Server in the AWS Cloud

SQL 2014 Performance on AWS

Buffer Pool Extension Challenge – OLTP and DW workload Improvement??

Test environment :-

• C3.Large instance, 2 CPUs, 3.75 GB RAM, 2 x 16 GB SSD local storage

• HammerDB www.hammerora.sourceforge.net to generate OLTP and DW workload

• Ran tests with and without BPE• Ran DW test with 1 Query set of 22 queries – compared Elapsed time• Ran OLTP test for 5 minutes – compared Transaction Rate/sec

Page 28: SQL Server in the AWS Cloud

SQL 2014 Performance on AWS

Buffer Pool Extension Feature

Page 29: SQL Server in the AWS Cloud

SQL 2014 Performance on AWS

Buffer Pool Extension Feature

-- Enable BPEALTER SERVER CONFIGURATION SET BUFFER POOL EXTENSION ON (FILENAME = 'Z:\SQLBPE\SQLSSDCache.BPE', SIZE = 10 GB)

-- Check BPE statusSELECT * FROM sys.dm_os_buffer_pool_extension_configuration

-- Check if any pages in BPESELECT * FROM sys.dm_os_buffer_descriptors

-- Disable BPEALTER SERVER CONFIGURATION SET BUFFER POOL EXTENSION Off

Page 30: SQL Server in the AWS Cloud

SQL 2014 Performance on AWS

Buffer Pool Challenge – DW workload Improvement

Page 31: SQL Server in the AWS Cloud

SQL 2014 Performance on AWS

Buffer Pool Challenge – OLTP workload – no benefit

Page 32: SQL Server in the AWS Cloud

AWS Security for SQL Server

Virtual Private Cloud (VPC) – logically isolated network, private/public subnets

Page 33: SQL Server in the AWS Cloud

AWS Security for SQL Server

Security Groups – inbound network firewalls for EC2 instances

Specify protocols, ports and source IPs or other Security groups to reach a EC2 Instance

Page 34: SQL Server in the AWS Cloud

AWS Security for SQL Server

AWS Security Layers

Page 35: SQL Server in the AWS Cloud

SQL Server High Availability Options

SQL Server High Availability Options• Log Shipping• Replication• Database Mirroring• Availability Groups• Native Windows/SQL Cluster NOT POSSIBLE• 3rd Party Windows Clustering software using

- WSFC- Block level replication

Page 36: SQL Server in the AWS Cloud

SQL Server High Availability Options

SteelEye DataKeeper Clustered Edition- WSFC, No shared disk, works on SQL Standard Edition- Block level replication, compression, SQL Cluster Failover

http://us.sios.com/windows-replication-availability-software-smb Youtube video http://www.youtube.com/watch?v=giEg68Ori9M

Page 37: SQL Server in the AWS Cloud

SQL Server High Availability Options

• Separate Primary and Secondary in separate Availability Zones

• Also useful to failover for maintenance or noisy neighbour issues

Page 38: SQL Server in the AWS Cloud

SQL Server High Availability Options

Challenge – On Premise to AWS Availability Group

• Two SQL Servers in separate Availability Zones• Third SQL Server located at DBInsight Office• Use AWS VPN endpoint• Create Customer VPN Gateway• Use on premise Router/ADSL equipment – cost less than $200

- Microtik RB951 routerboard- TP Link 8840 T ADSL Modem Router

Page 39: SQL Server in the AWS Cloud

SQL Server High Availability Options

Challenge – On Premise to AWS Availability Group

AWS Whitepaper http://aws.amazon.com/whitepapers/microsoft-wsfc-sql-alwayson/

Cloudformation template used for based configuration installation

Page 40: SQL Server in the AWS Cloud

SQL Server Backups

Standard SQL Backup Configuration

Use SQL Server 2014 backup encryption for extra protection on the EBS volume.

Create Snapshot of system EBS volume, stored on S3 automatically.

Page 41: SQL Server in the AWS Cloud

SQL Server Licensing

• SPLA type licensing – license built into EC2 hourly cost• Express edition (free)• Web edition• Standard edition

• BYO – Need SA for Mobility Rights

• BizSpark Program for start ups

Page 42: SQL Server in the AWS Cloud

AWS Pricing

• AWS has pricing on their web site – refer to the correct region

• EC2 Instance pricing- On – Demand instance- Reserved Instance

• AWS Online calculator http://calculator.s3.amazonaws.com/calc5.html

Page 43: SQL Server in the AWS Cloud

DBInsight Contact Details

Rob Risetto0417 322 000 [email protected] www.dbinsight.com.au

Take Cloud Readiness Survey – Get 1 hour free consultationhttp://dbinsight.com.au/dbinsight/consulting/sql-in-the-cloud/cloud-readiness-assessment

Free 14 day trial SQL Server Cloud Monitoringhttp://dbinsight.com.au/dbinsight/dbinsight-monitor