Message Batching
GreenArrow is able to processes messages internally in batches in the ram-queue for faster performance.
When message batching is enabled, all of the reports that show the
number of “messages” in the ram-queue (such as hvmail_status status)
will report the number of message batches instead of messages (although
the label will still say “messages”).
Message batching applies to:
- Email injected through SimpleMH.
- Email injected through an authenticated SMTP connection (either SMTP-AUTH or IP-based authentication).
Message batching does not apply to:
- Email injected through an un-authenticated SMTP connection that does not use SimpleMH.
- Email injected using the
sendmailorqmail-injectcommands that does not use SimpleMH. - Email that is internally generated by GreenArrow.
Settings
Batching is controlled with the following settings:
-
/var/hvmail/control/opt.simplemh.batch.max_messagesMaximum number of messages allowed in a single batch file.
Default:
1 -
/var/hvmail/control/opt.simplemh.batch.max_timeMaximum time in seconds to wait for messages before closing a batch. This is needed because messages do not arrive in batches but need to be collected together into batches.
Default:
1 -
/var/hvmail/control/opt.simplemh.batch.max_bytesMaximum bytes to allow in a message batch.
The default is automatically calculated from the
queue.ram.ramdisk.sizeandqueue.ram.ramdisk.messagesto prevent exhausting the storage in the ramdisk queue. We strongly recommend using this default. You may enter the textdefaultto get this default value.
These configuration files are automatically re-read each second.
Example
To enable batching, for example, run:
echo 10 > /var/hvmail/control/opt.simplemh.batch.max_messages
echo 2 > /var/hvmail/control/opt.simplemh.batch.max_time
echo default > /var/hvmail/control/opt.simplemh.batch.max_bytes
To disable message batching, run:
echo 1 > /var/hvmail/control/opt.simplemh.batch.max_messages
Caveat
Messages will be queued in batches, and some of Engine’s reporting does not differentiate between a message batch
and the messages in that batch. For example, the hvmail_status command will report each message batch as a
single message.
