Configuring IMAP internal thread use

The IMAP service acts as an intermediary between IMAP clients attempting to retrieve messages and the IBM® Domino® mail server. IMAP clients do not have direct access to mail files on the Domino server; instead, the IMAP service acts as a proxy, relaying each client's request to retrieve messages to the mail server. To return message data to the client, Domino opens the mail database and passes on the requested information to the IMAP service. The IMAP service then sends the requested message information to the client.

About this task

An IMAP session begins when a user at an IMAP client logs in to the Domino IMAP service. Domino allocates each IMAP session its own session thread from the server's main thread pool. This session thread becomes the sole channel for all communications between the client and the IMAP service. When the session ends, Domino returns the thread to the pool for use by another client.

The session thread communicates directly with the server's IMAP port to receive client input, validate the syntax of received requests, queue requests to the IMAP service, and send responses from the service back to the client. If the IMAP service is slow to respond, the main thread also sends periodic keep-alive messages to the client so that it does not close the connection.

A Domino server can interact with multiple clients simultaneously because it allocates a new thread to service each client session. Clients connect to a port and exchange all input and output through that port. Threads require memory and CPU time. The thread pool contains a limited number of physical threads, but thread use is virtualized so that a single thread works on different tasks. Thus in a fraction of a second, a single thread that is idled by one task as it waits for information, can switch to another task. This allows Domino to maximize processor use and minimize memory.

By avoiding the need to create a new physical thread for each requested connection, Domino makes the best use of available memory. However, a high number of IMAP sessions can place a strain on the server. If clients experience slow response during times of peak usage, consider limiting the number of IMAP sessions.

The internal IMAP thread pool

About this task

The Domino IMAP service provides an internal IMAP thread pool that is independent of the thread pool that Domino uses to create client sessions. The default number of available threads is based on the amount of physical memory the server has. The service has a minimum of 50 threads available and a maximum of 400 threads. To ensure that the IMAP service continues to function properly, it's best to use the default thread pool settings and modify these settings only at the direction of a qualified IBM support representative.

Available threads become active when the main session thread queues a request.

Table 1. Types of worker threads in the IMAP thread pool

Thread type

Description

Default maximum value

FETCH thread

Accepts validated FETCH commands from the client and transmits them to the Domino mail service

80% of pool total

FETCH response thread

Transmits message data from the Domino mail service to fulfill client FETCH requests

80% of pool total

LOGIN conversion thread

Converts mail files to IMAP format

None

Specifying IMAP thread use

Procedure

  1. Make sure you already have a Configuration Settings document for the server(s) to be configured.
  2. From the Domino Administrator, click the Configuration tab and expand the Messaging section.
  3. Click Configurations.
  4. Select the Configuration Settings document for the mail server or servers you want to restrict mail on, and click Edit Configuration.
  5. Click the IMAP > Advanced tab.
  6. In the Worker thread pool section, complete the following:
    Table 2. Worker thread pool options

    Field

    Description

    Maximum number of IMAP worker threads

    The total number of threads available in the IMAP service's thread pool, including Login conversion threads for upgrading mail files to Domino IMAP format; FETCH threads for transmitting validated client requests to the Domino mail server; and FETCH response threads for transmitting message data from the mail server in response to client FETCH requests.

    Maximum number of response threads per FETCH

    The number of threads available to transmit message data to fulfill a given FETCH request (default is 4).

    Maximum number of FETCH threads allowed

    The Number of concurrent threads the IMAP service can use to transmit client requests to FETCH message data to the Domino mail server

    Maximum number of FETCH response threads allowed

    The number of threads the IMAP service can use to return message data from the Domino mail server in response to FETCH requests received from all active IMAP sessions.