Sending speed
Hi Ben,
I have now a daily quota of 112.000 with 70 mails/sec; running on m1.small instance but can still not get any higher than 26.000/h. Sending to a list of 100.000 still takes appr. 4 hours. What may the problem be?
I have now a daily quota of 112.000 with 70 mails/sec; running on m1.small instance but can still not get any higher than 26.000/h. Sending to a list of 100.000 still takes appr. 4 hours. What may the problem be?
This discussion has been closed.
Comments
@derivativemedia
Later versions of Sendy includes this feature called "Auto retry". For each bursts of emails sent in parallel, Sendy will check the HTTP code returned by Amazon SES. If it's anything other than "200", that means sending to that email failed. Sendy will pause for 1 second and then automatically try to send the email to the recipient again. If it fails again, the recipient will be recorded and the full list will be available as a CSV download.
This makes sending robust and extremely accurate.
But if you have a large list, Amazon may return a failure more often than a small list. Sending will be paused for 1 second and then retried - multiplied by the number of times Amazon returns a failure HTTP code. This may be the reason you're not seeing the same speed as you see in 1.1.1.3.
Having said all these, sometimes Amazon may not even return any failure code throughout the whole sending process.
1.1.13 does not have this "auto retry" feature. Emails just get transferred to Amazon SES in parallel without checking if any emails failed to go through and subsequently try to re-send.
Lastly, you mentioned on 1.1.13, you get close to 10,000 sends / 5 min. That works out to be around 33 emails per seconds. May I know what's your sending rate?
Also, how many emails are being sent per second using the latest 1.1.3.1?
Thanks.
Ben
After sending is completed, all emails sent does not appear in my Inbox at once. It trickles in slowly until I receive all emails. Sometimes this takes several hours.
Transferring emails between Sendy and Amazon SES will always have some latency, you will never reach 100% of your send rate. Even if you do, emails won't appear on all your recipients' inbox immediately. It takes hours until Amazon finish sending emails to all your recipients.
In any case, all emails transferred to Amazon SES will not be immediately sent. The time taken for Amazon to send your emails after emails are transferred to Amazon is usually longer.
I know this because I've always tested sending emails to a 'catch-all' email. The time taken to receive all emails from Amazon is much longer than when they are fully transferred from Sendy to Amazon.
Sent yesterday to 210.000 subscribers. It s been 23 hours and sendy is still sending
@ben, happy new year. Does the update address this problem as well?
@Ergun Happy new year to you too!
I've tested sending with 70 emails per second and yes it does slow down a bit. When I change the send rate directly in the database in the middle of the send to a smaller number like 28 emails per second, it took a shorter time to execute 28 emails at once.
What I deduced is that it is not an issue with the script (as much as I've tried removing the auto-retry code etc), it's just that the more emails the server processes in parallel, the longer it will take. Processing 70 emails at once apparently taxes the server more than processing 5 - 28 emails at once.
Though, do not be mistaken that sending at 70 emails per second is slower than say, 28 emails per second, because your server does deliver 70 emails in parallel constantly to Amazon SES even if it does not take 1 second to finish each iteration of 70.
I've previously tested 26,000+ emails and it took around 49 minutes compared to when you sent 26,000 emails it took more than 1 hour → http://sendy.co/discussion/415/sending-speed-cant-get-higher-than-26-000h#Item_2
The only difference between the servers you and I are using even though we're both hosted on EC2 is that I'm using Linux and you're using Ubuntu. I'm not sure if there's a performance difference but looking at the numbers I think there's a positive.
Lastly, Amazon does not send your emails immediately once emails are transferred from Sendy to Amazon. I've tested this numerous times sending tens of thousands of emails to a test 'catch all' email address. Emails trickles in very slowly even though all emails have been sent (transferred to Amazon). Hence, even if you are able to transfer your emails to Amazon at exactly 70 emails per second, Amazon will still be in the process of sending emails to your recipients. You can try testing this by sending emails to your own 'catch all' email address and name your emails 'test1@domain.com, test2@domain.com' etc.
Although I can verify that there is no problem with the sending script, I will continue to do research and see how I can improve it.
Thanks.
Ben
Thank you for your answer. Is testing to one smtp server the same as sending to various domains and servers as is the case in my situation? Did you try testing with a larger ec2 instance? I hope we solve this problem as I have aquota 500K per day but due to the slow sending speed, can never fully utilize my quota.
Hi @Ergun,
You're very welcome.
It doesn't matter though. What Sendy does is transfer your emails to Amazon SES. Amazon in turn sends out your emails.
If I test it on a larger instance, my sending speed would be even faster.
I'm on the micro instance using Linux. You're on small instance (higher performance than mine) using Ubuntu. And my sending speed is already faster than yours. If I were to upgrade to a larger instance, sending would be even faster.
Again, there is no problem with the sending script. It's just that the server is processing a huge amount of emails (70) at once (in parallel). And performance varies between different server software. You can try running Sendy on Linux small instance instead of Ubuntu.
Lastly, I checked your phpinfo and found that your
memory_limit
is still at 128M (although you mentioned you've bumped it up to 1024M):Thanks.
Ben
I changed my php memory limit to 1024, I think i did something wrong. Will try again. Is there some other place to change it?