Bug 1452739

Summary: Zero value of nsslapd-cache-autosize-split makes dbcache to be equal 0
Product: Red Hat Enterprise Linux 7 Reporter: Simon Pichugin <spichugi>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: nkinder, rmeggins
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.6.1-15.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 21:16:38 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 Simon Pichugin 2017-05-19 14:21:38 UTC
Description of problem:
According to the design document of the new autotuning feature, we can set nsslapd-cache-autosize-split to 0 and it will give 40% of memory to dbcache and 60 to entrycache. Currently, when we set nsslapd-cache-autosize-split to 0 it makes nsslapd-dbcachesize = 0.

Version-Release number of selected component (if applicable):
389-ds-base-1.3.6.1-13.el7.x86_64

How reproducible:
Allways

Steps to Reproduce:
1. Install the instance

2. Stop the instance

3. In the dse.ldif, set nsslapd-cache-autosize-split: 0 (cn=config,cn=ldbm database,cn=plugins,cn=config).

4. Start the instance

5. Check nsslapd-dbcachesize value:
[root@test upstream]# ldapsearch -h localhost -p 389 -D "cn=Directory manager" -w Secret123 -b "cn=config,cn=ldbm database,cn=plugins,cn=config" -s base nsslapd-dbcachesize
dn: cn=config,cn=ldbm database,cn=plugins,cn=config
nsslapd-dbcachesize: 0

6. Check errors log:
[root@test upstream]# tail /var/log/dirsrv/slapd-test/errors
[19/May/2017:09:59:08.985987463 -0400] - INFO - main - slapd stopped.
[19/May/2017:10:00:32.418844117 -0400] - INFO - main - 389-Directory/1.3.6.1 B2017.125.237 starting up
[19/May/2017:10:00:32.427530683 -0400] - INFO - ldbm_instance_config_cachememsize_set - force a minimal value 512000
[19/May/2017:10:00:32.433748015 -0400] - NOTICE - ldbm_back_start - found 1883520k physical memory
[19/May/2017:10:00:32.435366864 -0400] - NOTICE - ldbm_back_start - found 1558272k avaliable
[19/May/2017:10:00:32.436475963 -0400] - NOTICE - ldbm_back_start - cache autosizing: db cache: 0k
[19/May/2017:10:00:32.437401841 -0400] - NOTICE - ldbm_back_start - cache autosizing: userRoot entry cache (1 total): 196608k
[19/May/2017:10:00:32.439956036 -0400] - NOTICE - ldbm_back_start - total cache size: 218103808 B;
[19/May/2017:10:00:32.441461907 -0400] - INFO - dblayer_start - Resizing db cache size: 61719183 -> 0
[19/May/2017:10:00:32.515365798 -0400] - INFO - slapd_daemon - slapd started.  Listening on All Interfaces port 389 for LDAP requests


Actual results:
nsslapd-dbcachesize was set to 0.


Expected results:
nsslapd-dbcachesize should be set to the value of 40% from allocated memory.

Comment 2 Simon Pichugin 2017-05-22 07:37:36 UTC
Upstream ticket: https://pagure.io/389-ds-base/issue/49267

Comment 4 Simon Pichugin 2017-05-30 08:48:05 UTC
Build tested:
389-ds-base-1.3.6.1-15.el7.x86_64

Verification steps:
1. Setup the instance.

2. Set nsslapd-cache-autosize-split: 0 and restart the instance:
[root@qeos-176 ds]# ldapmodify -h localhost -p 389 -D "cn=Directory manager" -w Secret123
dn: cn=config,cn=ldbm database,cn=plugins,cn=config
changetype: modify
replace: nsslapd-cache-autosize-split
nsslapd-cache-autosize-split: 0

modifying entry "cn=config,cn=ldbm database,cn=plugins,cn=config"

[root@qeos-176 ds]# restart-dirsrv
Restarting instance "qeos-176"

3. Check nsslapd-dbcachesize value:
[root@qeos-176 upstream]# ldapsearch -h localhost -p 389 -D "cn=Directory manager" -w Secret123 -b "cn=config,cn=ldbm database,cn=plugins,cn=config" -s base nsslapd-dbcachesize
dn: cn=config,cn=ldbm database,cn=plugins,cn=config
nsslapd-dbcachesize: 61719183

4. Check errors log:
[root@qeos-176 ds]# tail /var/log/dirsrv/slapd-qeos-176/errors
[30/May/2017:04:45:31.990055214 -0400] - INFO - connection_post_shutdown_cleanup - slapd shutting down - freed 1 work q stack objects - freed 1 op stack objects
[30/May/2017:04:45:32.824174672 -0400] - INFO - main - slapd stopped.
[30/May/2017:04:45:32.965716100 -0400] - INFO - main - 389-Directory/1.3.6.1 B2017.143.155 starting up
[30/May/2017:04:45:32.976409178 -0400] - INFO - ldbm_instance_config_cachememsize_set - force a minimal value 512000
[30/May/2017:04:45:32.985001870 -0400] - NOTICE - ldbm_back_start - found 1883520k physical memory
[30/May/2017:04:45:32.985681404 -0400] - NOTICE - ldbm_back_start - found 1499968k available
[30/May/2017:04:45:32.986178920 -0400] - NOTICE - ldbm_back_start - cache autosizing: db cache: 75340k
[30/May/2017:04:45:32.986747611 -0400] - NOTICE - ldbm_back_start - cache autosizing: userRoot entry cache (1 total): 131072k
[30/May/2017:04:45:32.989662831 -0400] - NOTICE - ldbm_back_start - total cache size: 212714127 B;
[30/May/2017:04:45:33.064815867 -0400] - INFO - slapd_daemon - slapd started.  Listening on All Interfaces port 389 for LDAP requests

Results: nsslapd-dbcachesize was set properly. Marking as verified.

Comment 5 errata-xmlrpc 2017-08-01 21:16:38 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-2017:2086