Message Cache

Message Cache

   KB 3600        Last updated on 07/12/2015  




0.00
(0 votes)

Overview

The message cache is an in-memory cache that stores the MIME structures of recently-accessed messages. By caching the MIME structures, we avoid having to reparse the blob on disk when a message is accessed multiple times. Since we're only caching the structure of the message and not the content, the size of each cache entry is small, usually 4k or less. The maximum number of messages in the cache is set by the zimbraMessageCacheSize server attribute. The default size is 2000. Message content is always read from disk. The expectation is that we cache the structure to avoid reparsing, and let the operating system's filesystem cache take care of caching the content.

The file descriptor cache allows us to use a bounded pool of file descriptors when accessing message bodies. It also limits the number of times that a file descriptor to a blob is opened and closed. The size of the cache is specified by the zimbraMailFileDescriptorCacheSize server attribute. The default size is 1000.

The uncompressed file cache stores uncompressed versions of blobs on disk. The first time a compressed blob is accessed, we write the uncompressed version to /opt/zimbra/data/tmp/uncompressed. When the file descriptor is closed or aged out of the file descriptor cache, we remove the associated blob from the uncompressed cache. The cache is cleared during server startup and shutdown.

Previous Behavior

In ZCS 5.0, the message cache stored not just the message structure, but also the content of messages less than 1MB. Messages larger than 1MB were streamed from disk and were estimated to take up 4k of space in the cache. zimbraMessageCacheSize was specified in bytes, as opposed to the number of messages. There was no uncompressed file cache in 5.0, so compressed blob content was read completely into memory, regardless of the file size.

In ZCS 6.0 through 6.0.6, the uncompressed file cache had its own limits: zimbraMailUncompressedCacheMaxFiles and zimbraMailUncompressedCacheMaxBytes. These attributes are no longer used as of ZCS 6.0.7. The uncompressed cache is now managed by the file descriptor cache, as described above. See bug 43497 for details.

Verified Against: ZCS 6.0.x Date Created: 5/13/2010
Article ID: https://wiki.zimbra.com/index.php?title=Message_Cache Date Modified: 07/12/2015



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search