Amazon RDS makes it easy to set up, operate, and scale relational databases in the cloud. The service offers a variety of options for optimizing the performance level delivered, as well as optimizing your spending. In this webinar, we will show a variety of techniques for implementing the right performance level for your application.
Learning Objectives:
• Understand the Amazon RDS options that change database performance and cost
• Select the appropriate performance and cost level for your specific application Who Should Attend:
• Technical Amazon RDS customers and prospective customers
4. Instance Selection
• RDS offers a wide range of instance classes
• Instance types differ on CPU, RAM, network
performance, EBS Optimized
• Base selection on
• Performance
• Cost (will differ based on type and region)
• Region (not all instance types available in all regions)
• Engine (not all instance types available for all engines)
• Elastically scale instance size up/down
5. Instance Selection: Current Generation
Instance Type vCPU Memory (GiB)
PIOPS-Optimized
Network Performance
Standard - Current Generation
db.m3.medium 1 3.75 - Moderate
db.m3.large 2 7.5 - Moderate
db.m3.xlarge 4 15 Yes Moderate
db.m3.2xlarge 8 30 Yes High
Memory optimized - current generation
db.r3.large 2 15 - Moderate
db.r3.xlarge 4 30.5 Yes Moderate
db.r3.2xlarge 8 61 Yes High
db.r3.4xlarge 16 122 Yes High
db.r3.8xlarge 32 244 - 10 Gigabit
Micro instances
db.t2.micro 1 1 - Low to Moderate
db.t2.small 1 2 - Low to Moderate
db.t2.medium 2 4 - Low to Moderate
7. Instance Selection
• Measure existing application workload
• Use native database engine tools – system tables, Oracle
Enterprise Manager, Statspack, SQL Server Tuning Advisor
• Use CloudWatch metrics
• Test and scale accordingly
8. What is General Purpose (SSD) Storage
• New EBS Volume Type - SSD Backed / Solid State Drive
• New Default Volume Type on RDS
• Available on all RDS DB Instance types and DB engines in all
Regions
• Flat, Per-Gigabyte Rate. No I/O Charges
• Volume bundles Baseline IOPS
• 1GB : 3 IOPS.
• Scales predictably, linearly, 10:30 ,100:300, 1TB:3K
• Burst Capable Volume
9. Sizing General Purpose (SSD) volume for
databases
• Calculate your required IOPS needed in steady state
• Provision the GB = (Steady state IOPS) ÷ 3
• For example, customer requiring1500 steady state IOPS
• Provision 1500 ÷ 3 = 500 GB
• IO bursts will support
• Database load or table scan operations
• Spike in IO workload
10. Provisioned IOPS
• Provisioned IOPS storage is a storage option that delivers fast,
predictable, and consistent throughput performance
• When fast and consistent I/O performance required
• Optimized for I/O intensive, online transaction processing
(OLTP) workloads that have consistent performance
requirements
• Important: Recommended for random reads and writes and not
sequential workloads
11. Activities that Impact Storage Performance
• Nightly backups
• There is no additional charge for backup storage up to 100%
of your provisioned database storage for an active DB
Instance
• Perform these tasks during your maintenance window
• DB snapshot creation
• Single-AZ to Multi-AZ modification
• Read replica creation
12. Caveats
• Allocated storage and provisioned storage can be modified
• Scaling Storage operations can impact performance until new
allocation is finished
• Except for SQL Server
• Export data
• Create new DB instance with larger storage
• Import data
• Initially size SQL Server storage for future growth to avoid this
13. Burst mode – GP2 & T2
GP2 – SSD based Amazon EBS storage
• 3 IOPS per GB base performance
• Earn credits when usage below base
• Burst to 3000+ IOPS
T2 – Amazon EC2 instance with burst capability
• Base performance + burst
• Earn credits per hour when below base performance
• Can store up to 24 hours worth of credits
• Amazon CloudWatch metrics to see credits & usage
22. How to scale with Amazon RDS
• Scale up or down with resizable instance types
• CPU to 32 vCPUs, RAM to 244 GiB
• Scale your storage up with a few clicks
• Scale while online
• Easy conversion from standard to Provisioned IOPS storage
• Put a cache in front of Amazon RDS
• Amazon ElastiCache for Memcached or Redis
• Or your favorite cache, self-managed in Amazon EC2
• Offload read traffic to Read Replicas
30. CloudWatch
• Monitor AWS resources in real-time
• Collect and track metrics
• Metrics data provide visibility into performance, storage,
number of database connections, etc.
• Send notifications based on the monitoring rules that you
define
31. CloudWatch Alert Options
• RDS Metrics
• CPU Utilization - Track the percentage of CPU utilization
• Free Storage Space – Track available storage space
• Free Memory – Amount of Available RAM
• Database Connections – Number of databases connections
in use
32. CloudWatch Alert Options
• RDS Metrics
• IOPS – Number of IO operations completed per second
• Latency – Elapsed time between the submission of an I/O and
it’s submission.
• Throughput – Number of bytes per second transferred to or from
disk
• Queue Depth – Number of I/O requests in the queue waiting to
be serviced
33. CloudWatch Alert Options
• Queue Depth – Number of I/O requests in the queue waiting
to be serviced
• Queue depth of 5 for every 1000 IOPS
• If less, not enough I/O generated
• If more, you may want to increase IOPS
34. CloudWatch Alert Options
Metric Actions
CPU Utilization Scale Compute
Freeable Space Scale Storage Up
Freeable Memory and Swap Usage Scale Compute
Write Latency Add Provisioned IOPS
DB Connections Check connection pooling