Service manual
Optimizing For Searches
120 Sun ONE Directory Server Installation and Tuning Guide • June 2003
As a rough estimate of the number of entry cache slots and the amount of memory
needed for all entries to fit in the entry cache, use the following formulas. Again
these formulas are approximately accurate for default index configuration used
with typical entries having no large binary attributes such as photos.
nsslapd-cachesize = 4.5 x (number of entries in LDIF)
nsslapd-cachememsize = 3.8 x (id2entry.db3 file size)
Verify and correct estimates through empirical testing. Entry caches in particular
may use much more memory than you allocate to them.
Plenty of Memory, 32-Bit Directory Server
Imagine a system with sufficient memory to hold all data in entry and database
caches, but no support for a 64-bit Directory Server process. If hardware
constraintspreventyoufrom deployingon a Solarissystem, forexample,thekeyis
to size caches appropriately with respect to memory limitations for 32-bit
processes, then to leave available memory to the file system cache.
Less Memory, Some File System Cache
Imagine a system with insufficient available memory to hold all data in entry and
database caches, but yet with still significant available memory. The key in this
case is to avoid causing combined entry and database cache sizes to exceed the
available physical memory, resulting in heavy virtual memory paging that could
bring the system to a virtual halt.
Consider leaving available memory to the file system cache, setting entry cache
and database cache sizes to low figures such as 500 KB. By doing this, you may
permit the system to retain enough data in the file system cache to end searches
there, before Directory Server must repeatedly read entries and indexes from the
disk.
NOTE File system cache is shared with other processes on the system,
especially file based operations. Itis thus considerably more difficult
to control than other caches, particularly on systems not dedicated
to Directory Server.
The system may reallocate file system cache to other processes.