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 1523183 - search with CoS attribute is getting slower after modifying/adding CosTemplate
Summary: search with CoS attribute is getting slower after modifying/adding CosTemplate
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.4
Hardware: All
OS: All
urgent
urgent
Target Milestone: rc
: ---
Assignee: mreynolds
QA Contact: Viktor Ashirov
Marc Muehlfeld
URL:
Whiteboard:
Depends On:
Blocks: 1526928
TreeView+ depends on / blocked
 
Reported: 2017-12-07 11:27 UTC by Hiroko Miura
Modified: 2021-03-11 16:33 UTC (History)
9 users (show)

Fixed In Version: 389-ds-base-1.3.7.5-12
Doc Type: Bug Fix
Doc Text:
Using a large number of CoS templates no longer slow down the virtual attribute processing time Due to a bug, using a large number of Class of Service (CoS) templates in Directory Server increased the virtual attribute processing time. This update improves the structure of the CoS storage. As a result, using a large number of CoS templates no longer increases the virtual attribute processing time.
Clone Of:
: 1526928 (view as bug list)
Environment:
Last Closed: 2018-04-10 14:23:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
sample ldif to reproduce the issue (114.91 KB, application/zip)
2017-12-07 11:27 UTC, Hiroko Miura
no flags Details
Resolve mm issue with vattr (10.12 KB, patch)
2017-12-11 16:59 UTC, wibrown@redhat.com
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2554 0 None None None 2020-09-13 22:06:25 UTC
Red Hat Product Errata RHBA-2018:0811 0 None None None 2018-04-10 14:24:44 UTC

Description Hiroko Miura 2017-12-07 11:27:54 UTC
Created attachment 1364283 [details]
sample ldif to reproduce the issue

Description of problem:

When using Indirect Cos like the following,

dn: cn=cosDefinition,dc=test,dc=com
objectClass: top
objectClass: ldapsubentry
objectClass: cossuperdefinition
objectClass: cosIndirectDefinition
cosAttribute: ou merge-schemes
cosAttribute: description merge-schemes
cosAttribute: postalCode merge-schemes
cn: cosDefinition
cosIndirectSpecifier: seeAlso

search takes longer than before after cosTemplate entries are added/modified.


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

389-ds-base-1.3.6.1-24.el7_4.x86_64 


How reproducible:

This can be reproduced with attached sample LDIF.


Steps to Reproduce:
1. create suffix dc=test,dc=com and import test.ldif 
   (or adjust suffix accordingly)

2. run the following search

ldapsearch -D "cn=directory manager" -w password -b dc=test,dc=com uid=user1

  => this return the result immediately

3. add new cosTemplcate by the following command

ldapmodify -D "cn=directory manager" -w password  -a -c -f ou10000.ldif

   stop ldapmodify after adding about 500 entries by CTRL+C


4. run the same search

ldapsearch -D "cn=directory manager" -w password -b dc=test,dc=com uid=user1

  => this will take a time than step 2

5. add new cosTemplcate by the following command again

ldapmodify -D "cn=directory manager" -w password  -a -c -f ou10000.ldif

   stop ldapmodify after adding around 500 entries by CTRL+C

6. run the same search

ldapsearch -D "cn=directory manager" -w password -b dc=test,dc=com uid=user1

  => this will take a time than step 2 and 4

7. add additional Cos Identifier attribute

  ldapmodify -D "cn=directory manager" -w password -a -f addCosIdentifier.ldif
  

8. run the same search

ldapsearch -D "cn=directory manager" -w password -b dc=test,dc=com uid=user1

  => this will take too time than before (Cos works as expected though)


9. restart server and do the same search

  => this returns entry immediately


Actual results:
search takes longer time than before

Expected results:
search returns result soon

Additional info:
This happen after applying 389-ds-base-1.3.6.1-24.el7_4.x86_64.
But this does not happen with 389-ds-base-1.3.6.1-23.el7_4.x86_64

Comment 9 wibrown@redhat.com 2017-12-11 09:32:29 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/49495

Comment 16 wibrown@redhat.com 2017-12-11 16:59:50 UTC
Created attachment 1366205 [details]
Resolve mm issue with vattr

This patch resolves the issue. This has been resolved upstream on affected branches.

Comment 18 Marc Sauton 2017-12-14 00:53:37 UTC
patch was confirmed good, making this bz 1523183 a RHEL-7.4.z candidate for the sf customer case number 01987672
to be reviewed tomorrow with dev and qe.

Comment 23 Viktor Ashirov 2018-01-30 13:04:30 UTC
Build tested:
389-ds-base-1.3.7.5-14.el7.x86_64


CoS test suite from acceptance tests passes 100% without a crash.

CoS scale stress test passes:
===================================================================== test session starts =====================================================================
platform linux -- Python 3.6.3, pytest-3.3.2, py-1.5.2, pluggy-0.6.0 -- /opt/rh/rh-python36/root/usr/bin/python3
cachedir: .cache
metadata: {'Python': '3.6.3', 'Platform': 'Linux-3.10.0-837.el7.x86_64-x86_64-with-redhat-7.5-Maipo', 'Packages': {'pytest': '3.3.2', 'py': '1.5.2', 'pluggy': '0.6.0'}, 'Plugins': {'metadata': '1.5.1', 'html': '1.16.1'}}
389-ds-base: 1.3.7.5-14.el7
nss: 3.34.0-4.el7
nspr: 4.17.0-1.el7
openldap: 2.4.44-12.el7
svrcore: 4.1.3-2.el7

rootdir: /export/tests, inifile:
plugins: metadata-1.5.1, html-1.16.1
collected 1 item                                                                                                                                              

stress/cos/cos_scale_template_test.py::test_indirect_template_scale PASSED                                                                              [100%]

------------------------------------------------ generated xml file: /mnt/tests/rhds/tests/upstream/report.xml ------------------------------------------------
----------------------------------------------- generated html file: /mnt/tests/rhds/tests/upstream/report.html -----------------------------------------------
================================================================== 1 passed in 62.78 seconds ==================================================================

Comment 27 errata-xmlrpc 2018-04-10 14:23:50 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-2018:0811


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