Setting the Mailbox Database Cache Size

Messaging Server makes frequent calls to the mailbox database.
For this reason, it helps if this data is returned as quickly as possible.
A portion of the mailbox database is cached to improve Message Store performance.
Setting the optimal cache size can make a big difference in overall Message
Store performance. You set the size of the cache with the configutil parameter store.dbcachesize.

You should use the configutil parameter store.dbtmpdir to redefine the location of the mailbox database to /tmp,
that is, /tmp/mboxlist.

The mailbox database is stored in data pages. When the various daemons
make calls to the database (stored, imapd, popd), the system checks to see if the desired page is stored in
the cache. If it is, the data is passed to the daemon. If not, the system
must write one page from the cache back to disk, and read the desired page
and write it in the cache. Lowering the number of disk read/writes helps performance,
so setting the cache to its optimal size is important.

If the cache is too small, the desired data will have to be retrieved
from disk more frequently than necessary. If the cache is too large, dynamic
memory (RAM) is wasted, and it takes longer to synchronize the disk to the
cache. Of these two situations, a cache that is too small will degrade performance
more than a cache that is too large.

Cache efficiency is measured by hit rate. Hit rate
is the percentage of times that a database call can be handled by cache. An
optimally sized cache will have a 99 percent hit rate (that is, 99 percent
of the desired database pages will be returned to the daemon without having
to grab pages from the disk). The goal is to set the cache so that it holds
a number of pages such that the cache will be able to return at least 95 percent
of the requested data. If the direct cache return is less than 95 percent,
then you need to increase the cache size.