If the directory data do not fit into available physical memory, or only just fit with no extra room to spare, set cache sizes to their default values, 32M for db-cache-size, 10M for entry-cache-size, and allow the server to use as much of the operating system's file system cache as possible. Run tests to correctly dimension the sizes based on your throughput.
If the directory data fit into available physical memory with physical memory to spare, allocate memory to the entry cache until either the entry cache is full or, on a 32–bit system, the entry cache reaches maximum size. Then allocate memory to the database cache until it is full or reaches maximum size.
See Configuring Memory in Sun Directory Server Enterprise Edition 7.0 Administration Guide for instructions on setting cache sizes.