A customer asked me:
My ops team wants to use the Oracle Database 23ai preinstallation RPM for all our new servers. For now, the servers will host Oracle Database 19c only. In the future, we will use Oracle Database 23ai on those servers as well.
The preinstallation RPM contains instructions on which packages to install and which system settings to set. According to the Oracle Database 19c Installation Guide for Linux, this is how you run it:
dnf install oracle-database-preinstall-19c
Let’s find out whether you can use the 23ai preinstallation RPM for 19c.
Inspecting the Package
-
I use an Oracle Linux 8 test system. First, I install both packages:
dnf -y install oracle-database-preinstall-19c dnf -y install oracle-database-preinstall-23ai -
Next, I look at the files in the 19c RPM:
rpm -ql oracle-database-preinstall-19c /etc/rc.d/init.d/oracle-database-preinstall-19c-firstboot /etc/security/limits.d/oracle-database-preinstall-19c.conf /etc/sysconfig/oracle-database-preinstall-19c /etc/sysconfig/oracle-database-preinstall-19c/oracle-database-preinstall-19c-verify /etc/sysconfig/oracle-database-preinstall-19c/oracle-database-preinstall-19c.param /usr/bin/oracle-database-preinstall-19c-verify /usr/share/licenses/oracle-database-preinstall-19c /usr/share/licenses/oracle-database-preinstall-19c/LICENSE /var/log/oracle-database-preinstall-19c /var/log/oracle-database-preinstall-19c/results -
The file
oracle-database-preinstall-19c.paramcontains the settings, groups, and users. In the 23ai RPM, there is a similar file,oracle-database-preinstall-23ai.param. I can compare the two files to see any differences:#Remove comments before comparing sed '/^\(#\|kernelcomment\|usercomment\)/d' /etc/sysconfig/oracle-database-preinstall-19c/oracle-database-preinstall-19c.param > /tmp/19c.params sed '/^\(#\|kernelcomment\|usercomment\)/d' /etc/sysconfig/oracle-database-preinstall-23ai/oracle-database-preinstall-23ai.param > /tmp/23ai.params diff /tmp/19c.params /tmp/23ai.params -
Then, I can analyze the differences.
<is the 19c setting,>is the 23ai setting.28c28 < kernel:*:*:*:net.ipv4.ip_local_port_range:9000 65500 --- > kernel:*:*:*:net.ipv4.ip_local_port_range:9000 65535- Port range extended in 23ai.
52,53c52 < boot:x86_64:*:*:*:numa:off < boot:*:*:*:*:transparent_hugepage:never --- > boot:*:*:*:*:numa:off > boot:*:*:*:*:transparent_hugepage:madvise- NUMA off for all architectures. Not a big deal, as this is Oracle Linux and Oracle Database runs on 64-bit architecture only.
- But there is a change in the setting for transparent hugepages. Knowing how much havoc transparent hugepages have caused, this is an important change. I’ll get back to that.
63a63,64 > kernel:*:*:*:kernel.panic:10- Adding a kernel panic setting. Shouldn’t cause any concern.
Transparent Hugepage
-
The setting for transparent hugepages changes from
nevertomadvise. In this setting, the kernel only assigns huge pages to application processes that explicitly request huge pages through themadvise()system call (ref. Oracle Linux 8 – Configuring Huge Pages). -
The 23ai installation guide lists:
For optimal performance, Oracle recommends that you set Transparent HugePages to madvise on all Oracle Database servers UEK7 and later kernels and not disable Transparent HugePages as was recommended in prior releases.
-
Let me check my kernel version:
uname -r 5.15.0-307.178.5.el8uek.x86_64el8uekmeans my kernel is UEK8, so I can use the new setting on this system.
-
But I will use this server for Oracle Database 19c and 23ai, so can I use the new
madvisesetting?Transparent huge page memory is enabled by default on Oracle Linux and Exadata. The ‘madvise’ parameter used in the kernel command enables transparent huge pages and assigns huge pages to memory regions explicitly requested by applications using the madvise system call. In the case that Oracle Database 19c and 23ai are running on the same server, Oracle recommends setting transparent huge pages to ‘madvise’.
-
So, it should be safe to run with the new setting for Oracle Database 19c. If you are concerned, you can revert to
neveruntil you install Oracle Database 23ai.
Packages
- I can find the dependencies of the two preinstallation RPMs:
rpm -qR oracle-database-preinstall-19c > /tmp/19c.pkgs rpm -qR oracle-database-preinstall-23ai > /tmp/23ai.pkgs - Then, I can find the difference:
diff /tmp/19c.pkgs /tmp/23ai.pkgs - There are many differences because the 23ai RPM now lists minimum versions for many packages. Assuming that you automatically install the latest version of the packages, I will disregard those differences.
- This brings me to this list. These dependencies are not part of the 23ai RPM:
ethtool libaio-devel libnsl libstdc++-devel openssl-libs- I would need to install those manually if I wanted to use the 23ai RPM.
- For completeness, these are the new packages in the 23ai RPM:
fontconfig >= 2.13.1 policycoreutils policycoreutils-python-utils
Conclusion
You can use the 23ai preinstallation RPM if you take care of the missing packages.
I recommend running both preinstallation RPMs instead in the listed order:
dnf install oracle-database-preinstall-19c
dnf install oracle-database-preinstall-23ai
Then, you proceed with installation of Oracle homes using AutoUpgrade.
Happy installing!
Appendix
Credits
A thank-you to Rodrigo Jorge for helping with this article.
Hi.
I have 2 follow questions regarding THP.
You wrote that the recommendation is changed in 23ai. You also refer, if I am not mistaken, to OL8.
Thanks
Anthony
LikeLike
Hi,
I checked the changes on a test system that was running OL8. According to the installation guide reference in the blog post, there is no changes between OL8 and OL9. Only the kernel version is listed and it’s an old one, so I assume that most (any?) OL8/OL9 systems would work fine.
1. To my knowledge only there’s only a benefit of running with THP on Oracle Database 23ai. And it’s not the “core” database that uses THP, but processes like Oracle Text.
2. Not to my knowlegde. As written above, the installation guide references only the kernel version as a requirement.
I hope that helps,
Daniel
LikeLike
Good article! I also recall a recent note/update about Oracle being able to use hugepages for the Oracle binary executable code (.text) sections to reduce CPU iTLB misses for executed instructions. I guess madvise() syscalls on some executable parts of the address space are used for that:
https://blogs.oracle.com/exadata/post/huge-pages-or-transparent-huge-pages-in-context-of-exadata
LikeLike
… And now I see you already linked to exactly that same blog post :-)
LikeLike
It’s OK ;)
LikeLike
“Only the kernel version is listed and it’s an old one, so I assume that most (any?) OL8/OL9 systems would work fine.”
We are setting up new servers with OL9. Do you have any plans to test this out with OL9?
Thanks!
LikeLike
Hi,
I don’t have any plans for doing that on OL9, but it is simple to check on your OL9 environments. With “uname -r” as written in the post, you can find the kernel version. I’d be surprised if your OL9 didn’t meet this requirement.
Regards,
Daniel
LikeLike
Daniel:
Very good article. It will help us to future upgrade from 19c to 23ai. Thanks a lot.
Frank
LikeLike
Hi Frank,
That’s good to hear.
Regards,
Daniel
LikeLike