Linux kernel tuning for oracle database
Linux kernel tuning is one of the most important layers for Oracle database performance, especially for OLTP systems, RAC, and high-concurrency workloads. A properly tuned kernel reduces memory contention, improves I/O throughput, and stabilizes latency.
Below is a production-grade Linux kernel tuning guide for Oracle (RHEL / Oracle Linux).
Oracle performance depends heavily on:
👉 If kernel is misconfigured, even NVMe + powerful CPUs will underperform.
Main file:
/etc/sysctl.conf
Apply changes:
sysctl -p
Key parameters:
kernel.shmmax
kernel.shmall
kernel.shmmni
👉 Ensures Oracle SGA fits in memory without fragmentation.
Key parameters:
vm.swappiness
vm.dirty_ratio
vm.dirty_background_ratio
Best practice:
👉 Goal: avoid memory paging (huge performance killer)
THP causes:
Best practice:
Benefits:
👉 Rule:
Allocate HugePages ≈ total SGA size
Parameters:
fs.file-max
fs.aio-max-nr
👉 Prevents “too many open files” errors under load
For SSD/NVMe systems:
none (best for NVMe)
mq-deadline (balanced)
Avoid:
cfq (legacy, slow for Oracle workloads)
Enable:
fs.aio-max-nr
👉 Improves parallel disk operations
Parameters:
net.core.rmem_max
net.core.wmem_max
net.ipv4.tcp_rmem
net.ipv4.tcp_wmem
👉 Improves throughput for high-volume DB traffic
net.core.somaxconn
net.ipv4.tcp_max_syn_backlog
👉 Prevents connection drops under heavy load
kernel.pid_max
fs.nr_open
👉 Supports high session concurrency
On multi-socket systems:
👉 Reduces latency significantly
If using RAC:
Key focus:
# Memory
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
vm.swappiness = 10
vm.dirty_ratio = 15
vm.dirty_background_ratio = 5
# File handles
fs.file-max = 6815744
fs.aio-max-nr = 1048576
# Network
net.core.rmem_max = 134217728
net.core.wmem_max = 134217728
net.ipv4.tcp_rmem = 4096 87380 134217728
net.ipv4.tcp_wmem = 4096 65536 134217728
net.core.somaxconn = 65535
net.ipv4.tcp_max_syn_backlog = 65535
Kernel tuning must align with Oracle parameters:
✔ Disable Transparent HugePages
✔ Enable HugePages for SGA
✔ Set low swappiness (avoid swap)
✔ Tune file descriptors aggressively
✔ Use NVMe-friendly I/O scheduler (none)
✔ Optimize TCP buffers for high throughput
✔ Align workloads with NUMA nodes
✔ Enable async I/O for Oracle
✔ Monitor kernel + Oracle metrics together
Linux kernel tuning is the foundation layer of Oracle performance. If the kernel is not tuned correctly, no amount of CPU, memory, or storage upgrades will deliver expected performance.