Skip to content

Sending speed

edited December 2012 in Troubleshooting
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?
«1

Comments

  • I have the same issue on the most current release of sendy. On 1.1.1.3 I get close to 10,000 sends / 5 min.
  • Hi @Ergun, can you try rebooting your instance to see if this improves?

    @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
  • I forgot to mention one other thing. Recently I've been sending tens of thousands of emails to a "catch all" email account.

    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.
  • Ok, but 26.000/h equals a quota of 7.22 per sec. My quota is 70 per sec. I'm expecting at least 50-60 per second, which should be easily attainable.
  • My quota rate is 70 per sec. I am sending about 1000 per 5 min now
  • @derivativemedia 1.000/5min or 10.000/5min?
  • edited December 2012
    on the most current release its 1000/5min down from approx 10000/5min on 1.1.1.3
  • @derivativemedia that's 3 emails per second when you have 70/sec. That's way too slow. Is there anything in your queue table? And how much memory does your instance have? What's the memory_limit for your PHP setup?
  • Instance has 1.7gb memory and php memory is set to 128M
  • Thanks @derivativemedia. Is there currently any emails in your queue table? And how many emails do you typically send to?
  • nothing in the queue right now as nothing is sending. I am sending to 40k
  • Hi I have booted the instance today, and sent to approximately 22k subscribers. It took about 1 hour
  • No change in speed
  • A question: What i have realized is that sendy sends in increments of the per sec quota of ses. Now that i have a quota of 70 per sec, it sends and waits for the answers for all of them? what happens if all but one are delivered and retries only the one that was not reported ok? When does sendy load the next 70?
  • Finished sending to 99.000 users in 6 hours 48 minutes.
  • Hi @Ergun @derivativemedia, how about increasing your PHP's memory_limit to 1GB and see how it pans out? With a send rate of 70 per second, PHP is executing 70 processes per second. Both of you have the exact same settings, on a small EC2 instance, with 1.7GBs of RAM. Bumping up the memory may improve speed.
  • I will give it a try. shouuld I do it in htccess or php.ini?
  • ok i did it, dont bother
  • hi @ben, I changed PHP's memory limit to 1024M and sent today to a list of 3.906 subscribers. It took 13 min to deliver. This equals to a sending speed of 5 p/sec, but i have a quota of 70/sec. Still no change in speed!
  • no luck here either
  • Hi @Ben, I'm going to send 300K emails on wednesday, at the current speed it will take more than 16 hours to send, is there anything else to be done?
  • Hi @Ergun, I previously tested sending with a send rate of 28 emails / second. Even though sending did not reach maximum speed, it was pretty fast. I'm going to test with 70 emails / second with a 1GB allocated memory.

    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.
  • If alone the transfer takes 16 hours, this is way too high, and a big problem. If it took 2 hours 2 send to ses and another 2 hours for ses to send, this would be acceptable. I do not know with what type of emails you achieved 28 emails per sec, but with real emails and a bounce rate of 0,02% i can not get even this high. This is a very big problem for me. But @derivativemedia says he achieved 10.000 per 5 min, with the older version, so there must be a problem in the update.
  • I sent today to the same list of 3900 subscribers another campaign, it also took 13 min to deliver.
  • 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,

    Thank you for your answer.

    You're very welcome.

    Is testing to one smtp server the same as sending to various domains and servers as is the case in my situation?

    It doesn't matter though. What Sendy does is transfer your emails to Amazon SES. Amazon in turn sends out your emails.

    Did you try testing with a larger ec2 instance?

    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.

    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

    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):

    image

    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?

This discussion has been closed.