Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1701394

Summary: tuned-profiles-sap: tuned.conf should not set kernel.sem lower than RHEL 8 default
Product: Red Hat Enterprise Linux 8 Reporter: Bernd Finger <bfinger>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: medium Docs Contact:
Priority: high    
Version: 8.0CC: bfinger, fdanapfe, hannsj_uhl, jeder, jskarvad, olysonek, rhack, tgummels
Target Milestone: rcKeywords: Patch, Upstream
Target Release: 8.1Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tuned-2.12.0-0.1.rc1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:31:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1654309, 1710589    

Description Bernd Finger 2019-04-18 20:45:22 UTC
Description of problem:
After activating tuned-profiles-sap (for example by executing sapconf), kernel.sem is set to:
# tuned-adm profile sap-netweaver
# sysctl kernel.sem
kernel.sem = 1250	256000	100	8192

However, the default values for each of the 4 kernel.sem parameters in RHEL 8 is much higher:
# tuned-adm off
# sysctl kernel.sem
kernel.sem = 32000	1024000000	500	32000


Version-Release number of selected component (if applicable):
2.10.0-14.el8

How reproducible:
See below.

Steps to Reproduce:
1. Install RHEL 8.
2. Install sapconf, which pulls tuned-profiles-sap.
3. Uncomment the call to check_rpms() (line 999) to avoid BZ 1670494 .
4. Start sapconf.

Actual results:
# tuned-adm profile sap-netweaver
# sysctl kernel.sem
kernel.sem = 1250	256000	100	8192

Expected results:
# tuned-adm off
# sysctl kernel.sem
kernel.sem = 32000	1024000000	500	32000

So line 14 of file /usr/lib/tuned/sap-netweaver/tuned.conf:
kernel.sem = 1250 256000 100 8192
needs to be removed for RHEL 8.

Additional info:

Comment 1 Ondřej Lysoněk 2019-04-23 09:27:07 UTC
In rhel-7, the defaults are the following:
$ sysctl kernel.sem
kernel.sem = 250	32000	32	128

So it appears the intent of the profile was indeed to raise the values.

However I was not able to dig up where the values in the Tuned profile came from, so I'm not able to verify that the rhel-8 defaults are sane. Jardo, could you help with that?

Comment 2 Jaroslav Škarvada 2019-04-24 09:06:38 UTC
Maybe Frank could answer this. Do we need to increase kernel.sem on RHEL-8 for SAP or are the defaults good enough? If there is a need to increase, to which values?

Comment 3 Frank Danapfel 2019-04-24 09:24:57 UTC
(In reply to Jaroslav Škarvada from comment #2)
> Maybe Frank could answer this. Do we need to increase kernel.sem on RHEL-8
> for SAP or are the defaults good enough? If there is a need to increase, to
> which values?

Sorry, I can't help here, since I'm actually not involved in any of the work realtead to SAP software on RHEL8. My colleague Bernd Finger who raised this bugzilla is responsible for the testing et. to get RHEL8 ready for running SAP products, therefore please work with him on this.

In general I would say if the defaults for this kernel parameter in RHEL8 are much higher than what the tuned profile is trying to set them to, then it would be better to keep the RHEL 8 defaults and remove the change of this kernel parameter from the tuned profile.

Comment 4 Bernd Finger 2019-04-24 09:57:30 UTC
RHEL 8 defaults are, as mentioned above:
kernel.sem = 32000	1024000000	500	32000

This is much higher than required by SAP, so there is no need to increase them.

I had discussed this and similar issues with SAP, and they are fine with using any parameter defaults in case they are higher than current SAP requirements.

The reason for setting the kernel.sem values to "1250	256000	100	8192" in RHEL 7 was that the defaults were lower in RHEL 7. As the defaults in RHEL 8 are much higher, there is no need for setting these values in tuned-profiles-sap any more.

Does this answer your question?

Comment 5 Jaroslav Škarvada 2019-04-24 12:02:56 UTC
Thanks for info, we will probably add conditional rule to the Tuned profile, i.e. it will increase the value only if it is lower.

Comment 6 Bernd Finger 2019-05-20 12:36:17 UTC
Would be great if the fix for this issue could be in RHEL 8.1.

Comment 7 Travis Gummels 2019-05-22 17:54:44 UTC
(In reply to Jaroslav Škarvada from comment #5)
> Thanks for info, we will probably add conditional rule to the Tuned profile,
> i.e. it will increase the value only if it is lower.

Jaroslav,

Will you be able to tackle this for 8.1?

Travis

Comment 8 Jaroslav Škarvada 2019-05-23 08:42:39 UTC
(In reply to Travis Gummels from comment #7)
> (In reply to Jaroslav Škarvada from comment #5)
> > Thanks for info, we will probably add conditional rule to the Tuned profile,
> > i.e. it will increase the value only if it is lower.
> 
> Jaroslav,
> 
> Will you be able to tackle this for 8.1?
> 
> Travis

Yes, we are going to address this in 8.1.

Comment 9 Ondřej Lysoněk 2019-05-30 14:38:55 UTC
(In reply to Jaroslav Škarvada from comment #5)
> Thanks for info, we will probably add conditional rule to the Tuned profile,
> i.e. it will increase the value only if it is lower.

The problem with that is that the '=>' operator (which can be used in Tuned profiles to achieve the conditional rule) does not currently support complex values such as '1250 256000 100 8192'. And it's not clear to me exactly how the operator should behave in this case. There might even be a relationship between the individual values. Changing the values independently could result in sub-optimal settings. I hope that makes sense.

So I propose we don't make this unnecessarily complicated and go with the same solution as we agreed in bug#1708418 - change the value in the profile to the RHEL-8 default.

Comment 10 Ondřej Lysoněk 2019-05-30 14:59:56 UTC
Bernd, should we change the value in all the SAP profiles (sap-hana-vmware, sap-hana, sap-netweaver), or just sap-netweaver? Thanks!

Comment 11 Ondřej Lysoněk 2019-05-30 15:20:38 UTC
Upstream pull request:
https://github.com/redhat-performance/tuned/pull/190

Comment 12 Ondřej Lysoněk 2019-06-06 08:46:23 UTC
(In reply to Ondřej Lysoněk from comment #10)
> Bernd, should we change the value in all the SAP profiles (sap-hana-vmware,
> sap-hana, sap-netweaver), or just sap-netweaver? Thanks!

I forgot we're removing sap-hana-vmware. So the question should be: do we need to change the value in the sap-hana profile as well as sap-netweaver?

Comment 13 Bernd Finger 2019-06-06 11:33:13 UTC
Hi Ondřej,

I could not find kernel.sem in the install guide for SAP HANA 2 SPS04 (which is the latest HANA version) nor in any other SAP note related to SAP HANA. However, as kernel.sem is in the current version of sap-hana/tuned.conf, and as we are just setting the RHEL 8 defaults, it should be safe to just put it in both tuned.conf files (for sap-netweaver and sap-hana). Also it is certainly useful for those cases where customers accidentally have lowered kernel.sem.

So please set this value in both the SAP profiles (sap-hana and sap-netweaver).

Comment 14 Robin Hack 2019-06-11 08:49:50 UTC
QA_ACK+ RHEL8.1

Comment 18 errata-xmlrpc 2019-11-05 22:31:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3633