Tuned-adm and Oracle

“Tuned” in RHEL7/OEL7 is tuning daemon for automatically tuning the system via the use of tuning profile. It can also be configured to react to changes to improve performance of the server and also to make system settings persistent.
“tuned-adm” is a command line tool that provides a number of different profiles to improve performance.
Below are the profiles provided and supported in RHEL 7 :-

  1. throughput-performance
  2. latency-performance
  3. network-latency
  4. network-throughput
  5. virtual-guest
  6. virtual-host

Apart from the provided profile, we can create custom profiles. All the profile are stored in /usr/lib/tuned/ in RHEL7.
The recommended profile for Oracle database workloads is “throughput-performance”.
In my virtualbox, by default “vitual-guest” was set as active profile

[[email protected] ~]# cd /usr/lib/tuned/
[[email protected] tuned]# tuned-adm active
Current active profile: virtual-guest

If tuned is not installed, install it using yum

#yum install tuned

Enabled tuned to ensure it is started upon boot time

# systemctl enable tuned.service

Start the tuned service

#systemctl start tuned.service

To check the status of tuned service

#systemctl status tuned.service

Now, create new “oracle” profile to be used
1. Create oracle directory –

[[email protected] ~]# mkdir /usr/lib/tuned/oracle

2. Create tuned.conf –

[[email protected] ~]# cd /usr/lib/tuned/oracle
[[email protected] oracle]# vi tuned.conf
[[email protected] oracle]# more tuned.conf
# tuned configuration
vm.swappiness = 1
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
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 65500
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
[[email protected] oracle]#

3. Activate the newly added oracle profile –

[[email protected] oracle]# tuned-adm profile oracle
[[email protected] oracle]# sysctl -a | grep vm.swappiness
vm.swappiness = 1
[[email protected] oracle]# sysctl -a | grep vm.dirty_ratio
vm.dirty_ratio = 80
[[email protected] oracle]#

4. To check the profile list –

[[email protected] ~]# tuned-adm list

One of the benefits of tuned is the profiles can be applied dynamically.
To configure dynamic tuning behavior, edit the dynamic_tuning parameter in the /etc/tuned/tuned-main.conf file.
If we are using tuned profile (as shown above) which make system settings persistent, it is recommended to remove all the oracle related entries from /etc/sysctl.conf as the entries are susceptible of being overwrittern, replaced or removed all together.
Hope the article is helpful!!

One thought on “Tuned-adm and Oracle

Leave a Reply