Message Cache: Difference between revisions

mNo edit summary
m (added footer and version icons)
Line 1: Line 1:
{{Article Infobox|{{user}}|{{ZCS 6.0}}|{{ZCS 5.0}}|}}
== Overview ==
== 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 <tt>zimbraMessageCacheSize</tt> 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 '''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 <tt>zimbraMessageCacheSize</tt> 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.
Line 11: Line 12:
In ZCS 6.0 through 6.0.6, the uncompressed file cache had its own limits: <tt>zimbraMailUncompressedCacheMaxFiles</tt> and <tt>zimbraMailUncompressedCacheMaxBytes</tt>.  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 [http://bugzilla.zimbra.com/show_bug.cgi?id=43497 bug 43497] for details.
In ZCS 6.0 through 6.0.6, the uncompressed file cache had its own limits: <tt>zimbraMailUncompressedCacheMaxFiles</tt> and <tt>zimbraMailUncompressedCacheMaxBytes</tt>.  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 [http://bugzilla.zimbra.com/show_bug.cgi?id=43497 bug 43497] for details.


{{Article Footer|ZCS 6.0.x|5/13/2010}}
[[Category:ZCS 6.0]]
[[Category:ZCS 5.0]]
[[Category:Architecture and Components]]
[[Category:Architecture and Components]]

Revision as of 00:34, 14 May 2010

User Article

Article Information

This article applies to the following ZCS versions.

ZCS 6.0 Article ZCS 6.0 ZCS 5.0 Article ZCS 5.0


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: 2010-05-14



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