Issue
What were you trying to do that didn't work?
Set the value for parameter vm.max_map_count to 2147483647 when switching to tuned profile sap-netweaver on a system which does not contain vm.max_map_count in a file in directory /etc/sysctl.d
Please provide the package NVR for which bug is seen:
tuned-profiles-sap-2.20.0-1.el8
How reproducible:
Always
Steps to reproduce
Ensure that the parameter vm.max_map_count is not in any file in /etc/sysctl.d:
cd /etc/sysctl.d
grep -rn vm.max_map_count
echo $?
1
Install tuned-profiles-sap:
dnf install tuned-profile-sap
Switch to tuned profile sap-netweaver:
tuned-adm profile sap-netweaver
Display the value of vm.max_map_count:
sysctl vm.max_map_count
vm.max_map_count = 2000000
Expected results
According to applicable SAP notes for RHEL 8, vm.max_map_count is to be set to 2147483647. This is currently implemented in the RHEL System Roles for SAP for both RHEL releases, by configuring the file /etc/sysctl.d/sap.conf accordingly.
But when using the tuned profile sap-netweaver and the parameter vm.max_map_count is not set in a flie in /etc/sysctl.d, the parameter vm.max_map_count also needs to be set to the correct value of 2147483647.
So the tuned profile sap-netweaver needs to be updated from:
vm.max_map_count = 2000000
to:
vm.max_map_count = 2147483647
Actual results
The file /usr/lib/tuned/sap-netweaver/tuned.conf contains in the [sysctl] section:
vm.max_map_count = 2000000
When running "tuned-adm profile sap-netweaver" for switching to this profile on a RHEL 9.2 system which has the file /etc/sysctl.d/sap.conf with the following line:
vm.max_map_count=2147483647
, the setting of vm.max_map_count will remain on the value of 2147483647, meaning it will not be lowered to 2000000.
The corresponding entry in file /var/log/tuned/tuned.log is:
2024-04-04 11:14:34,245 INFO
tuned.plugins.plugin_sysctl: Overriding sysctl parameter 'vm.max_map_count' from '2000000' to '2147483647'
But when using the tuned profile sap-netweaver and the parameter vm.max_map_count is not set in a file in /etc/sysctl.d, the parameter vm.max_map_count will be set to the wrong value of 2000000.