Database Reference
In-Depth Information
Mounting the log devices in a buffered manner : Here, you are using a “cooked” file system
(not RAW disks). The operating system is buffering the data, and the database is also
buffering the data (redo log buffer). Double-buffering slows things down. If possible, mount
the devices in a “direct” fashion. How to do this varies by operating system and device, but it
is usually possible.
Putting redo on a slow technology, such as RAID-5 : RAID-5 is great for reads, but it is
generally terrible for writes. As we saw earlier regarding what happens during a COMMIT , we
must wait for LGWR to ensure the data is on disk. Using any technology that slows this down
is not a good idea.
If at all possible, you really want at least five dedicated devices for logging and optimally six to mirror your
archives as well. In these days of 200GB, 300GB, 1TB and larger disks, this is getting harder, but if you can set aside
four of the smallest, fastest disks you can find and one or two big ones, you can affect LGWR and ARCn in a positive
fashion. To lay out the disks, you would break them into three groups (see Figure 9-5 ):
Redo log group 1 : Disks 1 and 3
Redo log group 2 : Disks 2 and 4
Archive : Disk 5 and optionally disk 6 (the big disks)
Odd Groups (1,3,5)
Even Groups (2,4,6)
Archive Logs
Disk 1
A.log
Disk 2
C.log
Disk 5
Disk 6
Disk 3
B.log
Disk 4
D.log
Figure 9-5. Optimal redo log configuration
You would place redo log group 1 with members A and B onto disks 1 and 3. You would place redo log group 2
with members C and D onto disks 2 and 4. If you have groups 3, 4, and so on, they'd go onto the odd and even groups
of disks respectively. The effect of this is that LGWR , when the database is currently using group 1, will write to disks 1
and 3 simultaneously. When this group fills up, LGWR will move to disks 2 and 4. When they fill up, LGWR will go back
to disks 1 and 3. Meanwhile, ARCn will be processing the full online redo logs and writing them to disks 5 and 6, the
big disks. The net effect is neither ARCn nor LGWR is ever reading a disk being written to, or writing to a disk being read
from, so there is no contention (see Figure 9-6 ).
Search WWH ::




Custom Search