Oracle RAC - sysctl.conf, Oracle block
Oracle RAC Solution · Config document · referenced from Operating system preparation
vm.hugetlb_shm_group is set twice in this block. Only the second value is in effect; do not copy both lines.The kernel parameters added to /etc/sysctl.conf for Oracle Grid Infrastructure and Oracle Database 11.2: the values of the installation guide, shared memory sized for the machine, the group allowed to use huge pages, and two network settings for the interconnect interface. The notes show only this added block, not the rest of the file.
| Item | Value |
|---|---|
| Path | /etc/sysctl.conf |
| On | oradb01 and oradb02 |
| Shown here | the block added to the existing file; the notes show ... above it |
| Activated with | sysctl -p, as root |
| Operating system | SUSE Linux Enterprise Server 11 SP3, kernel 3.0.76-0.11-default |
The file
# ... (the existing file continues above; the notes do not show it) # Kernel parameters for running Oracle Database fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 4124030976 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 # Let the local group oinstall (30001) create shared memory segments (SUSE Linux only.) # Installation. vm.hugetlb_shm_group=30001 # Let the local group dba (30004) create shared memory segments (SUSE Linux only.) # Operation. vm.hugetlb_shm_group=30004 # Here the adapter "eth3" (eth3:INT) is used as the Oracle interconnect net.ipv4.conf.eth3.rp_filter = 0 net.ipv4.icmp_echo_ignore_broadcasts = 0
| Line | Meaning | Where the value comes from |
|---|---|---|
fs.aio-max-nr | system-wide limit of asynchronous I/O requests | the guide's minimum |
fs.file-max | system-wide limit of open file handles | the guide's minimum |
kernel.shmall | total shared memory, in pages | the guide's minimum; the installer rejected the 1006843 that shmsetup.sh had calculated |
kernel.shmmax | largest single shared memory segment, in bytes | the value the installer asked for; shmsetup.sh had calculated 4124028928, the guide's minimum is 536870912 |
kernel.shmmni | number of shared memory segments | the guide's minimum |
kernel.sem | semaphore limits: per set, system-wide, operations per call, number of sets | the guide's minimum |
net.ipv4.ip_local_port_range | ephemeral port range | the guide's value |
net.core.rmem_default, rmem_max, wmem_default, wmem_max | default and maximum socket buffer sizes | the guide's minimums |
vm.hugetlb_shm_group | the one group whose members may create shared memory segments backed by huge pages | 30001 is oinstall, 30004 is dba |
net.ipv4.conf.eth3.rp_filter | reverse path filtering on eth3, switched off | added when the interconnect became the alias eth3:INT |
net.ipv4.icmp_echo_ignore_broadcasts | 0 lets the node answer pings sent to a broadcast address | same comment in the file; the notes give no further reason |
vm.hugetlb_shm_group takes one group ID. sysctl -p applies the lines in the order of the file, so the first assignment (30001, "installation") is overwritten at once by the second (30004, "operation"). The comments suggest the value was meant to be switched after the installation; the notes show both lines active.
The last two lines mention eth3:INT, which exists only since the interconnect was moved from eth2 to an alias on the management interface. They were therefore added later than the rest of the block, during the events of Grid patches and the multicast problem.
Checked against Oracle AI Database 26ai
| As built | Today |
|---|---|
fs.aio-max-nr, fs.file-max, kernel.shmmni, kernel.sem, the four net.core values | Same minimums in the 26ai table |
kernel.shmall = 2097152 | No fixed number any more: "greater than or equal to the value of shmmax, in pages". 2097152 satisfies that for this shmmax |
kernel.shmmax = 4124030976 | "Half the size of physical memory in bytes", which is what the installer asked for here |
net.ipv4.ip_local_port_range = 9000 65500 | Minimum 9000, maximum 65535 |
| not set | kernel.panic_on_oops = 1 is in the table since 12c, kernel.panic = 10 is new in 26ai |
vm.hugetlb_shm_group twice | Oracle, in 11.2 and in 26ai: enter the GID of the oinstall group, and "only one group can be defined". The second line wins, so the effective group was dba, of which grid is not a member. Without vm.nr_hugepages it had no practical effect. The 26ai procedure puts the setting into /etc/sysctl.d/99-hugetlb-shm-group.conf |
net.ipv4.conf.eth3.rp_filter = 0 | Oracle recommends 0 or 2 for private interconnects and requires it only with several of them. The kernel uses the higher of the all and the per-interface value, so 0 on one interface is ineffective if all is 1; 2 is the safe value. SUSE's default is already 2 |
net.ipv4.icmp_echo_ignore_broadcasts = 0 | Not an Oracle requirement in the 11.2, 19c or 26ai guides. It only makes the host answer broadcast pings; it does not make a network carry broadcast |
the block in /etc/sysctl.conf, sysctl -p | Still works. A file in /etc/sysctl.d/ and sysctl --system is the preferred form |
raising shmmax and shmall | Since Linux 3.16 both default to nearly the maximum, so on SLES 15 and later Oracle's values lower the limits. The installer still checks them |
The eleven Oracle values can still be used as they are. The last three settings of the block should not be copied: one of the two vm.hugetlb_shm_group lines is dead, and the two network lines belong to the diagnosis of a network that passed no broadcast, not to a normal installation.