[LINUX] Try Tuned's profile for Oracle Database

Tuned is a tuning function of Red Hat Enterprise Linux / CentOS. Tuned can tune for typical workloads by choosing a profile. This article examines what settings are made using the profile oracle for Oracle Database.

Installation

Profiles for Oracle Database are provided in the tuned-profiles-oracle package. The example below installs the tuned-profiles-oracle-2.13.0-6.el8 package for CentOS 8.2.

# rpm -ivh tuned-profiles-oracle-2.13.0-6.el8.noarch.rpm
warning: tuned-profiles-oracle-2.13.0-6.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:tuned-profiles-oracle-2.13.0-6.el################################# [100%]
#

When the installation is complete, the following files will be created.

directory File Description
/usr/lib/tuned/oracle tuned.conf Profile settings for Oracle Database
/usr/share/man/man7 tuned-profiles-oracle.7.gz Online manual

Run the tuned-adm command to verify the installation. You can see the oracle profile in the list.

# tuned-adm list
Available profiles:
- accelerator-performance     - Throughput performance based tuning with disabled higher latency STOP states
- balanced                    - General non-specialized tuned profile
- desktop                     - Optimize for the desktop use-case
- hpc-compute                 - Optimize for HPC compute workloads
- intel-sst                   - Configure for Intel Speed Select Base Frequency
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- oracle                      - Optimize for Oracle RDBMS
- powersave                   - Optimize for low power consumption
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
Current active profile: virtual-guest
#

Profile settings

The default profile in a virtual environment is virtual-guest. To see the current profile, run the tuned-adm active command. To change to the oracle profile, run the tuned-adm profile oracle command. The example below shows how the kernel parameter vm.swappiness changes as a result of profile changes.

# tuned-adm active
Current active profile: virtual-guest
# sysctl -a | grep swappiness
vm.swappiness = 30
# tuned-adm profile oracle
# sysctl -a | grep swappiness
vm.swappiness = 10
#

Difference from virtual-guest

See how the default profiles virtual-guest and oracle differ. The profile definition files are /usr/lib/tuned/virtual-guest/tuned.conf and /usr/lib/tuned/oracle/tuned.conf. Both include the throughput-performance profile, so the only difference is the kernel parameters and transparent HugePages settings.

Kernel parameters virtual-guest oracle Remarks
fs.aio-max-nr - 1048576 Oracle Database installation requirements
fs.file-max - 6815744 Oracle Database installation requirements
kernel.panic_on_oops - 1
kernel.sem - 250 32000 100 128 Oracle Database installation requirements
kernel.shmall - 1073741824 More than Oracle Database installation requirements
kernel.shmmax - 4398046511104 More than Oracle Database installation requirements
kernel.shmmni - 4096 Oracle Database installation requirements
net.core.rmem_default - 262144 Oracle Database installation requirements
net.core.rmem_max - 4194304 Oracle Database installation requirements
net.core.wmem_default - 262144 Oracle Database installation requirements
net.core.wmem_max - 1048576 Oracle Database installation requirements
net.ipv4.ip_local_port_range - 9000 65499 Oracle Database installation requirements
vm.dirty_background_ratio - 3
vm.dirty_expire_centisecs - 500
vm.dirty_ratio 30 40
vm.dirty_writeback_centisecs - 100
vm.swappiness 30 10
vm settings virtual-guest oracle Remarks
transparent_hugepages - never Recommended Oracle Database installation

File contents of oracle profile

The contents of the /usr/lib/tuned/oracle/tuned.conf file.

#
# tuned configuration
#

[main]
summary=Optimize for Oracle RDBMS
include=throughput-performance

[sysctl]
vm.swappiness = 10
vm.dirty_background_ratio = 3
vm.dirty_ratio = 40
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65499
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
kernel.panic_on_oops = 1

[vm]
transparent_hugepages=never

manual

[System Status and Performance Monitoring and Management-2.3. TUNED Profile Distributed with RHEL](https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/8/html/monitoring_and_managing_system_status_and_performance/tuned- profiles-distributed-with-rhel_getting-started-with-tuned)

Recommended Posts

Try Tuned's profile for Oracle Database