SendCampaignCommand : Sleeps most of the time

ccc

Member
Hi All,

Since we are running a lot of traffic via MW platforms we are constantly looking on how to improve sending speeds.

We did a full profile of the SendCampaignCommand and we noticed that most of the time it is "sleeping". (SendCampaignCommand.php line 404)

In the cron settings pause set to "0"... Does anyone know how we can avoid the sleep from happening?

Profile report can be found here: https://blackfire.io/profiles/7d0a4591-4111-4190-928d-3a288929a3f1/graph
 
@ccc - i see you're using pcntl there and the reason for why the app "sleeps" at that point is simple.
What actually sleeps is the main process which waits for child processes to finish.
 
Thanks for the explenation Serban!

We noticed the spikes in speed when we were testing our latest MTA which shows graphs of incoming/sent/deferred messages... and that showed that the messages were not coming in fluently from MW. (incoming messages from mailwizz are the light green line)

Schermafbeelding 2017-01-05 om 14.07.52.png
 
It might be because when the sending process starts it has all the memory available to it, so it can start in force, thus high throughput, but during send, depending on your settings/server, the memory usage increases and then the processes have to battle and share that memory, thus the throughput gets slower. Just a thought though...
 
Back
Top