Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2258609

Summary: [RFE] Disable Transparent Huge Pages when using large caches.
Product: Red Hat Directory Server Reporter: thierry bordaz <tbordaz>
Component: 389-ds-baseAssignee: Viktor Ashirov <vashirov>
Status: CLOSED ERRATA QA Contact: LDAP QA Team <idm-ds-qe-bugs>
Severity: high Docs Contact: Evgenia Martynyuk <emartyny>
Priority: unspecified    
Version: 12.4CC: bsmejkal, idm-ds-dev-bugs, msauton, musoni
Target Milestone: DS12.4Keywords: FutureFeature, Triaged
Target Release: dirsrv-12.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: redhat-ds-12-9040020240116164822-1674d574 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-07 00:15:40 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:

Description thierry bordaz 2024-01-16 13:57:40 UTC
Description of problem:
This is a RHDS clone of RHEL bug 2131246

As described in bug 2068120, THP can have negative effects on RHDS performance.
This seems to happen with large caches.
Some customers are getting uncontrolled memory usage while others are seeing high CPU consumption.
It would make sense to either disable THP for RHDS or at least add some messages in the errors logs.
RHDS healthcheck tool should also report when THP is enabled on the system.

Version-Release number of selected component (if applicable):
This is impacting all RHDS 11 and 12 versions.

How reproducible:
At customer sites.

Steps to Reproduce:
1. Configure large caches ( > 50 GB )
2. Check memory and CPU usage when RHDS is under heavy load
3. Disable THP ==> RHDS uses less memory and CPU


Actual results:
High memory and CPU usage.

Expected results:
Controlled memory and CPU usage.

Additional info:
    https://access.redhat.com/solutions/3799821

Comment 5 bsmejkal 2024-03-22 14:24:28 UTC
Build tested:
389-ds-base-2.4.5-2.module+el9dsrv+21124+30a62ae9.x86_64

Default settings on clean machine:

# grep THP /proc/$(pidof ns-slapd)/status
THP_enabled:	0

# systemctl edit dirsrv@localhost
...
# # Disable Transparent Huge Pages
# Environment=THP_DISABLE=1


============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.9.18, pytest-7.4.4, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.9.18', 'Platform': 'Linux-5.14.0-427.4.1.el9_4.x86_64-x86_64-with-glibc2.34', 'Packages': {'pytest': '7.4.4', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '3.1.1', 'html': '4.1.1', 'libfaketime': '0.1.2', 'flaky': '3.8.1'}}
389-ds-base: 2.4.5-2.module+el9dsrv+21124+30a62ae9
nss: 3.90.0-6.el9_3
nspr: 4.35.0-6.el9_3
openldap: 2.6.6-3.el9
cyrus-sasl: 2.1.27-21.el9
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests
configfile: pytest.ini
plugins: metadata-3.1.1, html-4.1.1, libfaketime-0.1.2, flaky-3.8.1
collected 4 items                                                                                                                                                                                                                            

dirsrvtests/tests/suites/healthcheck/health_tunables_test.py::test_healthcheck_transparent_huge_pages[System and Instance THP ON] PASSED                                                                                               [ 25%]
dirsrvtests/tests/suites/healthcheck/health_tunables_test.py::test_healthcheck_transparent_huge_pages[System THP ON, Instance THP OFF] PASSED                                                                                          [ 50%]
dirsrvtests/tests/suites/healthcheck/health_tunables_test.py::test_healthcheck_transparent_huge_pages[System THP OFF, Instance THP ON] PASSED                                                                                          [ 75%]
dirsrvtests/tests/suites/healthcheck/health_tunables_test.py::test_healthcheck_transparent_huge_pages[System THP OFF, Instance THP OFF] PASSED                                                                                         [100%]

============================================================================================================= 4 passed in 41.36s =============================================================================================================

Marking as VERIFIED.

Comment 7 errata-xmlrpc 2024-05-07 00:15:40 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 (redhat-ds:12 bug fix and enhancement update), 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/RHEA-2024:2718