Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
: It offers excellent IO
Performance and scalability but does not provide fault torelance
: A failure of a single
disk in RAID-0 Group fails the entrie group - ALl data is eventually lost
: RAID-0 offers excellen
t economy (Cost per storage byte) is less .
: Can be used for non-cr
itical archive data which can be restored fro, backups and during the
Downtime is not a matt
er of much concern.
RAID-1 : Disk Mirroring : Can be used with 2 disks which acts as a mirro
r. what-ever data you store on it is written
Twice on both the disk
s in RAID-1 Group. So, If you lost a disk the data is still available from the o
ther disk.
: Normally used for inst
alling OS.
: Is very expensive (Cos
t Per storage byte doubles). Not feasiable for huge data stores.
: Heavy writes are simpl
y doubled although the writes on both the disks can be parallelized.
Two problems RAID-0 Does not offers disk fault torelance but it offers t
he best economy factor.
RAID-1 Does not offers economy factor but it of
fers the best disk fault torelance.
RAID-5 Data Stripping with distributed parity :- Requires a minimum of 3
Disks.
: Considering the cost a
nd the fault torelance its a golden mean between RAID-0 and RAID-1.
: Along with the data the RAID controller computed and writes the parity on the participating disks.
: This often results in
slow IO Performance during writes - all the disks would bre busy all the times Some of them wou
ld receive data others would receive parity, All the disks would spining all the
time.
: This is not suitable f
or data which undergoes frequent modification (eg :- Redo logs and OLTP data)
: Can be used for archiv
e data which need to held on the disk and is mostly read-only in nature, Read da
ta and rarelly modify.
RAID-10 :- Express as RAID-0+RAID-1 or RAID-1+RAID-0: The only differenc
e is what we do first and what we on next.
* Is it the stipping hap
pens first followed by mirroring of those stripes.
* Is it the mirroring ha
ppens first followed by the stripes of those mirrrores.
Offers the common benefi
t for database RAID-0 and RAID-1.
Oracle recommends for da
tabase RAID-10
With fault tolerance comes the investmenr in RAID controller which offer
s resilence against disk failures.
RAID are rule/algorithm driven and not content driven.
Eg : Assume you want to store : Very important, moderatellyImportance an
d LessImportant data on RAID-1.
: Then all the data would be redundantly written to both the disks in
RAID-1.
: You cannont segregate data which you want to mirror and the data wh
ich you don't want to mirror.
ASM Allows you to assemble multiple disks into a more cohesive unit c
alled - ASM Diskgroup.
An ASM Diskgroup can have disks which are not protected by RAID. An A
SM Diskgroup at creation time can
Select the desire fault tolerance : External, Normal or High offering
almost same benefites like RAID.
In case of ASM we call it as redundancy,There are three types of redu
ndancy happense.
External :Normal
RAID-1 :- The content in this diskgroup get mirrored, T
EMP and DATAFILE from index tablespaces also get mirrored.
These files are not that much
important, if i lost it.So Fault tolerance is not important for these files.
High
:You however Additionally get control over which files you want to ena
ble fault tolerance and which you would like to
er size would be my driving disks, So I will not able to utilize fully 160gb siz
e.
In this case if
we create a disk group in ASM with two disks (One with 100gb and another with 16
0 gb).
in ASM it would
be the physical diks this is an luns in the real life.
Luns are customi
sable.
2. Flexibility in handling the storage
At any given point in time you should be ablie to add/remove/res
ize the storage disk.
This is often achived using : Volume manager.
Volumn Manager allows you to club multiple independent disks (PV
- Physical Volumn) into a logical container(Volumn group VG).
Once you have in VG - you can create multiple LVs. These LVs can
then be mounted and consumed.
Adding/Removing a disk is an online, seamless and transprant ope
ration.
When ever you don't have the volumn managment built into your OS
- you may still implement it with
some third party volumn manager-like verita volumn manager.
ASM offers VM like capabilities.
In ASM we can attach multiple diks and create a disk group in it
.
In that diskgroup it has own fault tolerance level(redundancy fa
ctor).
It offers you the RAID+Volumn management
While adding or removing disk in a diskgroup the data in the ASM
diskgroup is unchanged, seamless and transprant operation without extra cost.
3. Improved IO throughput for IO intensive databases.
As a thumb rule - one would except 100MB/s of IO throughput for every Xe
on CPU core.
FOr example if your having Multi core system then,
This thumb rule will applicable for IO intensive databases, not for the
computation intensive this rule will not apply.
2 CPU * 6 Cores = 122 Cores* 100MB/s = 1.2 GB/s
Improved IO Through can be achived by using ultiple disks (Disk array) a
nd preferable the outer tracks of those disks.
IO throughputs may achived SSD or fusion cards.
Timeinstand -- which is in memory database.
ASM stripes data on all the participating disks in the diskgroup in case
of external redundancy.
ASM stripes data on all the participating disks in the failure group in
case of Nornmal/High Redundancy.
4. Avoiding manual intervention in tunning the IO load
In a system with classic file systems - you keep on adding data to the m
ounts.
Later you experience that some mounts are experiencing High IO while oth
ers have moderate and low IO.
The mount points are in Hot/warm/cold
Hot :- Read and writing data into the disks frequentlly, In such cases w
e can move the some of the files from hot to cold disks.
Goal is to balance the IO if the disks, and to keep all the disks in the
warm catagory.
In such cases you have to migrate/move files from disks with High IO to
disks with low IO
While moving data from the HOT to COLD disks (Eg:- Moving tablespace / d
atafile) we need to take into offline,
then give the OS command to mount the new datafile, data will be unavail
able for a moment.
This often means data would be unavailable for some time.
In ASM We can solve this problem :When we add a new disk to ASM diskgroup - ASM automatically triggers IO
Rebalancing Operation.
After a couple of time when we check the disk usage in the ASM diskgroup
it shows the equally occupaid space in the diskgroup.
IO Rebalancing is Online and seamless In ASM.
Database doesnot know that what are the data has moved from disk1 to new
disk.
5. Shared Disk with easy of management in cluster environments.
A cluster is a collection of computing nodes(Servers/Computers) and requ
ires the same data to be accessible
from any of those nodes. Necessary memory fusion(cache coherence) would
be taken care by the software.
but you still need data to be shared without the added complexity of usi
ng RAW devices.
This can be addressed by using :- Cluster file systems(CFS)
AIX :- GPFS
LINUX :- GFS/OCFS2
Veritas :- CFS
Windows :- MSMC
ASM :- Presents the same diskgroup to all the nodes in the cluster.
In addition to sharing the ASM diskgroup, ASM now-a-days support via ADV
M feature - ASM volumns.
AN ASM Volume can then be formatted with a regular file system(to be use
d if you want one node mount-point)
and with(ACFS) if you want to create a cluster mount-point.
6. Facility to take instant backups(Snapshots)
ASM Starting from 11gR2 introduced snapshots of ASM volumns.
A Snapshot is a read-only point in time copy of data.
A traditional backup involves copying the principal to some backup locat
ion.
The time it takes to copy is directly propotional to the data being copi
ed.
Also, you end-up spending same amount of disk space for backups as Princ
ipal.
Snapshots offer backups in no-time and without spending the disk space e
qual to the size of principal.
ASM Archicture
Automatic Storage Management(ASM) Product is distributed as part of grid
infrastructure product suite.
ASM Comprises of :
a. ASM Instance : Like any other database instance is a collection of me
mory and background processes.
b. ASM Diskgroup : Is a collection of disks/partitions/Luns Which may or
may not be protected by RAID.
The ASM Instance facilitates
ASM Diskgroup creation/ Deletion
Adding/Removing Disks in a diskgroup
Managing ASM Diskgroup's meta-data Which is kept in the ASM disk
s. Without this meta-data ASM instance
Cannot operate upon the diskgroups.
Creation of Continuning Operations Directory (COD) When a databa
se insatnce request file creation on a disk group
Maintaining the active change directiot(ACD).
IO Rebalancing when a new diskis added to a diskgroup or when an existin
g disk is removed from a diskgroup
- Mounting of diskgroups during instance startup
Creation of ASM volumns inside ASM diskgroup
Recovery of ASM diskgroup data in case of ASM instance crash usi
ng ASM transient logs.
ASM Instance like any other instance requires a parameter file (PFILE/SP
FILE) During Startup.
The Parameters are however very limited
Provides automatic load balancing over all the available disks, thus reducing ho
t spots in the file system
Prevents fragmentation of disks, so you don't need to manually relocate data to
tune I/O performance
Adding disks is straight forward - ASM automatically performs online disk reorga
nization when you add or remove storage
Uses redundancy features available in intelligent storage arrays
The storage system can store all types of database files
Using disk group makes configuration easier, as files are placed into disk group
s
ASM provides stripping and mirroring (fine and coarse gain - see below)
ASM and non-ASM oracle files can coexist
Striping ASM spreads data evenly across all disks in a disk group to optimize perf
ormance and utilization. This even distribution of database files eliminates the
need for regular monitoring and I/O performance tuning.
For example, if there are six disks in a disk group, pieces of each ASM file are
written to all six disks. These pieces come in 1 MB chunks known as extents. Wh
en a database file is created, it is striped (divided into extents and distribut
ed) across the six disks, and allocated disk space on all six disks grows evenly
. When reading the file, file extents are read from all six disks in parallel, g
reatly increasing performance.
Mirroring ASM can increase availability by optionally mirroring any file. ASM mirr
ors at the file level, unlike operating system mirroring, which mirrors at the d
isk level. Mirroring means keeping redundant copies, or mirrored copies, of each
extent of the file, to help avoid data loss caused by disk failures. The mirror
ed copy of each file extent is always kept on a different disk from the original
copy. If a disk fails, ASM can continue to access affected files by accessing m
irrored copies on the surviving disks in the disk group.
ASM supports 2-way mirroring, where each file extent gets one mirrored copy, and
3-way mirroring, where each file extent gets two mirrored copies.
Online storage reconfiguration and dynamic rebalancing ASM permits you to add or r
emove disks from your disk storage system while the database is operating. When
you add a disk, ASM automatically redistributes the data so that it is evenly sp
read across all disks in the disk group, including the new disk. This redistribu
tion is known as rebalancing. It is done in the background and with minimal impa
ct to database performance. When you request to remove a disk, ASM first rebalan
ces by evenly relocating all file extents from the disk being removed to the oth
er disks in the disk group.
Managed file creation
bling files stored in
lly assigns filenames
en they are no longer
Failure groups are defined within a disk group to support the required level of
redundancy. For two-way mirroring you would expect a disk group to contain two f
ailure groups so individual files are written to two locations.
What are ASM instance initialization parameters?
INSTANCE_TYPE - Set to ASM or RDBMS depending on the instance type. The default
is RDBMS.
DB_UNIQUE_NAME - Specifies a globally unique name for the database. This default
s to +ASM but must be altered if you intend to run multiple ASM instances.
ASM_POWER_LIMIT -The maximum power for a rebalancing operation on an ASM instanc
e. The valid values range from 1 to 11, with 1 being the default. The higher the
limit the more resources are allocated resulting in faster rebalancing operatio
ns. This value is also used as the default when the POWER clause is omitted from
a rebalance operation.
ASM_DISKGROUPS - The list of disk groups that should be mounted by an ASM instan
ce during instance startup, or by the ALTER DISKGROUP ALL MOUNT statement. ASM c
onfiguration changes are automatically reflected in this parameter.
ASM_DISKSTRING - Specifies a value that can be used to limit the disks considere
d for discovery. Altering the default value may improve the speed of disk group
mount time and the speed of adding a disk to a disk group. Changing the paramete
r to a value which prevents the discovery of already mounted disks results in an
error. The default value is NULL allowing all suitable disks to be considered.
Advantages of ASM in Oracle?
Provides automatic load balancing over all the available disks, thus reducing ho
t spots in the file system
Prevents fragmentation of disks, so you don't need to manually relocate data to
tune I/O performance
Adding disks is straight forward - ASM automatically performs online disk reorga
nization when you add or remove storage
Uses redundancy features available in intelligent storage arrays
The storage system can store all types of database files
Using disk group makes configuration easier, as files are placed into disk group
s
ASM provides stripping and mirroring (fine and coarse gain - see below)
ASM and non-ASM oracle files can coexist
Striping ASM spreads data evenly across all disks in a disk group to optimize perf
ormance and utilization. This even distribution of database files eliminates the
need for regular monitoring and I/O performance tuning.
For example, if there are six disks in a disk group, pieces of each ASM file are
written to all six disks. These pieces come in 1 MB chunks known as extents. Wh
en a database file is created, it is striped (divided into extents and distribut
ed) across the six disks, and allocated disk space on all six disks grows evenly
. When reading the file, file extents are read from all six disks in parallel, g
reatly increasing performance.
Mirroring ASM can increase availability by optionally mirroring any file. ASM mirr
ors at the file level, unlike operating system mirroring, which mirrors at the d
isk level. Mirroring means keeping redundant copies, or mirrored copies, of each
extent of the file, to help avoid data loss caused by disk failures. The mirror
ed copy of each file extent is always kept on a different disk from the original
copy. If a disk fails, ASM can continue to access affected files by accessing m
irrored copies on the surviving disks in the disk group.
ASM supports 2-way mirroring, where each file extent gets one mirrored copy, and
3-way mirroring, where each file extent gets two mirrored copies.
Online storage reconfiguration and dynamic rebalancing ASM permits you to add or r
emove disks from your disk storage system while the database is operating. When
you add a disk, ASM automatically redistributes the data so that it is evenly sp
read across all disks in the disk group, including the new disk. This redistribu
tion is known as rebalancing. It is done in the background and with minimal impa
ct to database performance. When you request to remove a disk, ASM first rebalan
ces by evenly relocating all file extents from the disk being removed to the oth
er disks in the disk group.
Managed file creation
bling files stored in
lly assigns filenames
en they are no longer
= '+DATA' SCOPE=SPFILE;
g files
file_number - file_number in ASM instance is used to correlate filenames in data
base instance
incarnation_number - It is derived from the timestamp. IT is used to provide uni
queness
What is an incarnation number?
An incarnation number is a part of ASM filename syntax. It is derived from the t
imestamp. Once the file is created, its incarnation number doesnot change.
What is the use of an incarnation number in Oracle ASM filename?
Incarnation number distinguishes between a new file that has been created using
the same file number and another file that has been deleted
ASM's SPFile will be residing inside ASM itself. This could be found out in numb
er of ways, looking at the alert log of ASM when ASM starts
Machine:
x86_64
Using parameter settings in server-side spfile +DATA/asm/asmparameterfile/regist
ry.253.766260991
System parameters with non-default values:
large_pool_size
= 12M
instance_type
= "asm"
remote_login_passwordfile= "EXCLUSIVE"
asm_diskgroups
= "FLASH"
asm_diskgroups
= "DATA"
asm_power_limit
= 1
diagnostic_dest
= "/opt/app/oracle"
Or using the asmcmd's spget command which shows the spfile location registered w
ith GnP profile
ASMCMD> spget
+DATA/asm/asmparameterfile/registry.253.766260991