Posts Tagged ‘inbox’

How to tune AR Email Engine to get optimal permormance?

August 10th, 2011

ar system email engine

I have stumbled up on a amazing write up by Chad Hall on ARS List as an reply to a question regarding fine tuning email engine to process 100’s of emails at regular intervals and though out the day. The suggestions by Chad Hill are some of the best known practices we use and mentioned by BMC on some documents but he added several that are only known to few who had to build such systems which need to process high frequency of emails every minute.

Here are the points listed by Chad:

There are several things you can do to speed up emails. We have tuned ours so 
that it can send between 300-500 per minute. We reach those levels several 
times a day. We can get 1000 per minute if server load is low and the emails do 
not contain ARTask attachments. Here are a few things you can do:

1. Use multiple private threads
        a. Setup a private RPC queue. Set max threads to the total number of 
incoming and outgoing mailboxes you have.

        b. Specify this RPC number in emaildaemon.properties like this:
                com.remedy.arsys.emaildaemon.yourserver.RPC=390630

2. Configure multiple outgoing mailboxes
        a. If you have access to multiple SMTP servers, create one mailbox for 
each SMTP server. You won't see much gain from using a single SMTP server and 
aliasing it to allow creation of multiple Remedy mailboxes. A one-for-one on 
mail servers to mailboxes seems to be a functional limit. But if you have 2 
SMTP servers with 2 mailboxes you can double your throughput.

        b. If you have an Exchange server, create one for an Outlook profile. 
(Consider creating multiple Outlook profiles and MAPI mailboxes if you really 
need more throughput). MAPI tends to be much faster than SMTP but is prone to 
issues with Exchange connectivity, the Outlook profile, etc.

        c. Setup workflow on AR System Email Messages using Set Fields to 
specify the outgoing mailbox so that it uses a round robin approach.

3. Increase number of threads per mailbox (7.0.x only)
        a. This is a 7.0.x feature I haven't been able to use since I'm on 6.3. 
But Support has achieved some outrageous improvements with these settings in 
their test lab. If you're on 7.0.x, add these to your emaildaemon.properties 
file. (Note: increasing these settings to higher numbers won't yield higher 
throughput for some reason)
                com.remedy.arsys.emaildaemon.NumberOfSenderThreads=4
                com.remedy.arsys.emaildaemon.OutgoingMessagesQueueSize=2000

4. Dedicated Email Engine server
        a. Setup a separate server that does nothing but run the Email Engine 
service. Search the BMC KB for instructions on changing the registry so that 
the Email Engine service is not dependent on the local AR Server service. This 
will allow you to run the Email Engine without running AR Server. Configure the 
emaildaemon.properties to connect to your actual AR Server. This will really 
help if your AR Server gets high CPU usage.

5. Increase the Java heap size
        a. Search for this in the BMC KB. Increase the max heap size to 512 MB 
or 1 GB and you could see a big improvement if Java is using a lot of memory.

6. Turn off group and user caching
        a. Set this line in emaildaemon.properties so the Email Engine won't 
cache all of your groups and users when it starts up. It will only cache them 
as needed. It rarely actually needs that info and it uses a lot of memory. This 
will also make the Email Engine service start much faster.
                com.remedy.arsys.emaildaemon.FetchUserGroupInfoOnDemand=true

7. Add additional indexes
        a. With SQL analysis we found some email engine queries that could 
benefit from more indexes when you have quite a bit of history on your email 
engine forms. Back on 5.1.1 these (and a few others BMC finally added as 
standard) doubled my outgoing throughput. These include:
                AR System Email Association
                        1. Destination ID (improves performance)
                AR System Email Error Logs
                        1. Email ID (makes display of AR System Email Messages 
records faster)
                        2. Create Date (makes troubleshooting easier)
                AR System Email Messages
                        1. Send Message (improves performance)
                        2. Date Sent (makes troubleshooting easier)
                        3. Create Date (makes troubleshooting easier)

8. Reduce the sent item history
        a. You can completely eliminate this by setting 'Delete Outgoing 
Notification Messages' = "Yes" in each outgoing mailbox, or by setting 
com.remedy.arsys.emaildaemon.SaveSentItem=False in your emaildaemon.properties 
file. It sounds like you may have already done this.

        b. You can retain a few days worth of history by setting up an 
escalation to delete records older than a few days from AR System Email 
Messages, AR System Email Attachments, and AR System Email Association.

9. Set polling interval below 1 minute
        a. If 1 minute is not fast enough for you, and you have a low enough 
volume for the server to handle frequent polls, set this in 
emaildaemon.properties so it interprets your polling interval as a number of 
seconds instead of minutes. You probably don't want to go below 15 seconds on 
this or it would never really stop running.
                com.remedy.arsys.emaildaemon.MailboxPollingUnitIsMinutes=false

BY: Chad Hall
Source: ARS List
%d bloggers like this: