Interspire Product Knowledge Base

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Export to PDF

User Opinions (15 votes)

80% thumbs up 20% thumbs down

How would you rate this answer?



Thank you for rating this answer.

How can I improve the performance of my Email Marketer installation?



Email Marketer - Performance Tuning

This guide is intended to assist users with increasing the performance of Email Marketer by optimizing server and application configurations. You should have experience with modifying server configurations already and must have access to do so on your server in addition to restarting various services. If not, you may need to consult with your hosting provider or system administrator


If there's one thing better than sending an HTML email campaign to 5 million double opted-in contacts, it's sending it in half the time. Based on the communication we have received from our customers, no matter how fast Email Marketer performs, faster is always better.

Performance is a very complex issue, particularly for web applications. There are a number of factors which can impact the net performance of a tool like Email Marketer. The following guide will walk you through some of the simplest and most effective steps you can take to make sure your application and hosting environment are properly configured for optimal performance.

Hosting Environment

The first thing to consider is your hosting environment. Is your server dedicated or shared? How much RAM and CPU does it have? Are there any other applications the server? What does the network configuration look like?

If you are running IEM on a shared server, or on a server running applications other than IEM, then IEM will be sharing resources with those other applications. This means that regardless of how much RAM and CPU the server has IEM will only be able to make use of a fraction of it. According to ModWest, one of our top hosting partners, a shared hosting plan should be able to accomodate up to 1000 emails/hour. If you expect to need higher performance than this, you should invest in a dedicated server.

If you are already running IEM on a dedicated server, you will need to evaluate whether that server has enough RAM and CPU power at its disposal. The best way to do this is to observe the server under load. Setup a fairly large test campaign and send it. While the campaign is running, login to your server, and check the CPU and RAM usage.

On a Windows server, you can do this with the Task Manager. The following Microsoft TechNet article will walk you through how to access Task Manager, and interpret the information presented:

http://technet.microsoft.com/en-us/library/cc958260.aspx

On a Linux server, you can use vmstat, top, free, or any of several other command line tools to monitor CPU and Memory usage. The following articles provide more detailed instructions:

http://www.cyberciti.biz/faq/linux-check-memory-usage/

http://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html

If your CPU usage is consistently over 90%, you may have a problem. If your virtual memory usage is over about 20%, you may also have a problem (Virtual memory, also called swap, is hard drive space used to supplement your phyisical system memory for short term needs, most often when the system runs out of system memory.). This is just a very basic rule of thumb. You should check these stats repeatedly at different times, to find patterns and rule out isolated incidents.

If you are consistently running into this hardware limitations, it is possible that you need a hardware upgrade. You might even need to split IEM's tasks up between multiple servers (one for SMTP, one for MySQL, one for IEM, PHP, and IIS/Apache).

However, before you make any hardware changes, you should try the other performance optimizations recommended in the rest of this article, as they may improve performance enough to reduce your hardware load.

 

MySQL Configuration/InnoDB Tuning

The innodb configuration information in this section is mostly borrowed from [http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/], please see the website for full details. Please take care when modifying the configuration. If you don't know what you're doing you can easily take down your MySQL server.


IEM is a database-driven application, which does a large number of reads and writes to the database during most of its normal operations. MySQL configuration is absolutely crucial to IEM's performance. IEM is designed to use the InnoDB storage engine, not MyISAM, and the database should use the UTF-8 character set, not Latin1, for its encoding. If your database is not configured to use these for every table already, you should modify it accordingly. Otherwise you may experience a large number of errors, which besides failed queries and operations, can also slow the system down with all the error handling overhead.


Tuning your server's InnoDB configuration can greatly reduce page load times and increase the speed of sending emails. The following variables will directly effect the database's performance. To modify these variables you will need access to the MySQL configuration file (my.cnf or my.ini). Your server provider will be able to assist you with these changes.


