AWS Performance Tuning
Markus Albe @Percona Fernando Ipar @Percona Ryan Lowe @Square PLNY 2012
Amazon Web Services
• Cloud Formation
• CloudFront
• CloudSearch
• CloudWatch
• DirectConnect
• DynamoDB
• ec2
• ElastiCache
• Elastic Beanstalk
• Elastic MapReduce
• Glacier
• IAM
• RDS
• Route 53
• S3
• SES
• SNS
• SQS
• Storage Gateway
• SWF
• VPC
Amazon Web Services
• Cloud Formation
• CloudFront
• CloudSearch
• CloudWatch
• DirectConnect
• DynamoDB
• ec2
• ElastiCache
• Elastic Beanstalk
• Elastic MapReduce
• Glacier
• IAM
• RDS
• Route 53
• S3
• SES
• SNS
• SQS
• Storage Gateway
• SWF
• VPC
Amazon Web Services
• Cloud Formation
• CloudFront
• CloudSearch
• CloudWatch
• DirectConnect
• DynamoDB
• ec2
• ElastiCache
• Elastic Beanstalk
• Elastic MapReduce
• Glacier
• IAM
• RDS
• Route 53
• S3
• SES
• SNS
• SQS
• Storage Gateway
• SWF
• VPC
Amazon Web Services
• Cloud Formation
• CloudFront
• CloudSearch
• CloudWatch
• DirectConnect
• DynamoDB
• ec2
• ElastiCache
• Elastic Beanstalk
• Elastic MapReduce
• Glacier
• IAM
• RDS
• Route 53
• S3
• SES
• SNS
• SQS
• Storage Gateway
• SWF
• VPC
Amazon Web Services
• Cloud Formation
• CloudFront
• CloudSearch
• CloudWatch
• DirectConnect
• DynamoDB
• ec2
• ElastiCache
• Elastic Beanstalk
• Elastic MapReduce
• Glacier
• IAM
• RDS
• Route 53
• S3
• SES
• SNS
• SQS
• Storage Gateway
• SWF
• VPC
Amazon Web Services
• Cloud Formation
• CloudFront
• CloudSearch
• CloudWatch
• DirectConnect
• DynamoDB
• ec2
• ElastiCache
• Elastic Beanstalk
• Elastic MapReduce
• Glacier
• IAM
• RDS
• Route 53
• S3
• SES
• SNS
• SQS
• Storage Gateway
• SWF
• VPC
Amazon Web Services
• Cloud Formation
• CloudFront
• CloudSearch
• CloudWatch
• DirectConnect
• DynamoDB
• ec2
• ElastiCache
• Elastic Beanstalk
• Elastic MapReduce
• Glacier
• IAM
• RDS
• Route 53
• S3
• SES
• SNS
• SQS
• Storage Gateway
• SWF
• VPC
Amazon Web Services
• Cloud Formation
• CloudFront
• CloudSearch
• CloudWatch
• DirectConnect
• DynamoDB
• ec2
• ElastiCache
• Elastic Beanstalk
• Elastic MapReduce
• Glacier
• IAM
• RDS
• Route 53
• S3
• SES
• SNS
• SQS
• Storage Gateway
• SWF
• VPC
Amazon Web Services
• Cloud Formation
• CloudFront
• CloudSearch
• CloudWatch
• DirectConnect
• DynamoDB
• ec2
• ElastiCache
• Elastic Beanstalk
• Elastic MapReduce
• Glacier
• IAM
• RDS
• Route 53
• S3
• SES
• SNS
• SQS
• Storage Gateway
• SWF
• VPC
Amazon Web Services
• Cloud Formation
• CloudFront
• CloudSearch
• CloudWatch
• DirectConnect
• DynamoDB
• ec2
• ElastiCache
• Elastic Beanstalk
• Elastic MapReduce
• Glacier
• IAM
• RDS
• Route 53
• S3
• SES
• SNS
• SQS
• Storage Gateway
• SWF
• VPC
Regions & Availability
Zones
Regions
•
US (x3)•
EU (Ireland)•
APAC (x2)•
South America (Sao Paulo)•
GovCloud (US Gov’t & Contractors)AZ Differences
•
Performance Characteristics•
Hardware•
Pricing•
AvailabilityAZ Strategy
•
Multi-AZ Deployment•
Assume Entire AZs fail•
Smart Software•
Cost Optimizationec2
(Elastic Compute Cloud) ec2
•
The Cloud•
On-Demand computers with minimal administration•
Best for organizations with light uptime requirements, highly variable workloads,horizontally distributable data and/or little time/skill to manage hosts
ec2 Instance Types
•
Micro•
Small•
Medium•
Large•
X-XXXXL•
High-Memory•
Provisioned IOPS•
EBS•
SSDec2 Instance Pricing
•
Micro $0.025•
Small $0.105•
Large $0.415•
XL $0.830•
XXL $1.170•
XXXXL $2.340 ($1600/month)(Elastic Block Store) EBS
•
Persistent Data Storage•
Up to 1TB*•
Limited to single availability zone•
Automatic “Replication”•
Multiple EBS per ec2 InstanceEBS Pricing
• Standard EBS
• $0.10 per GB provisioned
• $0.10 per million IO
• Provisioned IOPs
• $0.125 per GB provisioned
• $0.10 per provisioned IOPS-month
• EBS Snapshots to S3
ec2 First Write Penalty
ec2 Hardware
•
Measured in Cores with Compute Units•
“One EC2 Compute Unit provides theequivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor”
•
Performance Highly Variable. Empirical evidence suggests > 1% unusable!ec2 Gotchas
•
Many organizations don’t know what their monthly bill will be until it’s too late.•
Overprovisioning•
Underprovisioning•
Forgetting mandatory maintenance•
Never testing restores16G 16T 8F [rw]/sec
(Large w/RAID10)
0 37500 75000 112500 150000
Random Reads Random R/W Random Writes Seq R Seq W
16G 16T 8F [rw]/sec
(Large w/EBS)
0 75000 150000 225000 300000
Random Reads Random R/W Random Writes Seq R Seq W
EBS vs. Hardware
IOPS
EBS RAID10 SSD SAN
Benchmark Scripts
•
https://launchpad.net/~vadim-tkRDS
RDS
(Relational Database Service)
•
SQL Server, MySQL, Oracle•
If you need “A relational database service with minimal administration”•
Best for organizations with light uptime requirements & little time/skill to manage databasesRDS Caveats
•
Mandatory 30-minute maintenance window PER WEEK•
Magic Backups•
Auto-Upgrade Minor Versions!RDS Performance
•
Relatively Sane Defaults•
Somewhat limited access to MySQL configuration variables•
Very close to the corresponding ec2 sizeMonitoring
Monitoring ec2
Monitoring Instances