Red Hat / Oracle Enterprise Linux I/O tuning for Oracle databases

Starting with Red Hat 4 you can choose between four I/O scheduler which have all their pros and cons versus what you run on your server:


In Red Hat 6 the anticipatory I/O scheduler has disappeared…

There are multiple documents stating that deadline I/O scheduler is the preferred choice when running Oracle databases.
cfq scheduler is the default one on Red Hat edition while Oracle has chosen to activate deadline scheduler by default
on its Unbreakable Enterprise Kernel (uek) kernel branch. Which tend to say that it is the one to use when running Oracle databases.

You can change it, dynamically per disk device, by modifying below file:

# echo deadline > /sys/block/${ASM_DISK}/queue/scheduler

[root@server1 ~]# cat /sys/block/sda/queue/scheduler
noop anticipatory deadline [cfq]
[root@server1 ~]# echo deadline > /sys/block/sda/queue/scheduler
[root@server1 ~]# cat /sys/block/sda/queue/scheduler
noop anticipatory [deadline] cfq

RHEL6.x Tuning Virtual Memory


    A value from 0 to 100 which controls the degree to which the system
swaps.A high value prioritizes system performance, aggressively swapping
processes out of physical memory when they are not active. A low value
prioritizes interactivity and avoids swapping processes out of physical
memory for as long as possible, which decreases response latency. The
default value is 60.
    A high swappiness value is not recommended for database workloads.
For example, for Oracle databases, Red Hat recommends a swappiness value
of 10.


format the multipath raw partition and use for oracle asm without reboot the machine

# fdisk /dev/mapper/myraw
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won’t be recoverable.

The number of cylinders for this disk is set to 78325.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): u
Changing display/entry units to sectors

Command (m for help): n
Command action
e extended
p primary partition (1-4)
Partition number (1-4): 1
First sector (63-1258291199, default 63): 2048
Last sector or +size or +sizeM or +sizeK (2048-1258291199, default 1258291199):
Using default value 1258291199

Command (m for help): p

Disk /dev/mapper/myraw: 644.2 GB, 644245094400 bytes
255 heads, 63 sectors/track, 78325 cylinders, total 1258291200 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/mapper/myraw1 2048 1258291199 629144576 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

#/sbin/partprobe /dev/mapper/myraw

#/sbin/partprobe /dev/mapper/myraw