Professional Documents
Culture Documents
DB ASM Overview
DB ASM Overview
Computing Architecture
• Oracle Database is a leading Database product
• The architecture of an Oracle Database is built
on basic Computing Architecture
• Every Computer has many components, out of
them, the 3 main resources are
– CPU
– Memory ( RAM)
– Storage
Computing Architecture
• The 3 main resources of COMPUTER
Computing are shown in
the diagram MEMORY (RAM)
• The characteristics of
these components are CPU
discussed in the next
few slides
STORAGE
1
11/22/2021
Computing Architecture
STORAGE COMPUTER
Computing Architecture
MEMORY COMPUTER
Computing Architecture
CPU COMPUTER
STORAGE
2
11/22/2021
Computing Architecture
MEMORY COMPUTER
• Changes made in
MEMORY (RAM)
MEMORY have to be
written back to
STORAGE to persist the CPU
changes ( Make them
permanent)
STORAGE
• e.g. /u01/app/oracle/product/12.1.0/db_home
3
11/22/2021
4
11/22/2021
5
11/22/2021
6
11/22/2021
Non-CDB Architecture
• Each Database has a SYSTEM tablespace which
has all the Oracle Supplied Metadata / Code
• The SYSTEM Tablespace also has User Metadata
for Objects created by the users
• Data(rows) for Tables created by Non-CDB
System
users typically sits in User created Tablespace
Tablespaces
• PL/SQL is in SYSTEM Tbs1 Tbs2 Tbs3
• Each Database has its Instance User Created Tablespaces
CDB Architecture
• There is a ROOT database with System Metadata
and code supplied with Oracle Database Software
• Additionally there are Pluggable Databases used to
contain user / application metadata & code and data
for the objects created by users / applications
CDB
ROOT
CDB Architecture
• There is a SYSTEM tablespace in ROOT database
with all the Oracle Supplied Metadata / Code
• SYSTEM Tablespace in Pluggable Databases
contain user / application metadata and code for the
objects created by the user / application
System CDB
ROOT Tablespace
System System System
Tablespace Tablespace Tablespace
PDB1 PDB2 PDB3
7
11/22/2021
CDB Architecture
• Typically each Application has its own PDB
• User Created Tablespaces in each PDB has the
Tables and Data for the Application
• The Metadata for these objects is in the System
Tablespace of the respective PDB
CDB
System
ROOT Tablespace
System System System
Tablespace Tablespace Tablespace
PDB1 Tbs1 PDB2 PDB3
Tbs1 Tbs1
CDB Architecture
• Pluggable Databases refer to the ROOT for the
Oracle Supplied Code and Metadata
• Oracle Database patching happens only in ROOT
and it automatically patches the PDBs also
CDB
ROOT
CDB Architecture
• The Entire CDB shares the Same Instance
Instance
CDB
ROOT
8
11/22/2021
Standby
Database 1
Primary
Database Standby
Database 2
Primary Standby
Database Database 1
Primary Standby
Database Database 1
9
11/22/2021
Primary Standby
Database Database 1
Primary Standby
Database Database 1
Primary Standby
Database Database 1
10
11/22/2021
Protection Modes
• Data Guard configuration has 3 Protection Modes
– Maximum Performance (ASYNC)
– Maximum Availability (SYNC)
– Maximum Protection (SYNC No Data Loss Configuration)
• Configuration will take care of how the Standby is in
Sync with Primary ( and the impact on Failover)
11
11/22/2021
RAC Overview
• A Database Server has an
Instance for the Database Application
• Applications have access to the
instance only when the DATABASE SERVER
Database server is available
• Also, the Instance is INSTANCE
constrained by the CPU
resources on the Database
Server
STORAGE SERVER
RAC Overview
• RAC takes care of 2 important
Application
aspects
• Scalability
– Ability to take up more load by DATABASE SERVER
having more CPU resources
• High Availability INSTANCE
– Even if a Database Server is
down another server is available
STORAGE SERVER
With Database Files
RAC Overview
• RAC is a Cluster setup of 2 or more Database
servers that connect to the same Database
Application
Database Files
12
11/22/2021
RAC Overview
• To manage the Cluster, there is a Cluster software
called Grid Infrastructure ( ASM + Clusterware)
Application
Database Files
RAC Overview
• A separate Network called Interconnect is required
between the Database Servers
Application
Database Files
RAC - Scalability
• Now with a Cluster of DB Instances available, an
Application can perform more work with the Cluster
Application
Database Files
13
11/22/2021
RAC - Scalability
• Alternatively, more applications can be deployed to
work with the Cluster of Instances
Application 1 Application 2
Database Files
Database Files
Database Files
14
11/22/2021
Additional learning
• Oracle Database Architecture (non-CDB) Overview -
https://www.youtube.com/playlist?list=PL3Hc8S1SG2AQnk6Nu57m2JLkWxorMAsmE
• Oracle ASM -
https://www.youtube.com/playlist?list=PL3Hc8S1SG2ARyNRoWvp7q8SSFFHthSy9j
Moore’s Law
https://en.wikipedia.org/wiki/Moore%27s_law
15
11/22/2021
Evolution of Storage
• 1956 – IBM RAMAC 305 – 5MB
– Size of a refrigerator
• 1992 – Seagate – 7200 RPM – 2.1 GB
• 1996 – Seagate – 10000 RPM
• 2000 – Seagate – 15000 RPM
Understanding Storage
• All data needs to be READ into COMPUTER
Memory to Process
MEMORY (RAM)
• The speed of reading depends on
the Speed of the Disk Subsystem
• Understand your Storage CPU
Specifications before you use…
STORAGE
16
11/22/2021
Storage
• Used to store data permanently in a
computer
• Also called Secondary Storage
• Today there are 2 types popular
– Hard Disks
– Flash / Non-Volatile Memory
17
11/22/2021
• IDE
• SATA ( 600 MB/sec)
• Which met the I/O capability of
Hard Disks
Flash Connectivity
• Flash is available as SSD and as
PCIe slots
• These provides much better I/O
capabilities than Hard Disk
• NVMe is a device specification to
connect Flash Storage using PCIe
• It can provide 2000 MB/sec and
more which enables to exploit the
I/O capabilities of Flash storage
18
11/22/2021
Storage Components
• Hard Disks
• Flash DRAM
Faster
FLASH
PMEM
• PMEM is a new Storage device
• It is Much Faster than Flash
– Comparable to DRAM/RAM/Memory
• Unlike DRAM which is volatile, PMEM is
persistent
19
11/22/2021
What is ASM?
• A software provided by Oracle – Optimized for
Database I/O
• Removes the requirement for a Volume Manager
– typically provided with Storage Solutions
• Can be used with JBOD (Just a Bunch of Disks)
• Disk Group in ASM used for keeping Database files
• 3 Important Aspects of ASM to be understood
– Striping
– Redundancy
– Failure Groups
20
11/22/2021
What is Striping?
• Consider a Disk Group with all 9 Disks
– This is just an example to understand the concept
DG1
D1 D4 D7
D2 D5 D8
D3 D6 D9
What is Striping?
• A file is created in the Disk Group
Datafile01.dbf
DG1
D1 D4 D7
D2 D5 D8
D3 D6 D9
What is Striping?
• The file is split into chunks ( stripes ) and written /
distributed to all disks in the Disk Group
Datafile01.dbf
DG1
S1 D1 S5 D4 S9 D7
S7 D2 S2 D5 D8
S3
S4 D3 S8 D6 S6 D9
21
11/22/2021
What is Striping?
• The file in the Disk Group will perform better than
if the file had been written to just a single Disk
Datafile01.dbf
Datafile01.dbf
DG1
D1 D1 D4 D7
S1 S5 S9
S7 D2 S2 D5 D8
S3
S4 D3 S8 D6 S6 D9
What is Redundancy?
• What if one of the disks fails…
• Will all the data be still accessible?
Datafile01.dbf
DG1
S1 D1 S5 D4 S9 D7
S7 D2 S2 D5 D8
S3
S4 D3 S8 D6 S6 D9
What is Redundancy?
• ASM offers 3 Redundancy settings
– External – Only one strip is stored
– Normal – Two copies ( Primary and Secondary)
– High – Three Copies ( Primary , Secondary & Tertiary)
• These are discussed in detail in the next few slides
• Use the one most appropriate for your requirement
22
11/22/2021
External Redundancy
• Used when there is Redundancy at Storage Level
• ASM need not worry about data availability
Datafile01.dbf
DG1
S1 D1 S5 D4 S9 D7
S7 D2 S2 D5 D8
S3
S4 D3 S8 D6 S6 D9
Normal Redundancy
• ASM stores one Primary Stripe and a Secondary
(copy) in another disk
Datafile01.dbf
DG1
S1 S9 D1 S5 S3 D4 S9 S5 D7
S7 S6 D2 S2 S7 D5 S3 S2 D8
S4 S8 D3 S8 S4 D6 S6 S1 D9
Normal Redundancy
• Any one Disk failure can be tolerated and data is
still available/accessible
Datafile01.dbf
DG1
S1 S9 D1 S5 S3 D4 S9 S5 D7
S7 S6 D2 S2 S7 D5 S3 S2 D8
S4 S8 D3 S8 S4 D6 S6 S1 D9
23
11/22/2021
High Redundancy
• ASM stores one Primary Stripe a Secondary (copy)
in another disk and a Tertiary(copy) in another disk
Datafile01.dbf
DG1
High Redundancy
• Any 2 failures can be tolerated and the data is still
available
Datafile01.dbf
DG1
24
11/22/2021
Datafile01.dbf
S1 D1 S5 D4 S9 D7 S9 D1 S3 D4 S5 D7
S7 D2 S2 D5 D8 S6 D2 S7 D5 S2 D8
S3
S4 D3 S8 D6 S6 D9 S8 D3 S4 D6 S1 D9
S1 D1 S5 D4 S9 D7 S9 D1 S3 D4 S5 D7 S9 D1 S3 D4 S5 D7
S7 D2 S2 D5 D8 S6 D2 S7 D5 S2 D8 S6 D2 S7 D5 S2 D8
S3
S4 D3 S8 D6 S6 D9 S8 D3 S4 D6 S1 D9 S8 D3 S4 D6 S1 D9
25
11/22/2021
Failure Group
• In Generic ASM, by default each DISK in a Disk
Group is a Failgroup
Redundancy vs FailGroup
• Redundancy specifies how many Faults can be
tolerated
– High ( 2 faults), Normal ( 1 fault)
• FailGroup configuration specifies what Fault needs
to be tolerated
– Disk, Controller or Storage Server etc…
26