42 Messaging Server Tuning and Best Practices

This section describes tuning and best practices for Oracle Communications Messaging Server:

  • Keep historical logging data

  • Configuring Messaging Server Log File Rotation

    Oracle Communications Messaging Server provides logging facilities for the Messaging Server MTA, the Message Store, and services. The logging facilities provide you with time-stamped and labeled information about your system's messaging services. Using log files, you can gather message statistics, perform trend determination, troubleshoot problems, and so forth.

    While the system performs automatic rollovers to maintain the current log file, you must determine and manage log file rotation aspects such as how large a single log file may be, how large cumulative log files may be, how many log files to retain, and so forth.

    This section focuses on configuring log file rotation for the Messaging Server service logs, such as the IMAP service.

    For more information on managing Messaging Server log files, see the discussion on managing logging in the Messaging Server System Administrator's Guide.

    Log File Options (Unified Configuration)

    The following msconfig options pertain to log file rollover:

    • service.logfile.maxlogfilesize

    • .service.logfile.maxlogsize

    • .service.logfile.rollovertime

    • .service.logfile.maxlogfiles

      where service is admin, pop, imap, imta, or http.

    • maxlogfilesize sets the largest size for a given logfile. (The limit is 2 Gbytes, or 2147483648 bytes.)

    • maxlogsize sets the maximum value for the sum of the log file sizes.

    • maxlogfiles sets the number of svc.seqNum.timestamp files to keep.

    • rollovertime sets the interval or age of a file before its get rotated.

      You use the msconfig command to set these options. For example:

      msconfig set imap.logfile.maxlogfilesize 1073741824
      

    which sets the maximum size of an IMAP service log file to 1 Gbyte.

    Log File Options (legacy configuration)

    The following configutil options pertain to log file rollover:

    • logfile.service.maxlogfilesize

    • logfile.service.maxlogsize

    • logfile.service.rollovertime

    • logfile.service.maxlogfiles

      where service is admin, pop, imap, imta, or http.

    • maxlogfilesize sets the largest size for a given logfile. (The limit is 2 Gbytes, or 2147483648 bytes.)

    • maxlogsize sets the maximum value for the sum of the log file sizes.

    • maxlogfiles sets the number of svc.seqNum.timestamp files to keep.

    • rollovertime sets the interval or age of a file before its get rotated.

      You use the configutil command to set these options. For example:

      configutil -o logfile.imap.maxlogfilesize -v 1073741824
      

    which sets the maximum size of an IMAP service log file to 1 Gbyte.

    Log File Examples

    If the conditions at your site meet any one of the above controls, then the system rolls over the log file. Therefore, based on your site's traffic usage, you can set three of these msconfig options (or configutil options in legacy configuration) to be very large and unreachable while you set the fourth parameter to a value that forces the log to rollover in a manner that you want.

    For example, most sites want to retain logs covering specific time periods or time spans, say one week. In order to keep a week's worth of data, set the maxlogfiles option equal to N times the frequency with which you are performing the log file rotations.

    For instance, with the 1 Gbyte limit, you could rotate the files each hour (the rollover time is in seconds, so this is 3600 seconds) and just keep 168 copies of those individual files. Your option settings would then look like the following:

    • maxlogfilesize=1073741824

    • maxlogsize=VERY_BIG_NUMBER

    • rollovertime=3600

    • maxlogfiles=168

    Such settings give you 168 hours (7 days) worth of service log files which are at most 1 Gbyte in size. For VERY_BIG_NUMBER, start with 180388626432 (168 x 1073741824).

    Use your own custom settings if you prefer smaller log files, quicker log file rollover, and so forth. For example, you will get 336 log files if you set the rollover time to 1800 seconds, or each 30 minutes.

    Note: Setting the following options to zero (0) (or less than zero) results in the default value being used:

    maxlogfiles (default is 10)

    maxlogsize (default is 20971520)

  • Configure LMTP between front-end MTA and back-end store. For more information, see the discussion on LMTP delivery in the Messaging Server System Administrator's Guide.

  • Configure store.dbtmpdir to use a memory backed file system to reduce I/O

    Instructions for Messaging Server on Oracle Solaris:

    1. Configure store.dbtmpdir.

      cd /opt/sun/comms/messaging64/sbin
      msconfig set store.dbtmpdir /tmp/msg-server/
      

      or in legacy configuration:

      configutil -o store.dbtmpdir -v "/tmp/msg-server/"
      
    2. Start Messaging Server.

      cd /opt/sun/comms/messaging64/bin
      stop-msg
      start-msg
      

    Instructions for Messaging Server on Red Hat Linux:

    1. Configure store.dbtmpdir.

      cd /opt/sun/comms/messaging64/sbin
      msconfig set store.dbtmpdir /dev/shm/msg-server/
      

      or in legacy configuration:

      configutil -o store.dbtmpdir -v "/dev/shm/msg-server/"
      
    2. Start Messaging Server.

      cd /opt/sun/comms/messaging64/sbin
      stop-msg
      start-msg
      
  • Move mboxlist to separate ZFS or UFS file system with own LUN's

    Instructions for Messaging Server on Oracle Solaris:

    1. Stop Messaging Server - ensure stored process is stopped.

    2. Rename mboxlist directory to mboxlist.backup.

      cd /opt/sun/comms/messaging64/data/store/mv mboxlist mboxlist.backup
      
    3. Copy mboxlist database to new location.

      cp -Rp mboxlist.backup/* <new location>
      
    4. Ensure the directory permissions for new location are set to the Messaging Server user.

      chown mailsrv:mail <new location>
      
    5. Create symlink to new location.

      ln -s <new location> mboxlist
      
    6. Start Messaging Server.

  • Put MTA out ”front:”

    http://www.oracle.com/technetwork/systems/networking/preferred-deploy-mta-jsp-135699.html

  • Separate ZFS file system for email:

    https://blogs.oracle.com/factotum/entry/messaging_server_and_mailstore_best

  • Use imslog.pl to review MTA traffic and tune accordingly.

    • imslog.pl is available in the MessagingServer_home/examples/unsupported/ directory

  • MTA RBL lookup tuning in the discussion about performance tuning realtime blocklists (RBL) lookups in the Messaging Server Installation and Configuration Guide.

  • Messaging Server Considerations in the discussion of performance tuning considerations for a Messaging Server architecture in the Messaging Server Installation and Configuration Guide.

  • Reduce spam load.

  • Cache tuning:

    • Don't set excessive store mboxlist cache size

    • The default 16 MB cache is sufficient for most medium sized environments

    • Larger environments should review the following documentation to determine the best cache size

      For more information, see the discussion on store.dbtmpdir, base.lockdir (Unified Configuration) or local.lockdir (legacy configuration), and store.dbcachesize in the section about performance tuning considerations for a Messaging Server architecture in the Messaging Server Installation and Configuration Guide.

  • Number of Messaging Server processes:

    • Set imap.numprocesses(Unified Configuration) or service.imap.numprocesses (legacy configuration) to (the number of cores / 4). Increase imap.maxsessions (Unified Configuration) or service.imap.maxsessions (legacy configuration) as needed.

    • Set http.numprocesses (Unified Configuration) or service.http.numprocesses (legacy configuration) to 1. Increase http.numprocesses (Unified Configuration) or service.http.numprocesses (legacy configuration) as needed.

    • Monitor the number of threads (LWPs). If during peak load times the number of LWPs in the mshttpd or imapd processes is constantly over 200, you might need to increase numprocesses.

  • In a Convergence deployment, the webmail/mshttpd process should run on the same system as the Convergence instance:

    • Reduces network delays

    • Simplifies trouble-shooting

  • Linux: Change the IMTA_TMP option in the MTA tailor file (imta_tailor) to use a tmpfs such as /dev/shm. The default value is /tmp, which is a tmpfs on Solaris but on Linux is a disk file system.