Oprimal settings MailWizz to send 1.000.000 mails at 24 hour

Martin Maro

New Member
Hi, i have some question about MailWizz settings ...

Server:
CPU: 4 x 2 GHz
RAM: 8192 MB
SSD RAID storage
100 Mbps dedicated port speed
CentOS 6, PHP-CGI

I plan to use more types of providers ...
2 x Mandrill acc
2 x Amazon SES acc

What are optimal settings for CRON tab in MailWizz ??? :)
Sorry but I am an amateur but very happy to discover new knowledge. Do you have any advice? Other improvements?

Thank you.
 
Hi there,

To reach that number, you should use the "send-parallel-campaigns" feature as described at:
http://www.mailwizz.com/article/increase-delivery-speed-recursive-or-parallel-processing

If you are going to send multiple campaigns in the same time, you will see indeed a high number of emails going out at once, but if you only send just one campaign, you cannot send more email in a minute than the number of emails you specify in Backend -> Settings -> Cron -> Subscribers at once.
For example, if you set 1k subscribers at once and you send 10 campaigns in the same time with parallel sending, then in a single minute, you'll send at least 10k emails (given your server can handle this).

Another way to send super fast is if you have REDIS installed on your server and php's pcntl extension enabled.
Since 1.3.5, mailwizz can use redis as a local queue to store all email sent for a campaign.
It also implements a special command to start a daemon to process that queue with a variable number of workers at once, that you can define.
I haven't wrote how to use that yet, but if it's really needed, i'll take the time to write a short article, or do a video :)

Thanks.
 
I think only a video would suffice in this case since there are plenty of things to explain.
My spoken english is... well, not the best :D But i'll try.
 
You'll be fine, a visual guide would be sufficient to be honest.

One point on using redis, MW doesn't allow for a redis password to be used for the connection. Can you add that to MW?
 
Right, well till i'll include this, you can use iptables to filter access for your ip on the redis server.
 
Bumping old post, but when is it optimal to worry about parallel sending.
Is there a point on setting it up now while I just send around 50 000 a month?

Best wishes,
Silver
 
@twisted1919 I've been using "send-parallel-campaigns" cron since I started using MW, but I could see that this functionality is deprecated since version 1.3.5.9 as in the CHANGELOG below. So I switched back to regular cron.

[CHG] - Deprecated the send-parallel-campaigns command. If you were using it for sending, please go back to regular sending

And, you once noted that using Redis in conjunction with "send-parallel-campaigns" may not yield the expected results. Also, I've been seeing people reporting issues related to recently added PCNTL functionality.

Q1. So, suppose if I have 50< customers and each sends 25K emails a day (total 1.2M or more a day), then which is the most appropriate and STABLE way to adopt ? I would select a less memory consuming method since MySQL is there to eat up my RAM at peak usage.

1. Regular cron
2. PCNTL
3. REDIS
4. send-parallel-campaigns
5. Or any combination of above

Please suggest :) . So I don't have to worry about this in future :D.

--
Server config :
CPU : Intel(R) Xeon(R) CPU E3-1245 V2 @ 3.40GHz (8 threads)
Memory : 32 Gigs (26 reserved for MySql)
SATA RAID 1
Don't bother about the capacity, I can scale it up/down.
--

Q2. Think you picked an answer for my first question, then under that method, can you roughly say how many emails can be sent an hour per "n" cores/"n" Gigs of RAM through a server? So, I'll be able to calculate what would be the maximum capacity of my server based on its specs. And it would definitely avoid unnecessary expenses spent on servers. As per https://forum.mailwizz.com/threads/mail-throughput-performance-comparison.1484/ , 275K emails in less than 2 Hrs through a 4G/4 core server is an outstanding throughput.

Thanks in advance !
 
Q2. Think you picked an answer for my first question, then under that method, can you roughly say how many emails can be sent an hour per "n" cores/"n" Gigs of RAM through a server? So, I'll be able to calculate what would be the maximum capacity of my server based on its specs. And it would definitely avoid unnecessary expenses spent on servers. As per https://forum.mailwizz.com/threads/mail-throughput-performance-comparison.1484/ , 275K emails in less than 2 Hrs through a 4G/4 core server is an outstanding throughput.

I corrected my post as the stats for 275K in 2hrs is wrong - with PCNTL on, MailWizz did not process all mails and only 38K emails had been sent (out of the 275K) - my corrections to the above thread:

Correction: The above settings did not result in 275K mails being sent. MailWizz reported this, but when looking at the postfix maillog, only 38K mails were processed. I have logged a support ticket, but we have run out of ideas - in my opinion the issue is possibly related to PCNTL.

In another test with PCNTL, the MailWizz log shows 52593 mails logged, Postfix has only received and processed 3988.

When turning PCNTL off and using default settings, it takes 5 hours for 73,000 mails into local Postfix.

For us the MailWizz throughput is not great, as we can run a 275K campaign via Interspire into local Postfix within 2 hours. With MailWizz not using PCNTL it will probably take 15 hours.
 
@bidorbuy Thanks for the correction. Well, I also had issues with PCNTL in the past being emails sent to only less subscribers than actual, but it seems to have fixed - though, I never had a chance to test it in prod for a real campaign.

Also, are you pretty sure about this throughput while using Interspire ?

For us the MailWizz throughput is not great, as we can run a 275K campaign via Interspire into local Postfix within 2 hours. With MailWizz not using PCNTL it will probably take 15 hours.

Because postfix has a limit on the number of emails it can accept per second. From my experience, it accepts 8-12 emails ( size ~ 102 Kb ) per second per connection - unless you use an haproxy loadbalancer or multiple master processes/postfix instances. So the maximum throughput will be 12*60*60 ~ 43K per hour. I did a quick test on my lappy and see the results below -

upload_2016-2-11_21-50-25.png

Here the size of email is just 4.0 Kb, and is local delivery without SMTP auth. So the emails per second will again depend on the email payload/network speed/auth negotiation etc etc. And I don't think there's any other way to increase this rate for a single postfix instance, I MAY BE WRONG, correct me if so :) . **This stat is only for public awareness and to collect other members input** :)

So, in my opinion, for a throughput comparison, firing directly to something like PowerMTA will be the best option since they claim unlimited speed for extended license.
 
Last edited:
Hi there,

yes, I am sure about Interspire. Our setup is local Postfix with relay into Port25 - there is no auth between servers. Yesterday's campaign processed via Interspire 121335 mails per hour - this was throttled as during that time we had a lot of transactional mails (which take precedence) going out.

I am used to send out mails at a rate of 20-30/sec. The only limit within Postfix is how many connections a client can make (it's 50 - http://www.postfix.org/postconf.5.html#smtpd_client_connection_count_limit) - there are no other limits I am aware of. Postfix itself can be tuned quite well (http://www.postfix.org/TUNING_README.html).

With our current MailWizz installation, Postfix seems to "drop" emails without error/warning and since I am unsure if this is a MailWizz or Postfix issue (this does not happen on Interspire), I have now reconfigured MailWizz to connect directly to Port25 for our next campaign. In a ticket I logged with @twisted1919 I have recorded that even a campaign of 900 subscribers results only in 525 mails landing in local postfix.
 
Thanks, I did a re-test with a much bigger payload... I ran the above script as 215 different processes and got a throughput of 140 emails (submissions) per second for a 75 Kb email file on local postfix, being a new connection initiated for each submission. And it looks like it can do even more ! I'm running some tests with MailWizz + Postfix and will post the results soon. :)
 
Back
Top