0% found this document useful (0 votes)
19 views34 pages

EV - Under The Hood How To Run Oracle Databases On Aws - Mar 2021

The document outlines how to effectively run Oracle databases on AWS, covering topics such as scaling RDS for performance, high availability, disaster recovery, and best practices for migration. It emphasizes the complexities of managing relational databases and presents Amazon RDS as a managed solution with various configurations and tools for migration. Key features include automated backups, performance monitoring, and options for high availability through Multi-AZ architecture.

Uploaded by

cecil.strydom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views34 pages

EV - Under The Hood How To Run Oracle Databases On Aws - Mar 2021

The document outlines how to effectively run Oracle databases on AWS, covering topics such as scaling RDS for performance, high availability, disaster recovery, and best practices for migration. It emphasizes the complexities of managing relational databases and presents Amazon RDS as a managed solution with various configurations and tools for migration. Key features include automated backups, performance monitoring, and options for high availability through Multi-AZ architecture.

Uploaded by

cecil.strydom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Under the hood: How to run

your Oracle databases on


AWS
Nathan Fuzi, Sr. Database Solutions Architect

© 2021, Amazon Web Services, Inc. or its Affiliates.


Agenda

• Running Oracle workloads on AWS


• Scaling RDS for Oracle performance
• High Availability and Disaster Recovery
• Migrating to RDS for Oracle
• RDS for Oracle best practices

© 2021, Amazon Web Services, Inc. or its Affiliates.


Meet Your Presenter

Nathan Fuzi
Sr. Oracle Database Specialist SA

• 4 years with AWS

• 20+ years working with Oracle


Database and related
technologies

© 2021, Amazon Web Services, Inc. or its Affiliates.


Running Oracle workloads
on AWS

© 2021, Amazon Web Services, Inc. or its Affiliates.


Relational databases are complex

Our experience running Amazon.com


taught us that relational databases are
challenging to manage and operate
with high availability.

It’s expensive and complex to


manage administrative functions
including regular patching cycles,
performance optimization, and
backup and disaster recovery—all for
constantly changing applications.

© 2021, Amazon Web Services, Inc. or its Affiliates.


Amazon Relational Database Service
Managed relational database service with a choice of six popular
database engines

MicroSoft
MySQL PostgreSQL MariaDB SQLServer Oracle

Easy to Secure &


Available & durable Performant & scalable
administer compliant

Easily deploy and Data encryption at rest Automatic Multi-AZ Scale compute
maintain hardware, OS and in transit; industry data replication; and storage with a few
and DB software; built- compliance and automated backup, clicks; minimal downtime for
in monitoring assurance programs snapshots, failover your application

© 2021, Amazon Web Services, Inc. or its Affiliates.


Amazon Relational Database Service

On-premises Amazon EC2 Amazon RDS

© 2021, Amazon Web Services, Inc. or its Affiliates.


When to choose to run Oracle on Amazon EC2

• You run a configuration outside what RDS can support


• Storage configuration
• DB size or performance
• Third party backup or replication solution

• You need a feature that RDS does not support


• Operating System access
• Specific database features

• You run a specific version outside what is available in RDS


• Specific version or patches
• Avoiding software patches

© 2021, Amazon Web Services, Inc. or its Affiliates.


Choosing the best RDS solution for your needs

Amazon RDS for Oracle Amazon RDS for Oracle


License Included (LI) Bring Your Own License
(BYOL)

• Oracle SE1 and SE2 • SE1, SE2 and EE

• No need to purchase • Bring your own licenses


Oracle licenses from and support from Oracle
Oracle
• Call Oracle for Oracle
• Support is handled database support
through AWS

© 2021, Amazon Web Services, Inc. or its Affiliates.


Scaling RDS for Oracle
Performance

© 2021, Amazon Web Services, Inc. or its Affiliates.


RDS performance factors

RDS DB Instance Class

Compute Memory Network Storage


Capabilities Capabilities Performance Performance
vCPUs GB of RAM MB/s I/O Performance
(Throughput)
RDS Storage Type

© 2021, Amazon Web Services, Inc. or its Affiliates.


Scaling compute and storage

✓ Nearly 100 RDS instance class and size options

✓ Processing power: 1 vCPU up to 128 vCPUs

✓ Memory size: 1 GiB up to 3,904 GiB

✓ Storage from 20 GB to 64 TB and baseline IOPS from 60 to 80,000

✓ Dedicated storage bandwidth up to 19,000 Mbps