innodb_buffer_pool_size: Setting this to 70-80% of memory (server's RAM) is a safe bet. E.g. 12G on a server with 16GB of ram. You may want more if your running a dedicated server with mostly InnoDB.

 

*innodb_log_file_size: This depends on your recovery speed needs, but 256M seems to be a good balance between reasonable recovery time and good performance

*Note: If you modify innodb_log_file_size without removing the existing logs, MySQL will fail to restart and InnoDB will complain about the size of the changed log file.

This is the proper way to increase innodb_log_file_size:

- shutdown mysql server

- make backup of data and log files

- remove InnoDB log files

- set new value for innodb_log_file_size in my.cnf

- start mysqld

- check error logs to ensure everything went fine.


innodb_log_buffer_size: 4M is good for most cases

 

innodb_lock_wait_timeout: 300 (this is seconds) is good for most cases


The MySQL server will need to be restarted after any configuration changes. For additional information on general MySQL configuration and optimization, checkout the following links:

 

http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/

 

http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html

 

http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html

 

Email Marketer Tuning

This section is intended for users running scheduled sending as opposed to sending with the pop-up window – if you're using the pop up window, look into setting up a cron job/scheduled task:

https://www.interspire.com/support/kb/categories/Email+Marketer/Support+and+Technical+Questions/Setting+Up+Cron+and+Windows+Scheduled+Tasks/

 

- Database

There may be some useless data that you can drop from your database to help optimize it. Here are some queries you can use to identify and remove that data:

*note: replace -prefix- with your email marketer table prefix. E.g, email_


This query will find subscribers that do not belong to an existing contact list:

 

Find:


SELECT * FROM -prefix-list_subscribers WHERE listid NOT IN ( SELECT listid FROM -prefix-lists)


Delete:


DELETE FROM -prefix-list_subscribers WHERE listid NOT IN ( SELECT listid FROM -prefix-lists)


Use this query to check for subscriber data that doesn't belong to any existing subscribers (this can take a long time):

 

Find:


SELECT subscriberid FROM -prefix-subscribers_data WHERE subscriberid NOT IN ( SELECT subscriberid FROM -prefix-list_subscribers )

 

Delete:


DELETE FROM -prefix-subscribers_data WHERE subscriberid NOT IN ( SELECT subscriberid FROM -prefix-list_subscribers )


Delete (no find needed):


DELETE FROM -prefix-subscribers_data WHERE data = ''


Use this query to remove exports (this can take a long time). Make sure no exports are currently running first:

 

Delete (no find needed):


DELETE FROM -prefix-queues WHERE queuetype = 'export'

 

PHP Configuration

Again, there are two configuration directives that can have a particularly large impact on IEM's performance. The first is PHP's memory_limit. We recommend this be set to at least 128M, although higher might be better in some situations. In the current version of PHP, this is the default value. However, in previous versions, the default value was 16M and 8M, neither of which is recommended.

For more information about PHP's memory limit, see the PHP manual here:

http://www.php.net/manual/en/ini.core.php#ini.sect.resource-limits

In addition, you should check your PHP max execution time setting:

http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time

This is the time a PHP script is allowed to run before it times out and stops. If a script times out prematurely, it may have to be called again, which can impact performance, not to mention being a nuisnace for the user. Generally, a max_execution_time of 300 (5 minutes) is sufficient. If you are running into time out issues frequently, you might set it higher.

 

SMTP Configuration

If your mail server is not configured optimally, or does not have sufficient resources, it can dramatically slow down mail sending performance. To start things off you can do some tests in IEM to see how your MTA is affecting performance.

If you go to Settings -> Application Settings, there is an option labeled "Yes, put the application into test mode". This option will allow you to simulate sending a campaign, without actually interacting with your SMTP server at all. You can run a test campaign with and without this option enabled. If the "test sending mode" campaign is significantly faster, you can be reasonably certain that your MTA is creating a bottleneck.

If you are having MTA performance problems, you should take a look at your SMTP configuration

http://www.phpclasses.org/blog/package/9/post/2-The-Fastest-Ways-to-Deliver-Email-in-PHP.html


Related Articles

No related articles were found.

Attachments

No attachments were found.

Powered by Interspire Knowledge Manager - World's #1 Best Selling FAQ and Knowledge Base Software