Please wait...
Understanding email delivery settings and how they impact performance.
Since there seems to be a huge misunderstanding related to how delivery settings should look like, I think a good explanation is needed.
Let’s look at this:
So we have 10 campaigns at once and 100 subscribers at once.
What does that mean is that when the cron job will run, that is, each minute, it will load from the database 10 campaigns that are ready for sending and sequentially, for each campaign, will load 100 subscribers, send 100 emails for first one, then pick the next campaign and load 100 subscribers and so on till the 10th campaign is done.
Keep in mind that for each email that is processed, there is a certain memory usage which depends on the size of the template used in the campaign, on the number of custom fields for the list used in campaigns and various other factors, like the in memory cached list field definitions and so on.
Now, remember how I said that each minute the cron job runs and picks up campaigns for sending?
If we look at the below settings:
And imagine that at minute 1 the cron job runs and picks up the campaigns and starts sending 1000 emails for first campaign (rest of them still wait for sending).
While the first campaign is still processing, the cron job at minute 2 also runs, and starts sending for the second campaign, that is 1000 more subscribers to process, and we go on till cron job number 10, which processes 1000 subscribers at once. So we end up processing around 10k subscribers at some point because we loaded a high number of subscribers for each campaign and that campaign didn’t finish sending while other campaigns started sending.
Now, this should become very obvious on the number of issues it can create on a slow server(or slow smtp server), that’s why you should be really careful at these settings, it’s not just how much memory usage a single cron run does, but it’s also about the number of the cron jobs that end up running at same time.
Next, if we enable PCNTL sending, say like:
Means that when the cron job runs, it will process 5 campaigns at once.
For each campaign, it will load 5 batches of 1000 subscribers.
Doing a quick math, 5 campaigns * 5 batches of subscribers * 1000 subscribers = 25000 subscribers at once. Now take memory usage into consideration for 25k subscribers at once and take network connections into consideration and also take in consideration when next cron runs and starts doing 25k subscribers at once again if the first cron didn’t finish yet and so on.
Bottom line is that you should really take into consideration all the above.
Don’t set high values if you don’t know what they do.
Since MailWizz runs things in batches, it’s always better to run small numbers than huge ones.