✓ Network performance up to 25 Gbps

© 2021, Amazon Web Services, Inc. or its Affiliates.


Monitoring Amazon RDS for Oracle databases

Amazon CloudWatch metrics


• CPU / Storage / Memory
• Swap usage
• I/O (read and write)
• Latency (read and write)
• Throughput (read and write)
• Replica lag

Amazon CloudWatch Alarms


• Similar to on-premises monitoring tools

Enhanced Monitoring for Amazon RDS


• Access to over 50 CPU, memory, file system,
and disk I/O metrics
• As low as 1 second intervals

Integration with 3rd Party Monitoring Tools


© 2021, Amazon Web Services, Inc. or its Affiliates.
Performance Insights for real-time analysis

Amazon RDS Performance Insights


measures database load over time

Easy to identify database


bottlenecks
• Top SQL/most intensive queries

Enables problem discovery for real


time or historical analysis

Adjustable timeframe
• Hour, day, week, and longer

Available for all Amazon RDS


database engines
© 2021, Amazon Web Services, Inc. or its Affiliates.
Scaling for read-heavy workloads

Region Region

Read/Write Read-only Read-only


workload workloads workload

Oracle Data Guard asynchronous


Source database replication

✓ Up to five replicas per source RDS instance, in same region or cross-region


✓ Scale out or back, and size each replica instance independently
✓ Replicas may be mounted or available for reads (Active Data Guard)
✓ Promote replica as new standalone database
✓ Source has no downtime during creation or promotion
© 2021, Amazon Web Services, Inc. or its Affiliates.
High Availability and
Disaster Recovery

© 2021, Amazon Web Services, Inc. or its Affiliates.


Availability and recoverability

Recovery Point Objective (RPO) and Recovery Time Objective (RTO):

RPO (potential data loss) RTO (outage time)

Point of failure

Most recent backup

© 2021, Amazon Web Services, Inc. or its Affiliates.


RDS HA / DR comparison

Feature RPO (approx) RTO (approx) Licensing


Multi-AZ for high availability 0 1 to 2 minutes
Snapshot restore Hours < 1 hour
All editions
Point-in-time restore (cross-region) 25 minutes Hours
Point-in-time restore (in-region) 5 minutes Hours
Mounted replica promotion (in-region) Minutes Minutes
Enterprise
Mounted replica promotion (cross-region) Minutes Minutes edition
Read replica promotion (in-region) Minutes Minutes
EE + Active
Read replica promotion (cross-region) Minutes Minutes DataGuard

© 2021, Amazon Web Services, Inc. or its Affiliates.


RDS Multi-AZ architecture

Multi-AZ Key Aspects Database


DNS
Application

• Compute instances manage


synchronous storage replication
Availability Zone Availability Zone

• Writes occur on both instances


and storage; reads only from
Primary EC2 #1 EC2 #2

• Failover results in changing roles


(Primary, Standby) and re-
establishing Standby
EBS #1 EBS #2

• Snapshots taken from Standby


© 2021, Amazon Web Services, Inc. or its Affiliates.
RDS for Oracle - Backups
Region

Automated backups Availability Zone Availability Zone

• Daily snapshot during backup


window
• Redo logs to S3 every 5 minutes
• Retained 1-35 days

Manual backups
• Take a snapshot any time EBS snapshot

Redo logs (5 minutes) Snapshot (daily)


• Kept until you delete

© 2021, Amazon Web Services, Inc. or its Affiliates.


RDS for Oracle – Restore from snapshot

Functionality
• Restore from any snapshot
Original
• Copy snapshots to other instance
regions or accounts

Use cases RestoreDBInstance


FromDBSnapshot
• Refresh test environments
• Test upgrades and changes
Snapshot
New instance
• Instantiate logical replicas

© 2021, Amazon Web Services, Inc. or its Affiliates.


RDS for Oracle – Restore to a point in time

Functionality

• Restore to any second in


backup retention Original
instance
• Available in-region/account
• Latest restorable time
typically < 5 minutes
RestoreDBInstance
ToPointInTime
Use cases

• Oops… I dropped a table Snapshot


New instance
• Recover from application
errors or logical corruption Archived logs

© 2021, Amazon Web Services, Inc. or its Affiliates.


RDS for Oracle – Cross region automated backups

Cross-Region Key Aspects


Region Region

• Automated snapshots and


