Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,430 --> 00:00:04,970
In this lesson, we're going to
be looking at Automatic Storage
2
00:00:04,970 --> 00:00:07,690
Management or ASM.
3
00:00:07,690 --> 00:00:12,010
ASM is really an amazing
feature of the Oracle database
4
00:00:12,010 --> 00:00:15,160
that was first introduced
in version 10g.
5
00:00:15,160 --> 00:00:20,200
In 11g, it was moved to become a
pod of the grid infrastructure,
6
00:00:20,200 --> 00:00:22,900
which is the software that
supports Real Application
7
00:00:22,900 --> 00:00:25,440
Clusters or RAC.
8
00:00:25,440 --> 00:00:27,870
And the best way
to understand ASM
9
00:00:27,870 --> 00:00:31,770
is to kind of understand
the two methods of storing
10
00:00:31,770 --> 00:00:34,890
Oracle database
files that preceded
11
00:00:34,890 --> 00:00:38,700
the introduction of ASM,
and that is on a file system
12
00:00:38,700 --> 00:00:41,480
and on raw devices.
13
00:00:41,480 --> 00:00:44,440
So when we store an Oracle
database on the file system,
14
00:00:44,440 --> 00:00:46,750
we're talking about
what is actually
15
00:00:46,750 --> 00:00:50,210
going to store the
data files themselves.
16
00:00:50,210 --> 00:00:52,660
So in this case,
in a file system,
17
00:00:52,660 --> 00:00:56,080
they're stored on a
general OS file system,
18
00:00:56,080 --> 00:01:00,640
something like NTFS,
on Windows, ext3,
19
00:01:00,640 --> 00:01:04,510
on Linux, a file system
related to one of those.
20
00:01:04,510 --> 00:01:07,870
Not a network file system
or a shared file system,
21
00:01:07,870 --> 00:01:09,980
but just a general
OS file system,
22
00:01:09,980 --> 00:01:11,650
and this is the kind
of thing that we're
23
00:01:11,650 --> 00:01:15,550
familiar with if you've ever
formatted a hard drive or even
24
00:01:15,550 --> 00:01:16,720
a floppy disk.
25
00:01:16,720 --> 00:01:19,030
When you format a
disk, what you're doing
26
00:01:19,030 --> 00:01:21,580
is laying down a file
system on top of it.
27
00:01:21,580 --> 00:01:23,830
And a file system
just makes it easier
28
00:01:23,830 --> 00:01:25,780
to interact with the files.
29
00:01:25,780 --> 00:01:30,190
So in Windows, you can use
Explorer to go through folders
30
00:01:30,190 --> 00:01:33,580
and look at files and drill
down, so on and so forth.
31
00:01:33,580 --> 00:01:37,510
In Linux and Unix, you can
use directories using the CD
32
00:01:37,510 --> 00:01:40,280
command to drill
down into directories
33
00:01:40,280 --> 00:01:41,740
and to see the
files that are there
34
00:01:41,740 --> 00:01:43,010
and operate with those files.
35
00:01:43,010 --> 00:01:47,020
So a file system just
makes it easier to use.
36
00:01:47,020 --> 00:01:50,380
And when we store an Oracle
database on the file system,
37
00:01:50,380 --> 00:01:52,150
there's some pros and cons.
38
00:01:52,150 --> 00:01:55,270
The pros are that,
obviously, it's easy to use.
39
00:01:55,270 --> 00:01:57,730
It's easy to see and
manage the files.
40
00:01:57,730 --> 00:02:00,550
If you want to know where
you're redo logs are,
41
00:02:00,550 --> 00:02:03,580
you can look in the data
dictionary for their location
42
00:02:03,580 --> 00:02:07,660
and then open a Windows
Explorer or a Linux command line
43
00:02:07,660 --> 00:02:10,990
and just drill down through
the directory structure
44
00:02:10,990 --> 00:02:12,940
and see the files.
45
00:02:12,940 --> 00:02:18,220
The cons for file system based
databases are that it's slower.
46
00:02:18,220 --> 00:02:21,760
It's slower because a
file system has overhead,
47
00:02:21,760 --> 00:02:24,310
and that file system
overhead that's involved
48
00:02:24,310 --> 00:02:26,650
can create a performance drag.
49
00:02:26,650 --> 00:02:31,990
This is just basically because a
file system, like NTFS or ext3,
50
00:02:31,990 --> 00:02:35,950
is not designed with the Oracle
database data files in mind
51
00:02:35,950 --> 00:02:37,090
in particular.
52
00:02:37,090 --> 00:02:41,680
So a general OS file system
has its own overhead,
53
00:02:41,680 --> 00:02:44,350
it has its own
file system cache,
54
00:02:44,350 --> 00:02:47,950
which is a memory area where
blocks from the file system
55
00:02:47,950 --> 00:02:49,030
are stored.
56
00:02:49,030 --> 00:02:52,120
And that's sort of in conflict
with an Oracle database
57
00:02:52,120 --> 00:02:56,470
because Oracle has its
own caching mechanism.
58
00:02:56,470 --> 00:02:59,830
So really, when you operate
with an Oracle database
59
00:02:59,830 --> 00:03:03,670
on a file system, you're
really operating not disk
60
00:03:03,670 --> 00:03:07,780
to Oracle cache, but file
system cache to Oracle cache.
61
00:03:07,780 --> 00:03:09,460
There can be some
confusion there,
62
00:03:09,460 --> 00:03:12,910
and consequently, it ends up
being a little bit slower.
63
00:03:12,910 --> 00:03:16,000
Now, for many databases, the
file system based database
64
00:03:16,000 --> 00:03:18,790
is fine because it does
not affect performance
65
00:03:18,790 --> 00:03:22,900
in such a way that would cause
a problem for the application.
66
00:03:22,900 --> 00:03:26,780
But in larger databases or
more demanding environments,
67
00:03:26,780 --> 00:03:28,450
in terms of performance,
especially when
68
00:03:28,450 --> 00:03:31,960
you get into things like data
warehousing, decision support
69
00:03:31,960 --> 00:03:36,220
systems of that nature, then
the performance is everything,
70
00:03:36,220 --> 00:03:39,490
and having your database
on a file system
71
00:03:39,490 --> 00:03:41,820
could be problematic.
72
00:03:41,820 --> 00:03:46,310
So historically, the other
option was raw devices.
73
00:03:46,310 --> 00:03:49,520
And with raw devices,
the database data files
74
00:03:49,520 --> 00:03:54,500
are stored on an unformed
logical volume or disk.
75
00:03:54,500 --> 00:03:57,050
So to try to picture
what this is like,
76
00:03:57,050 --> 00:03:59,600
imagine that you
are at the store
77
00:03:59,600 --> 00:04:02,630
and you purchase a hard
drive that you're going
78
00:04:02,630 --> 00:04:04,850
to put into your computer.
79
00:04:04,850 --> 00:04:07,670
You open up your computer,
you attach the disk drive,
80
00:04:07,670 --> 00:04:09,470
but you don't format it.
81
00:04:09,470 --> 00:04:11,600
Well, you might say,
well, you can't use it
82
00:04:11,600 --> 00:04:13,100
if you don't format it.
83
00:04:13,100 --> 00:04:16,370
Well, Oracle can use
devices like that.
84
00:04:16,370 --> 00:04:19,820
As long as the operating
system underneath the hood
85
00:04:19,820 --> 00:04:23,330
can see the disk,
it can be told,
86
00:04:23,330 --> 00:04:27,620
use this unformatted
disk for Oracle Data.
87
00:04:27,620 --> 00:04:32,420
Now the difficulty of this
is that there is a one to one
88
00:04:32,420 --> 00:04:36,470
relationship between
data files and disks
89
00:04:36,470 --> 00:04:38,210
when you use raw devices.
90
00:04:38,210 --> 00:04:42,680
So that one disk can't
hold multiple data files.
91
00:04:42,680 --> 00:04:44,940
It has to hold one data file.
92
00:04:44,940 --> 00:04:48,800
So there needs to be a
disk for your control file,
93
00:04:48,800 --> 00:04:51,350
one disk for each
of your redo logs,
94
00:04:51,350 --> 00:04:54,780
one disk for each of your data
files, so on and so forth.
95
00:04:54,780 --> 00:04:57,530
So that's why we use
the term logical volume.
96
00:04:57,530 --> 00:05:00,050
In a enterprise
system, you might
97
00:05:00,050 --> 00:05:02,790
have something like a
storage area network,
98
00:05:02,790 --> 00:05:06,500
and we would just cut out
unformatted logical volumes out
99
00:05:06,500 --> 00:05:09,650
of that mass of disk so that
you're not actually worried
100
00:05:09,650 --> 00:05:13,010
about a one to one between
data files and disks,
101
00:05:13,010 --> 00:05:14,780
you have a little more control.
102
00:05:14,780 --> 00:05:17,930
So the pros of this
is that databases
103
00:05:17,930 --> 00:05:22,040
running on raw devices are
much faster than file system--
104
00:05:22,040 --> 00:05:24,830
along the order of 30% faster.
105
00:05:24,830 --> 00:05:27,590
And this can be a
huge improvement
106
00:05:27,590 --> 00:05:31,280
for database performance
because database I/O is usually
107
00:05:31,280 --> 00:05:35,300
the limiting factor as far
as performance in a database.
108
00:05:35,300 --> 00:05:38,990
That is to say, it's
easier to add more memory
109
00:05:38,990 --> 00:05:42,590
or even add more CPUs if
it's necessary to a system,
110
00:05:42,590 --> 00:05:46,580
but there's not that many ways
to increase the disk output.
111
00:05:46,580 --> 00:05:50,240
So having raw devices can
be a tremendous performance
112
00:05:50,240 --> 00:05:52,460
boost in terms of
I/O, and that really
113
00:05:52,460 --> 00:05:55,380
adds up to the user experience.
114
00:05:55,380 --> 00:05:58,070
And the cons of this
method are that it
115
00:05:58,070 --> 00:06:00,260
is very difficult to work with.
116
00:06:00,260 --> 00:06:03,080
Even for experienced system
administrators and database
117
00:06:03,080 --> 00:06:05,420
administrators,
the overhead that's
118
00:06:05,420 --> 00:06:07,910
involved in cutting
out all of the volumes
119
00:06:07,910 --> 00:06:11,090
and matching them up, and
it can be even dangerous
120
00:06:11,090 --> 00:06:14,720
because there are no
real safeguards as far as
121
00:06:14,720 --> 00:06:19,520
if we had two data files pointed
to the same logical volume.
122
00:06:19,520 --> 00:06:21,470
They would simply
overwrite each other,
123
00:06:21,470 --> 00:06:24,710
and it certainly can be
done and certainly is done,
124
00:06:24,710 --> 00:06:27,350
but it is much more difficult
to work with than a file system
125
00:06:27,350 --> 00:06:28,910
database.
126
00:06:28,910 --> 00:06:32,060
So those two form an extreme.
127
00:06:32,060 --> 00:06:36,320
With 10g Oracle devised
ASM, which was a new way
128
00:06:36,320 --> 00:06:40,220
to do database storage,
ASM is essentially
129
00:06:40,220 --> 00:06:45,050
a file system for the Oracle
database, designed for Oracle,
130
00:06:45,050 --> 00:06:48,410
designed to store the
Oracle database files.
131
00:06:48,410 --> 00:06:51,260
ASM runs in its own instance--
132
00:06:51,260 --> 00:06:53,330
not a database, but an instance.
133
00:06:53,330 --> 00:06:56,390
So the set of background
processes and memory
134
00:06:56,390 --> 00:07:01,100
structures, that's an instance,
and ASM uses its own instance,
135
00:07:01,100 --> 00:07:03,350
and that instance is very small.
136
00:07:03,350 --> 00:07:07,700
It takes very little overhead
to work with ASM from a system
137
00:07:07,700 --> 00:07:09,770
resource perspective.
138
00:07:09,770 --> 00:07:14,360
And how we do this is, just as
we did before with raw devices,
139
00:07:14,360 --> 00:07:16,880
we would cut out
logical volumes.
140
00:07:16,880 --> 00:07:20,660
But instead of assigning data
files to each one of these,
141
00:07:20,660 --> 00:07:24,200
we present those
raw devices to ASM,
142
00:07:24,200 --> 00:07:26,030
and it completely manages them.
143
00:07:26,030 --> 00:07:32,210
So we say, these 10 raw
devices are yours to use, ASM.
144
00:07:32,210 --> 00:07:34,910
Then Oracle takes
those raw devices
145
00:07:34,910 --> 00:07:39,530
and manages them as it sees
fit, automatically managing
146
00:07:39,530 --> 00:07:41,970
the storage, hence the name.
147
00:07:41,970 --> 00:07:46,640
So some benefits in ASM is we
get the speed of raw devices,
148
00:07:46,640 --> 00:07:48,950
because we have
no OS file system
149
00:07:48,950 --> 00:07:54,830
overheads, so we get that 30%
or better boost in I/O speed.
150
00:07:54,830 --> 00:07:58,040
It's simpler to
manage than using
151
00:07:58,040 --> 00:08:00,170
raw devices,
although probably not
152
00:08:00,170 --> 00:08:03,170
simpler to manage than
a file system database.
153
00:08:03,170 --> 00:08:07,400
It's safer to manage because
ASM has many safeguards that
154
00:08:07,400 --> 00:08:09,080
would prevent us
from doing things
155
00:08:09,080 --> 00:08:13,100
like dropping a raw device
or pointing two data
156
00:08:13,100 --> 00:08:15,230
files to the same raw device.
157
00:08:15,230 --> 00:08:17,420
And it has a number
of hot features.
158
00:08:17,420 --> 00:08:20,780
It is a globally
available file system,
159
00:08:20,780 --> 00:08:26,000
meaning that it can be used for
RAC, so Oracle talks to ASM,
160
00:08:26,000 --> 00:08:30,410
and those different instances
that Oracle has in Oracle RAC
161
00:08:30,410 --> 00:08:34,550
can all share that same ASM
space without any dangers
162
00:08:34,550 --> 00:08:36,230
of overwriting.
163
00:08:36,230 --> 00:08:40,160
It also has features like
dynamic rebalancing, meaning,
164
00:08:40,160 --> 00:08:44,510
if we have our ASM setup and
we have all the raw devices
165
00:08:44,510 --> 00:08:47,630
assigned to it and
we want to grow,
166
00:08:47,630 --> 00:08:50,990
we can simply assign
more raw devices to it,
167
00:08:50,990 --> 00:08:54,440
make those a part of ASM,
and it can dynamically
168
00:08:54,440 --> 00:08:59,360
rebalance that data without
any shutdown of the system
169
00:08:59,360 --> 00:09:02,720
or really without any
performance overhead
170
00:09:02,720 --> 00:09:06,020
because it's very efficient in
how it manages that data that's
171
00:09:06,020 --> 00:09:09,110
on the raw devices.
172
00:09:09,110 --> 00:09:12,320
The ASM architecture is broken
down into a couple of terms
173
00:09:12,320 --> 00:09:13,640
that we'll cover here.
174
00:09:13,640 --> 00:09:17,270
Lastly, we had here in this
list, the ASM instance.
175
00:09:17,270 --> 00:09:20,150
So the set of background
processes and memory
176
00:09:20,150 --> 00:09:24,680
caches that it needs to
manage the ASM disks.
177
00:09:24,680 --> 00:09:30,440
The raw devices that we present
to ASM are known as ASM disks.
178
00:09:30,440 --> 00:09:33,200
And when we take
ASM disks, we can
179
00:09:33,200 --> 00:09:35,330
create what's called
a disk group that
180
00:09:35,330 --> 00:09:37,730
is a set of ASM disks.
181
00:09:37,730 --> 00:09:41,550
So those disk groups make
it much easier to work with.
182
00:09:41,550 --> 00:09:44,600
So if we were to
create a table space,
183
00:09:44,600 --> 00:09:49,430
rather than saying create table
space data file with this path,
184
00:09:49,430 --> 00:09:52,760
we would simply say, data
file and within quotes would
185
00:09:52,760 --> 00:09:56,490
be a plus sign and then
the name of the disk group.
186
00:09:56,490 --> 00:10:01,570
And from that point, Oracle
takes it over and manages it.
15595
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.