Message Cache: Difference between revisions

m (Created page with '== 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 re…')
 
mNo edit summary
Line 1: Line 1:
== 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 size of the message cache is specified by the <tt>zimbraMessageCacheSize</tt> server attribute.  The default size is '''2000'''.
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 '''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 '''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 <tt>zimbraMailFileDescriptorCacheSize</tt> 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.  <tt>zimbraMessageCacheSize</tt> 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.

Revision as of 21:56, 13 May 2010

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.

Jump to: navigation, search