archived redo logs replicated to
target region as soon as available
in source region
• Specify independent recovery
window for replicated backup
region
• Enables Point In Time Restore Redo logs EBS snapshot Redo logs EBS snapshot

(PiTR) in second region for


mission-critical databases
© 2021, Amazon Web Services, Inc. or its Affiliates.
RDS for Oracle – Backup and restore best practices

✓ Disable backups for data load (NOARCHIVELOG mode)


• WARNING: deletes existing automated backups

✓ Enable backups for critical workloads (ARCHIVELOG


mode)

✓ Set backup window to low-usage time

✓ Take manual snapshots to reduce PiTR replay duration

✓ Use restores to test upgrades/parameters/app changes

✓ Copy snapshots to other accounts/regions

© 2021, Amazon Web Services, Inc. or its Affiliates.


RDS for Oracle – Replicas for resiliency

Region Region

VPC VPC

Availability Zone Availability Zone

Security group Security group


Replica

Any replica
Secondary
Replica
may also be
Availability Zone Availability Zone deployed in a
Multi-AZ
Security group Security group configuration
Replica
Primary
Source Replica

© 2021, Amazon Web Services, Inc. or its Affiliates.


Migrating to RDS for Oracle

© 2021, Amazon Web Services, Inc. or its Affiliates.


Migrating Oracle databases to AWS

• Tools available for both Oracle on EC2 and RDS for Oracle:
• Oracle Data Pump
• Oracle Export/Import Utility
• Oracle Materialized Views
• Oracle GoldenGate
• SQL*Loader
• Amazon Database Migration Service (DMS)

• Tools available for Oracle on EC2 only:


• RMAN restore and duplicate database
• File system sync or other datafile file transfer method
© 2021, Amazon Web Services, Inc. or its Affiliates.
Amazon Database Migration Service

• Performs logical replication of source to target database


• Many source-target scenarios supported
• On-premises → Oracle on EC2 → RDS → On-premises
• Etc.
• Homogenous and heterogeneous migrations
• Oracle → Oracle
• Oracle → PostgreSQL
• Microsoft SQL Server → MySQL
• Etc.
• Heterogeneous migrations enabled using AWS Schema Conversion Tool
© 2021, Amazon Web Services, Inc. or its Affiliates.
Migrating with Oracle Data Pump and DMS

AWS Cloud
1

DataPump Export

VPC
Corporate
data center

Availability Zone
Private subnet

Security group Security group

2
Replication instance Oracle
instance

3
Oracle DB

© 2021, Amazon Web Services, Inc. or its Affiliates.


RDS for Oracle
Best Practices

© 2021, Amazon Web Services, Inc. or its Affiliates.


RDS for Oracle best practices

✓ Run only as big a configuration as you need


• vCPU, memory, storage type, IOPS, network bandwidth
• Consider burstable instance types (t2, t3)
• Don’t forget you can scale down too
• Consider Standard Edition vs Enterprise Edition
• Remember: You license compute, not storage or memory

✓ Size instance storage appropriately for initial load


• Storage autoscaling is great for steady-state operations

✓ Storage modification throttling considerations


• One storage change every 6 hours – includes autoscaling

© 2021, Amazon Web Services, Inc. or its Affiliates.


RDS for Oracle best practices

✓ Troubleshooting performance issues, identifying bottlenecks


• Use available tools: CloudWatch, Enhanced Monitoring,
Performance Insights, AWR / Statspack reports

✓ Instance restore performance considerations


• Restore is optimized for availability and loads lazily

✓ DBA role changes and expectations


• Offload tedious tasks, spend more time at application layer

© 2021, Amazon Web Services, Inc. or its Affiliates.


Rethinking Standard Edition

✓ High availability with RDS Multi-AZ


• Synchronous replication and automated failover – 99.95% uptime SLA
• Independent infrastructure

✓ Disaster Recovery with RDS Cross-region Automated Backups


• Automatically copies snapshots and transactions logs to other region
• Issue a point-in-time restore from target region in the event of disaster

✓ RDS Storage encryption with Amazon KMS


• AES-256 encryption at rest
• Bring your own keys

✓ Tuning with RDS Enhanced Monitoring and Performance Insights


• Per-process host metrics, granularity down to 1 second
• Analyze database load and active sessions: real-time and historical
© 2021, Amazon Web Services, Inc. or its Affiliates.
Q&A
Nathan Fuzi

© 2021, Amazon Web Services, Inc. or its Affiliates.

You might also like