Bug 1883339 - LDAP paging leaks memory
Summary: LDAP paging leaks memory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-keystone
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z3
: 16.1 (Train on RHEL 8.2)
Assignee: Lance Bragstad
QA Contact: Jeremy Agee
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-28 20:25 UTC by Raildo Mascena de Sousa Filho
Modified: 2024-03-25 16:36 UTC (History)
3 users (show)

Fixed In Version: openstack-keystone-16.0.2-1.20200828063420.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 18:36:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1896125 0 None None None 2020-09-28 20:34:56 UTC
OpenStack gerrit 754488 0 None MERGED Implement more robust connection handling for asynchronous LDAP calls 2021-02-10 10:04:32 UTC
Red Hat Product Errata RHEA-2020:5413 0 None None None 2020-12-15 18:37:21 UTC

Description Raildo Mascena de Sousa Filho 2020-09-28 20:25:39 UTC
Description of problem:

If you're using page_size [0] and are integrating keystone with an LDAP server that supports paging (like Active Directory), it's possible to see keystone memory footprint slowly increase over time.

The problem isn't as noticable with large page sizes (e.g., page_size = 10000). But it's noticable when you use small page sizes (e.g., page_size = 5).

I hit this issue using Active Directory with 10,000 users. I set my page_size to 5 and listed users continuously for an hour. During that time I noticed keystone's total memory consumption on the host increase from 5% to 14%.

Additionally, the problem is exacerbated using page_size = 1.

I was unsuccessful in reproducing this issue with FreeIPA, which is another LDAP implementation, but it doesn't support paging. Keystone automatically disables paging if the LDAP server doesn't support it.

It seems there is a memory leak somewhere in keystone's LDAP paging implementation.

[0] https://docs.openstack.org/keystone/latest/configuration/config-options.html#ldap.page_size

Version-Release number of selected component (if applicable): 
OSP16.1


How reproducible:
100% If you're using page_size [0] and are integrating keystone with an LDAP server that supports paging (like Active Directory) but it doesn't affect OSP if you're using FreeIPA

Steps to Reproduce:
1. Configure Keystone with a LDAP backend (live Active Directory) with paging enabled.
2. Creates a good amout of users (10,000 users on this example)
3. Keystone memory consumption will start to increase when you perform actions like list users.

Actual results: Keystone's total memory consumption on the host increase from 5% to 14%.


Expected results: Keyston's total memore consumption should be similar without using paging for LDAP backend


Additional info:

Comment 15 errata-xmlrpc 2020-12-15 18:36:58 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 (Red Hat OpenStack Platform 16.1.3 bug fix and enhancement 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/RHEA-2020:5413


Note You need to log in before you can comment on or make changes to this bug.