GreenArrow Documentation

MultiQueue

Overview

MultiQueue is a feature that allowed GreenArrow Studio to queue messages to GreenArrow Engine more efficiently. This reduces CPU and memory IO overhead.

MultiQueue is disabled by default because it is in beta. When the caveats are removed this will become the default.

Enabling MultiQueue

  1. Set the /var/hvmail/control/studio.use_direct_injection.batch_size file equal to the maximum number of messages which Studio should write to the same file. For example, to set this limit to 20, run:

      echo 20 > /var/hvmail/control/studio.use_direct_injection.batch_size
    
  2. Update the ram-queue’s size to be one of the options whose name ends in _multiqueue.

  3. Restart Studio’s worker to apply changes:

     svc -t /service/hvmail-studio-worker
     sleep 7
     svstat /service/hvmail-studio-worker
    

Disabling MultiQueue

  1. Delete MultiQueue’s configuration file:

     rm -f /var/hvmail/control/studio.use_direct_injection.batch_size
    
  2. Update the ram-queue’s size to be one of the options whose name does not end in _multiqueue.

  3. Restart Studio’s worker to apply changes:

     svc -t /service/hvmail-studio-worker
     sleep 7
     svstat /service/hvmail-studio-worker
    

Caveats

  1. 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.

  2. When GreenArrow Engine is running at speed capacity with a fully utilized ram-queue, enabling MultiQueue will cause Studio will be able to “hog” a larger percentage of the total system capacity compared to non-Studio email sent through Engine.