Re: Tuned service on Linux
Date: Sun, 11 Feb 2024 16:26:28 +0100
Message-ID: <CALH8A90p8cKSyRiKiSScGe9enruBETeTuAT7ZDVVyXVrwb6v0w_at_mail.gmail.com>
Hi Mladen,
I checked file /usr/lib/tuned/oracle/tuned.conf On my system it contains
[main]
[sysctl]
[vm]
For a full overview you also have to check the throughput-performance
configuration.
I would not care so much about the dirty_* parameters - as long as my
#
# tuned configuration
#
summary=Optimize for Oracle RDBMS
include=throughput-performance
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
kernel.numa_balancing = 0
transparent_hugepages=never
Swappiness is a religious discussion: I prefer to have sufficient memory so
swap does never (significantly) occur, but I accept other messages of
salvation.
shmmni can be a problem for very large systems - the alert.log will tell
you (assuming hugepages are used)
numa_balancing will not make any difference until you have huge server
with high variance in NUMA distances
<https://stevescargall.com/blog/2022/11/03/linux-numa-distances-explained/>).
Then it might depend how you use this system (one single SGA, multiple
independent instances, ...) and it might require cgroups or other methods
to do a specific NUMA configuration.
Personally I don't expect any harm but also no significant gain. vm. settings will not gain a lot, kernel.memory settings are ok, if they are not you will see at instance startup.
hth,
Martin
Am Sa., 10. Feb. 2024 um 19:37 Uhr schrieb Mladen Gogala < gogala.mladen_at_gmail.com>:
> I have been using the "tuned" service since its inception in the late
> versions of OL7. The service is up:
>
>
> [oracle_at_ora21c tuned]$ systemctl status tuned
>
> ● tuned.service - Dynamic System Tuning Daemon
>
> Loaded: loaded (/usr/lib/systemd/system/tuned.service; enabled; vendor prese>
>
> Active: active (running) since Sat 2024-02-10 13:15:06 EST; 3min 37s ago
>
> Docs: man:tuned(8)
>
> man:tuned.conf(5)
>
> man:tuned-adm(8)
>
> Main PID: 1056 (tuned)
>
> Tasks: 6 (limit: 100264)
>
> Memory: 19.2M
>
> CGroup: /system.slice/tuned.service
>
> └─1056 /usr/libexec/platform-python -Es /usr/sbin/tuned -l -P
>
>
> Feb 10 13:15:05 ora21c.home.com systemd[1]: Starting Dynamic System Tuning Daemon
>
> Feb 10 13:15:06 ora21c.home.com systemd[1]: Started Dynamic System Tuning Daemon
>
>
> I also make sure that the oracle plugin is installed and turned into the
> active profile:
>
>
> [oracle_at_ora21c tuned]$ tuned-adm active
>
> Current active profile: oracle
>
>
> When I check the log, it changes a lot of parameters:
>
> parameter 'vm.dirty_ratio' from '40' to '10'
>
> 2024-02-10 13:15:06,175 INFO tuned.plugins.plugin_sysctl: Overriding sysctl parameter 'vm.dirty_background_ratio' from '3' to '5'
>
> 2024-02-10 13:15:06,175 INFO tuned.plugins.plugin_sysctl: Overriding sysctl parameter 'vm.dirty_ratio' from '40' to '10'
>
> 2024-02-10 13:15:06,176 INFO tuned.plugins.plugin_sysctl: Overriding sysctl parameter 'net.ipv4.ip_local_port_range' from '9000 65499' to '9000 65500'
>
> 2024-02-10 13:15:06,194 INFO tuned.plugins.plugin_sysctl: Overriding sysctl parameter 'vm.dirty_background_ratio' from '3' to '5'
>
> 2024-02-10 13:15:06,194 INFO tuned.plugins.plugin_sysctl: Overriding sysctl parameter 'vm.dirty_ratio' from '40' to '10'
>
> 2024-02-10 13:15:06,199 INFO tuned.plugins.plugin_sysctl: Overriding sysctl parameter 'net.ipv4.ip_local_port_range' from '9000 65499' to '9000 65500'
>
> 2024-02-10 13:15:06,218 INFO tuned.plugins.plugin_sysctl: Overriding sysctl parameter 'vm.dirty_background_ratio' from '3' to '5'
>
> 2024-02-10 13:15:06,218 INFO tuned.plugins.plugin_sysctl: Overriding sysctl parameter 'vm.dirty_ratio' from '40' to '10'
>
> 2024-02-10 13:15:06,219 INFO tuned.plugins.plugin_sysctl: Overriding sysctl parameter 'net.ipv4.ip_local_port_range' from '9000 65499' to '9000 65500'
>
> 2024-02-10 13:15:06,300 INFO tuned.plugins.plugin_vm: transparent_hugepage is already set in kernel boot cmdline, ignoring value from profile
>
> 2024-02-10 13:15:06,300 INFO tuned.daemon.daemon: static tuning from profile 'oracle' applied
>
>
> However, I don't see any particular benefits from it. Can anyone share any
> benefits realized by setting this "tuned" thingy up? Is that just another
> religious ritual we perform in vain hope that the applications running on
> that database will run faster? I guess that the only way would be to run
> SLOB with and without the "tuned" service but I am too lazy for that right
> now.
>
> --
>
> Mladen Gogala
> Database SME
> https://dbwhisperer.wordpress.com
>
>
-- Martin Berger Oracle ♠ martin.a.berger_at_gmail.com _at_martinberx <https://twitter.com/martinberx> ^∆x http://berxblog.blogspot.com -- http://www.freelists.org/webpage/oracle-lReceived on Sun Feb 11 2024 - 16:26:28 CET