QA:Testcase Create normalized dn cache testcase2

From FedoraProject

Jump to: navigation, search

Description

This feature gives a slight performance boost under certain circumstances. DN normalization is an expensive task. Keeping normalized DN's in memory should be more efficient.

When attempting to normalize a DN, first check if that DN has already been normalized(we are currently using the NSPR hash table to store all the DN's - with a bucket size of 2053). If the DN is not in the hash table, then we normalize it and add it to the hash table. Since the hash table size is limited, there is also a LRU list used to determine which DN's can be dropped from the hash when it becomes full. When the hash table fills up, we remove 10000 of the "Least Recently Used" DN's from the table. However, we always maintain a minimum of 1000 DN's in the hash table.

see Design Page for more details on design


How to test

1. Install 389 ds package.

yum install 389-ds-base

This will install 389-ds-base and 389-ds-base-libs as dependency package. Package related information RPM Download Help

2. Now setup the Directory Server instance using setup-ds.pl

setup-ds.pl

This will ask you for some configuration questions, carefully read and answer. Optionally you can make answer file to setup the instance.

3. At the end of the setup, a message will display as:

Your new DS instance 'dhcp201-149_1' was successfully created.
Exiting . . .
Log file is '/tmp/setupYzgw2O.log

This means your DS instance is ready.

4. check the default value of new attribute nsslapd-ndn-cache-enabled ldapsearch -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 -b "cn=config"

Expected Results

It should be off by default.