Filter cache and entry cache size are measured in numbers
of entries. To determine the number of entries to cache in the LDAP
caches, you must find how large the entries in the caches are.
About this task
You can calculate the average size of an entry in a sample
entry cache, but the average filter cache entry size can be calculated
similarly.
Procedure
- Log in with the directory server instance owner credentials.
- Take the following actions on the LDAP server:
- Set the filter cache size to 0.
- Set the entry cache size to a small value. For example,
200.
- Start the
ibmslapd process of an instance.
- Take the following actions from the client:
- Run your application.
- Run the following command to find the entry
cache population, population1:
ldapsearch -h server -p port -s base -b cn=monitor objectclass=*
| grep entry_cache_current
- Take the following actions on the LDAP Server:
- Run the following command to find the memory
that is used by the
ibmslapd process, ibmslapd1:
| Platform |
Run this command: |
| AIX® |
ps -e -o vsz -o command | grep ibmslapd |
| Windows™ |
|
- Stop the
ibmslapd process.
- Increase the size of the entry cache but keep it smaller
than your working set.
- Start the
ibmslapd process.
- Run your application again and find the entry cache population, population2.
ldapsearch -h server -p port -s base -b cn=monitor objectclass=*
| grep entry_cache_current
- Find the memory that is used by the
ibmslapd process, ibmslapd2.
- Calculate the size of an entry cache entry by using the
following formula:
(ibmslapd size2 - ibmslapd
size1)/(entry cache population2 - entry
cache population1)
Results
For example, when you use the formula for a 500000 entry
database, the following entry size is calculated:
(192084 KB – 51736 KB) / (48485 – 10003) = 3.65 KB per entry